Replace $UNAME with $OSTYPE in trivial cases.

$OSTYPE is automatically available at runtime (for dynamic loading).
This commit is contained in:
Ville Skyttä 2011-10-12 23:07:21 +03:00
parent 156656c16d
commit 86ca9ee598
8 changed files with 12 additions and 10 deletions

View File

@ -1278,9 +1278,9 @@ _terms()
} }
# a little help for FreeBSD ports users # a little help for FreeBSD ports users
[ $UNAME = FreeBSD ] && complete -W 'index search fetch fetch-list extract \ [[ $OSTYPE == *freebsd* ]] && complete -W 'index search fetch fetch-list
patch configure build install reinstall deinstall clean clean-depends \ extract patch configure build install reinstall deinstall clean
kernel buildworld' make clean-depends kernel buildworld' make
# This function provides simple user@host completion # This function provides simple user@host completion
# #

View File

@ -1,6 +1,6 @@
# FreeBSD kldload completion # FreeBSD kldload completion
[ $UNAME = FreeBSD ] || return 1 [[ $OSTYPE == *freebsd* ]] || return 1
_kldload() _kldload()
{ {

View File

@ -1,6 +1,6 @@
# FreeBSD kldunload completion # FreeBSD kldunload completion
[ $UNAME = FreeBSD ] || return 1 [[ $OSTYPE == *freebsd* ]] || return 1
_kldunload() _kldunload()
{ {

View File

@ -33,7 +33,7 @@ _pgrep()
complete -F _pgrep pgrep complete -F _pgrep pgrep
# Linux pidof(8) completion. # Linux pidof(8) completion.
[ $UNAME = Linux ] && complete -F _pgrep pidof [[ $OSTYPE == *linux* ]] && complete -F _pgrep pidof
# Local variables: # Local variables:
# mode: shell-script # mode: shell-script

View File

@ -1,6 +1,6 @@
# bash completion for FreeBSD base package management tools # bash completion for FreeBSD base package management tools
[ $UNAME = FreeBSD ] || return 1 [[ $OSTYPE == *freebsd* ]] || return 1
_pkg_delete() _pkg_delete()
{ {

View File

@ -1,6 +1,7 @@
# Linux route(8) completion # Linux route(8) completion
[ $UNAME = Linux ] && [[ $OSTYPE == *linux* ]] || return 1
_route() _route()
{ {
local cur prev words cword local cur prev words cword

View File

@ -1,6 +1,7 @@
# watch(1) completion # watch(1) completion
[[ $UNAME == Linux ]] && [[ $OSTYPE == *linux* ]] || return 1
_watch() _watch()
{ {
local cur prev words cword split local cur prev words cword split

View File

@ -1,6 +1,6 @@
# bash completion for Linux wireless-tools # bash completion for Linux wireless-tools
[ $UNAME = Linux ] || return 1 [[ $OSTYPE == *linux* ]] || return 1
_iwconfig() _iwconfig()
{ {