zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH] sshfs -o options completion
Date: Tue, 11 Aug 2015 22:02:31 +0000	[thread overview]
Message-ID: <20150811220231.GC1859@tarsus.local2> (raw)

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


             reply	other threads:[~2015-08-11 22:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 22:02 Daniel Shahaf [this message]
2015-08-13 23:57 ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150811220231.GC1859@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).