Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[patch] _hg: completion for 'hg bookmarks'



Hi there

Below is a patch to add completion support for the "hg bookmarks" command.

thg,
Christoph

PS Please CC on reply, I'm not subscribed to the list.

diff --git a/Completion/Unix/Command/_hg b/Completion/Unix/Command/_hg
index e7c21b9..edd7f0d 100644
--- a/Completion/Unix/Command/_hg
+++ b/Completion/Unix/Command/_hg
@@ -962,4 +962,14 @@ _hg_cmd_strip() {
   ':revision:_hg_tags'
 }

+_hg_cmd_bookmarks() {
+  _arguments -s -w : $_hg_global_opts \
+  - '(--force -f)'{-f,--force}'[force]' \
+    '(--rev -r)'{-r+,--rev}'[set bookmark at revision]:revision:_hg_tags' \
+    '(--delete -d)'{-d,--delete}'[delete a given bookmark]' \
+    '(--rename -m)'{-m+,--rename}'[rename given
bookmark]:bookmark:_hg_bookmarks_internal' \
+    ':bookmark:_hg_bookmarks_internal' \
+  - '(--inactive -i)'{-i,--inactive}'[mark a bookmark inactive]'
+}
+
 _hg "$@"



Messages sorted by: Reverse Date, Date, Thread, Author