aboutsummaryrefslogtreecommitdiffhomepage
path: root/make_mercurial_completions.fish
diff options
context:
space:
mode:
Diffstat (limited to 'make_mercurial_completions.fish')
-rw-r--r--make_mercurial_completions.fish37
1 files changed, 37 insertions, 0 deletions
diff --git a/make_mercurial_completions.fish b/make_mercurial_completions.fish
new file mode 100644
index 00000000..50b854c5
--- /dev/null
+++ b/make_mercurial_completions.fish
@@ -0,0 +1,37 @@
+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
+