[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-64-gee43b22
Ville Skyttä
ville.skytta at iki.fi
Wed Apr 6 17:45:55 UTC 2011
The following commit has been merged in the master branch:
commit e31f021470f15e57fdf52889d040a28bda81f4e2
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Wed Apr 6 20:28:19 2011 +0300
Replace some uname -s checks with $OSTYPE ones.
diff --git a/completions/crontab b/completions/crontab
index 593b463..e1adc7b 100644
--- a/completions/crontab
+++ b/completions/crontab
@@ -16,7 +16,7 @@ _crontab()
esac
local i opts=" -u -l -r -e" # leading space at start is significant...
- [ "$(uname -s)" = Linux ] && opts="$opts -i"
+ [[ $OSTYPE == *linux* ]] && opts="$opts -i"
[ -e /etc/selinux ] && opts="$opts -s"
for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
case "${COMP_WORDS[i]}" in
diff --git a/completions/findutils b/completions/findutils
index 0d87874..0eb5372 100644
--- a/completions/findutils
+++ b/completions/findutils
@@ -23,10 +23,9 @@ _find()
;;
-fstype)
_fstypes
- if [[ "$( uname -s )" == *BSD ]] ; then
+ [[ $OSTYPE == *bsd* ]] && \
COMPREPLY=( "${COMPREPLY[@]}" \
$( compgen -W 'local rdonly' -- "$cur" ) )
- fi
return 0
;;
-gid)
diff --git a/completions/mount b/completions/mount
index 554e744..65ca8ea 100644
--- a/completions/mount
+++ b/completions/mount
@@ -140,7 +140,7 @@ _umount()
_get_comp_words_by_ref cur
COMPREPLY=()
- if [[ $(uname -s) = Linux && -r /proc/mounts ]]; then
+ if [[ $OSTYPE == *linux* && -r /proc/mounts ]]; then
# Linux /proc/mounts is properly quoted. This is important when
# unmounting usb devices with pretty names.
_linux_fstab < /proc/mounts
--
bash-completion
More information about the Bash-completion-commits
mailing list