diff options
Diffstat (limited to 'Completion/Unix/Type/_umountable')
-rw-r--r-- | Completion/Unix/Type/_umountable | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Completion/Unix/Type/_umountable b/Completion/Unix/Type/_umountable index 7ffce5bb4..0111555b6 100644 --- a/Completion/Unix/Type/_umountable +++ b/Completion/Unix/Type/_umountable @@ -1,15 +1,21 @@ #autoload local tmp -local dev_tmp dpath_tmp mp_tmp mline +local -a dev_tmp dpath_tmp mp_tmp mline case "$OSTYPE" in -linux*|irix*) +linux*) + tmp=( "${(@f)$(< /proc/self/mounts)}" ) + dev_tmp=( "${(@)${(@)tmp%% *}:#none}" ) + mp_tmp=( "${(@)${(@)tmp#* }%% *}" ) + ;; +irix*) tmp=( "${(@f)$(< /etc/mtab)}" ) dev_tmp=( "${(@)${(@)tmp%% *}:#none}" ) mp_tmp=( "${(@)${(@)tmp#* }%% *}" ) ;; freebsd*|dragonfly*) /sbin/mount | while read mline; do + [[ $mline[(w)1] = map ]] && continue dev_tmp+=( $mline[(w)1] ) mp_tmp+=( $mline[(w)3] ) done |