diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-12 23:07:21 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-12 23:07:21 +0300 |
commit | 86ca9ee598d2440c98d73e0541e4fbf82c1bd483 (patch) | |
tree | 6558bc8ba15fc495842694bb98d4fb0df413473a | |
parent | 156656c16d4302d059221a06eb7c1bd460e41fe9 (diff) | |
download | bash-completion-86ca9ee598d2440c98d73e0541e4fbf82c1bd483.tar.gz |
Replace $UNAME with $OSTYPE in trivial cases.
$OSTYPE is automatically available at runtime (for dynamic loading).
-rw-r--r-- | bash_completion | 6 | ||||
-rw-r--r-- | completions/kldload | 2 | ||||
-rw-r--r-- | completions/kldunload | 2 | ||||
-rw-r--r-- | completions/pgrep | 2 | ||||
-rw-r--r-- | completions/pkg_delete | 2 | ||||
-rw-r--r-- | completions/route | 3 | ||||
-rw-r--r-- | completions/watch | 3 | ||||
-rw-r--r-- | completions/wireless-tools | 2 |
8 files changed, 12 insertions, 10 deletions
diff --git a/bash_completion b/bash_completion index 63d76114..4e6f26a8 100644 --- a/bash_completion +++ b/bash_completion @@ -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 # diff --git a/completions/kldload b/completions/kldload index b4deff90..ddd103f3 100644 --- a/completions/kldload +++ b/completions/kldload @@ -1,6 +1,6 @@ # FreeBSD kldload completion -[ $UNAME = FreeBSD ] || return 1 +[[ $OSTYPE == *freebsd* ]] || return 1 _kldload() { diff --git a/completions/kldunload b/completions/kldunload index fa455414..3776e69c 100644 --- a/completions/kldunload +++ b/completions/kldunload @@ -1,6 +1,6 @@ # FreeBSD kldunload completion -[ $UNAME = FreeBSD ] || return 1 +[[ $OSTYPE == *freebsd* ]] || return 1 _kldunload() { diff --git a/completions/pgrep b/completions/pgrep index 616dc4ed..3c329ba2 100644 --- a/completions/pgrep +++ b/completions/pgrep @@ -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 diff --git a/completions/pkg_delete b/completions/pkg_delete index 522d3f42..40b7cc38 100644 --- a/completions/pkg_delete +++ b/completions/pkg_delete @@ -1,6 +1,6 @@ # bash completion for FreeBSD base package management tools -[ $UNAME = FreeBSD ] || return 1 +[[ $OSTYPE == *freebsd* ]] || return 1 _pkg_delete() { diff --git a/completions/route b/completions/route index 99526a80..72079e23 100644 --- a/completions/route +++ b/completions/route @@ -1,6 +1,7 @@ # Linux route(8) completion -[ $UNAME = Linux ] && +[[ $OSTYPE == *linux* ]] || return 1 + _route() { local cur prev words cword diff --git a/completions/watch b/completions/watch index d99658b7..025a47b2 100644 --- a/completions/watch +++ b/completions/watch @@ -1,6 +1,7 @@ # watch(1) completion -[[ $UNAME == Linux ]] && +[[ $OSTYPE == *linux* ]] || return 1 + _watch() { local cur prev words cword split diff --git a/completions/wireless-tools b/completions/wireless-tools index ea43baab..00ad3959 100644 --- a/completions/wireless-tools +++ b/completions/wireless-tools @@ -1,6 +1,6 @@ # bash completion for Linux wireless-tools -[ $UNAME = Linux ] || return 1 +[[ $OSTYPE == *linux* ]] || return 1 _iwconfig() { |