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

[PATCH] sshfs -o options completion



The "action" part of the -o spec didn't escape colons.

diff --git a/Completion/Linux/Command/_sshfs b/Completion/Linux/Command/_sshfs
index c6a8e10..b562ce2 100644
--- a/Completion/Linux/Command/_sshfs
+++ b/Completion/Linux/Command/_sshfs
@@ -1,10 +1,13 @@
 #compdef sshfs
 
+local context state state_descr line
+typeset -A opt_args
+
 _arguments \
   '-V[version]' \
   '-p:tcp port:' \
   '-C[compression]' \
-  '-o:options:_values -s , "sshfs or fuse or mount options" reconnect sshfs_sync no_readahead sshfs_debug cache=:cache\ setting:(yes no) cache_timeout=:seconds: cache_stat_timeout=:seconds: cache_dir_timeout=:seconds: cache_link_timeout=:seconds: ssh_command=:ssh\ command:_command_names directport=:port: SSHOPT=:ssh\ option: default_permissions allow_other allow_root kernel_cache large_read direct_io max_read=:size: hard_remove debug fs_name=:name: use_ino readdir_ino' \
+  '-o:options:->options' \
   '-d[debug]' \
   '-f[foreground]' \
   '-s[disable multithreaded operation]' \
@@ -12,3 +15,21 @@ _arguments \
   '-h[help]' \
   ':remote directory:_user_at_host -S:' \
   ':mountpoint:_files -/'
+
+if [[ $state == options ]]; then
+  _values -s , "sshfs or fuse or mount options" \
+    reconnect sshfs_sync no_readahead sshfs_debug \
+    'cache=:cache setting:(yes no)' \
+    cache_timeout=:seconds: \
+    cache_stat_timeout=:seconds: \
+    cache_dir_timeout=:seconds: \
+    cache_link_timeout=:seconds: \
+    'ssh_command=:ssh command:_command_names' \
+    directport=:port: \
+    'SSHOPT=:ssh option:' \
+    default_permissions allow_other allow_root kernel_cache large_read direct_io \
+    max_read=:size: \
+    hard_remove debug \
+    fs_name=:name: \
+    use_ino readdir_ino
+fi



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