From c1f1bbc5b9c128944b82afed25140ee62ccf522a Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Tue, 24 May 2022 22:26:29 +0200 Subject: github #93: Replace /etc/mtab with /proc/self/mounts for Linux /proc/self/mounts has been available since Linux 2.4.19, released in 2002. /etc/mtab is usually a symlink to this file but might not exist --- Completion/Linux/Command/_fusermount | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Completion/Linux/Command/_fusermount') diff --git a/Completion/Linux/Command/_fusermount b/Completion/Linux/Command/_fusermount index 41d3dec72..d55eca29c 100644 --- a/Completion/Linux/Command/_fusermount +++ b/Completion/Linux/Command/_fusermount @@ -19,7 +19,7 @@ case "$state" in if [[ $+opt_args[-u] -eq 0 ]]; then _files -/ else - mtpts=(${${${"${(f)$(< /etc/mtab)}"}#* }%% *}) + mtpts=(${${${"${(f)$(< /proc/self/mounts)}"}#* }%% *}) _canonical_paths mounted 'mounted filesystem' "${(@g::)mtpts}" fi ;; -- cgit v1.2.3-70-g09d2