Replace $UNAME with $OSTYPE in trivial cases.

$OSTYPE is automatically available at runtime (for dynamic loading).
master
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
[ $UNAME = FreeBSD ] && complete -W 'index search fetch fetch-list extract \
patch configure build install reinstall deinstall clean clean-depends \
kernel buildworld' make
[[ $OSTYPE == *freebsd* ]] && complete -W 'index search fetch fetch-list
extract patch configure build install reinstall deinstall clean
clean-depends kernel buildworld' make
# This function provides simple user@host completion
#

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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