Skip to content

Instantly share code, notes, and snippets.

@sandip4n
Last active October 24, 2019 11:45
Show Gist options
  • Save sandip4n/5408950986a20c26da69b9e91e93796b to your computer and use it in GitHub Desktop.
Save sandip4n/5408950986a20c26da69b9e91e93796b to your computer and use it in GitHub Desktop.
Fish shell script to generate git completions
for file in (find $HOME/.config/fish/completions -name 'git-*.fish')
set gitcmd (basename $file .fish)
set subcmd (echo $gitcmd | sed 's/git-//g')
sed -i 's/'$gitcmd' /git -n \'__fish_git_using_command '$subcmd'\' /1' $file
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment