Skip to content

Instantly share code, notes, and snippets.

@erawhctim
Created November 17, 2021 21:37
Show Gist options
  • Save erawhctim/91b7eee50395fade13c24319efe71695 to your computer and use it in GitHub Desktop.
Save erawhctim/91b7eee50395fade13c24319efe71695 to your computer and use it in GitHub Desktop.
git wrapper function with line numbers for files
function g \
--description 'abbreviation for git-number w/auto completion' \
--wraps git
if string length -q -- $argv
switch $argv[1]
#ignore rebase, since it doesn't play nice with git-number
case "reb*"
git $argv
case "*"
git-number $argv
end
else
git-number $argv
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment