diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-10-29 20:39:15 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-10-29 20:39:15 +0000 |
commit | 234a0acea79d8f79032f6cbda88e7720984b87e8 (patch) | |
tree | e71434dc815b245349d6c880b95807c74d37017c /Completion/Linux/Type/_fuse_values | |
parent | 52f25ab3d2d81a7c3172a54e3c0824de40b30270 (diff) | |
download | zsh-234a0acea79d8f79032f6cbda88e7720984b87e8.tar.gz zsh-234a0acea79d8f79032f6cbda88e7720984b87e8.tar.xz zsh-234a0acea79d8f79032f6cbda88e7720984b87e8.zip |
Merge new completions 22794, 22797, 22798, 22799, and 22800 onto 4.2 branch.
Diffstat (limited to 'Completion/Linux/Type/_fuse_values')
-rw-r--r-- | Completion/Linux/Type/_fuse_values | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/Completion/Linux/Type/_fuse_values b/Completion/Linux/Type/_fuse_values new file mode 100644 index 000000000..be830cb40 --- /dev/null +++ b/Completion/Linux/Type/_fuse_values @@ -0,0 +1,70 @@ +#autoload + +local ret stateset fvals cvalsvar cvalind +typeset -a fvals opts + +if [[ $1 = -O* ]]; then + opts+=$1 + shift +fi +opts+=(-s , -S =) + +cvalind=$argv[(I)-A*] + +while (( cvalind )); do + if [[ ${(P)cvalind} = -A?* ]]; then + cvalsvar=${(P)cvalind[3,-1]} + argv[cvalind]=() + else + cvalsvar=$argv[cvalind+1] + argv[cvalind,cvalind+1]=() + fi + cvalind=$argv[(I)-A*] +done + +fvals=( + 'ro[mount filesystem read-only]' + 'allow_other[allow access to other users]' + 'allow_root[allow access to root]' + 'nonempty[allow mounts over non-empty file/dir]' + 'default_permissions[enable permission checking by kernel]' + 'fsname[set filesystem name]:name' + 'large_read[issue large read requests (linux v2.4 only)]' + 'max_read[set maximum size of read requests]:size' + 'hard_remove[immediate removal (do not hide files)]' + 'use_ino[let filesystem set inode numbers]' + 'readdir_ino[try to fill in d_ino in readdir]' + 'direct_io[use direct I/O]' + 'kernel_cache[cache files in kernel]' + 'umask[set file permissions]:permission mask (octal)' + 'uid[set file owner]:user id:' + 'gid[set file group]:group id:' + 'entry_timeout[cache timeout for names]:timeout (s)' + 'negative_timeout[cache timeout for deleted names]:timeout (s)' + 'attr_timeout[cache timeout for attributes]:timeout (s)' +) + +[[ -n $cvalsvar ]] && set -- "$@" ${(P)cvalsvar} + +if [[ $# -eq 0 ]]; then + set -- 'mount options' $fvals +else + set -- "$@" $fvals +fi + +if [[ -n $state ]]; then + stateset=$state + state= +fi + +_values $opts "$@" && ret=0 + +if [[ -n $state ]]; then + compstate[restore]= +elif [[ -n $stateset ]]; then + state=$stateset +else + unset state +fi + +return $ret |