diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-08-15 04:25:18 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-08-17 21:54:55 +0000 |
commit | ad98fab65d1307e788432ddd5c5d05aef5070267 (patch) | |
tree | 0c1d58289c991f1f4d7410d221ade2f3f9cac18c | |
parent | fa573a35794e46f3e3729853be03508d0e20985d (diff) | |
download | zsh-ad98fab65d1307e788432ddd5c5d05aef5070267.tar.gz zsh-ad98fab65d1307e788432ddd5c5d05aef5070267.tar.xz zsh-ad98fab65d1307e788432ddd5c5d05aef5070267.zip |
36158: _sshfs: Fix completion of and after -o
The "action" part of the -o spec didn't escape colons.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Linux/Command/_sshfs | 31 |
2 files changed, 31 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 9ffa11230..2aca1a87c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-08-17 Daniel Shahaf <d.s@daniel.shahaf.name> + * 36158: Completion/Linux/Command/_sshfs: _sshfs: Fix completion + of and after -o + * 36109: Src/Zle/zle_misc.c: bracketed-paste: change quoting style diff --git a/Completion/Linux/Command/_sshfs b/Completion/Linux/Command/_sshfs index c6a8e102d..e6d137017 100644 --- a/Completion/Linux/Command/_sshfs +++ b/Completion/Linux/Command/_sshfs @@ -1,14 +1,39 @@ #compdef sshfs -_arguments \ +local context state state_descr line +typeset -A opt_args +local curcontext="$curcontext" +integer ret=1 + +_arguments -C \ '-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]' \ '-r[mount read-only]' \ '-h[help]' \ ':remote directory:_user_at_host -S:' \ - ':mountpoint:_files -/' + ':mountpoint:_files -/' && ret=0 + +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 && ret=0 +fi + +return ret |