From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29592 invoked by alias); 11 Aug 2015 22:13:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36110 Received: (qmail 20163 invoked from network); 11 Aug 2015 22:13:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=weW fd/lYipuxC6VcPwwPmIFr8Ns=; b=yFDO3tkEd/2NyP1PITgfGrAf6Bl3wrU3wh1 Xf+rt/WOHo1hKHVWU8dqh3I8q3xl8/rEYfhNs56BKHiSOXhJp+R+q2mGkZnwBfCY ILCc8H9bKsuFrD/4N2SQWNZNOj4oyPSNVRspMivv3voU12NTKNn9hkMJdMwf35tQ F8h2p1JA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=we Wfd/lYipuxC6VcPwwPmIFr8Ns=; b=Rz7GFFhEsXyTXCDTDozQChYzPcDOHHavA9 +m6KKM0C580i1UzX6W9OA1wN9HlLk1yO4bc0yM+ACsmWBiYnQBqakWeRSgY5zrva EvmEyBFaKNs0B3kmyYLqce3aN5chpdDFkrOUg1UH2/9h11OCODGZGAfNrKWh2fgv dASdswBZY= X-Sasl-enc: dBCaQlZYnZlaQXg373dn0CmCXP9dUlJMEa1TNSHw2lYX 1439330556 Date: Tue, 11 Aug 2015 22:02:31 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] sshfs -o options completion Message-ID: <20150811220231.GC1859@tarsus.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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