zsh: don't mention /etc/mtab

The file is obsolete, use /proc/self/mounts instead.

Also, yuck, the code is so awful...
This commit is contained in:
Lennart Poettering 2015-10-09 17:15:24 +02:00
parent 2c882b8bfa
commit b3ccac01cc

View File

@ -89,7 +89,7 @@ _udevadm_test-builtin(){
_udevadm_mounts(){
local dev_tmp dpath_tmp mp_tmp mline
tmp=( "${(@f)$(< /etc/mtab)}" )
tmp=( "${(@f)$(< /proc/self/mounts)}" )
dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
mp_tmp=( "${(@)${(@)tmp#* }%% *}" )