diff options
author | Ulrich Müller <ulm@gentoo.org> | 2014-08-28 14:53:42 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2014-08-28 14:53:42 +0200 |
commit | 759fb65536efbd7efd171d0fb8e461d192b5c0d9 (patch) | |
tree | 37561d6e38335a846b1db0768bcca91dd4d72597 /libs | |
parent | eselect.bashcomp: Improve handling of options followed by an equals sign. (diff) | |
download | eselect-759fb65536efbd7efd171d0fb8e461d192b5c0d9.tar.gz eselect-759fb65536efbd7efd171d0fb8e461d192b5c0d9.tar.bz2 eselect-759fb65536efbd7efd171d0fb8e461d192b5c0d9.zip |
Remove redundant $@ in "for" loops throughout.
* libs/core.bash.in (inherit):
* libs/tests.bash.in (has):
* modules/config.eselect (generic_handle_one_file, accept_handler)
(merge_handler, display_handler):
* modules/news.eselect (find_items, do_list, do_read, do_unread):
* modules/rc.eselect (run_runscript, do_show): Remove redundant $@
in "for" loops throughout.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/core.bash.in | 2 | ||||
-rw-r--r-- | libs/tests.bash.in | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/core.bash.in b/libs/core.bash.in index 1384188..cc263b8 100644 --- a/libs/core.bash.in +++ b/libs/core.bash.in @@ -111,7 +111,7 @@ do_action() { # Sources a given eselect library file inherit() { local x - for x in "$@"; do + for x; do [[ -e ${ESELECT_CORE_PATH}/${x}.bash ]] \ || die "Couldn't find ${x}.bash" source "${ESELECT_CORE_PATH}/${x}.bash" \ diff --git a/libs/tests.bash.in b/libs/tests.bash.in index eeafc94..8fb8559 100644 --- a/libs/tests.bash.in +++ b/libs/tests.bash.in @@ -20,7 +20,7 @@ has() { local test=${1} item shift - for item in "$@" ; do + for item; do [[ ${item} == ${test} ]] && return 0 done return 1 |