summaryrefslogtreecommitdiff
path: root/completions/umount.linux
diff options
context:
space:
mode:
Diffstat (limited to 'completions/umount.linux')
-rw-r--r--completions/umount.linux12
1 files changed, 12 insertions, 0 deletions
diff --git a/completions/umount.linux b/completions/umount.linux
index 13a923c1..3fbd544d 100644
--- a/completions/umount.linux
+++ b/completions/umount.linux
@@ -65,6 +65,18 @@ _linux_fstab()
fi
done
+ # Add some relative paths to COMPREPLY
+ if [[ $cur && $cur != /* ]]; then
+ local i n=${#COMPREPLY[@]}
+ for (( i=0; i < $n; i++ )); do
+ if [[ "${COMPREPLY[i]}" == "$PWD"* ]]; then
+ [[ $cur == ./* ]] &&
+ COMPREPLY+=( "./${COMPREPLY[i]##$PWD*(/)}" ) ||
+ COMPREPLY+=( "${COMPREPLY[i]##$PWD*(/)}" )
+ fi
+ done
+ fi
+
_reply_compgen_array
}