[Bash-completion-commits] [SCM] bash-completion branch, mount, updated. 1.90-52-g7a1a3da
Igor Murzov
e-mail at date.by
Sat Dec 3 22:42:23 UTC 2011
The following commit has been merged in the mount branch:
commit 7a1a3da08a77de2952b75dc514fa962d874c5c95
Author: Igor Murzov <e-mail at date.by>
Date: Sun Dec 4 02:39:32 2011 +0400
umount: Half-fix for completion of relative paths.
diff --git a/completions/umount.linux b/completions/umount.linux
index 13a923c..3fbd544 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
}
--
bash-completion
More information about the Bash-completion-commits
mailing list