Replace some uname -s checks with $OSTYPE ones.
This commit is contained in:
parent
f0eac44ac9
commit
e31f021470
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user