fish-shell/make_mercurial_completions.fish

37 lines
832 B
Fish

echo '
#
# Completions for the hg command (Mercurial)
# This file was autogenerated by the file make_mercurial_completions.fish
# which is shipped with the fish source code
#
#
# subcommands
#
'
set -l cmd (hg help | sed -n -e 's/^ \([^ ][^ ]*\) *\([^ ].*\)$/-a \1 --description \'\2\'/p')
printf "complete -c hg -n '__fish_use_subcommand' -x %s\n" $cmd
for i in (hg help | sed -n -e 's/^ \([^ ][^ ]*\) .*$/\1/p')
echo '
#
# Completions for the \''$i'\' subcommand
#
'
set -l sw1 (hg help $i | sed -n -e 's/^ *-\(.\) *--\([^ ]*\) *\([^ ].*\)$/-s \1 -l \2 --description \'\3\'/p' )
if count $sw1 >/dev/null
printf "complete -c hg %s\n" $sw1
end
set -l sw2 (hg help $i | sed -n -e 's/^ *--\([^ ]*\) *\([^ ].*\)$/-l \1 --description \'\2\'/p' )
if count $sw2 >/dev/null
printf "complete -c hg %s\n" $sw2
end
end