Glenn Y. Rolland
35f8500373
git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1426 eaee96b3-f302-0410-b096-c6cfd47f7835
23 lines
502 B
Bash
23 lines
502 B
Bash
#!/bin/sh
|
|
|
|
_sshfsmapper_opts()
|
|
{
|
|
local cur prev sshfsmapper_opts
|
|
|
|
COMPREPLY=()
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
|
|
sshfsmapper_opts='-s -h -i -l -u -a'
|
|
if [[ "$cur" == -* ]]; then
|
|
COMPREPLY=( $( compgen -W "$sshfsmapper_opts" -- $cur ) )
|
|
else
|
|
if [[ "$prev" == -s ]]; then
|
|
COMPREPLY=( $( sshfs-mapper -l 2> /dev/null ) )
|
|
else
|
|
COMPREPLY=( $( compgen -W "$sshfsmapper_opts" -- $cur ) )
|
|
fi
|
|
fi
|
|
}
|
|
|
|
complete -F _sshfsmapper_opts $default sshfs-mapper
|