diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-03-19 21:25:37 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-03-19 21:29:37 -0500 |
commit | a4f4526748482fd8c08a132d4dcb4762fc111041 (patch) | |
tree | a5d5d46c13664c30e12dfcb8544e0c5ce43bb467 /pm/pm-functions.in | |
parent | 0129bc69e33523c9746a44fb4a78e25579acecb8 (diff) |
remove_parameters was not doing The Right Thing.
Rewrote parameter removal loop to try and fix that.
Diffstat (limited to 'pm/pm-functions.in')
-rw-r--r-- | pm/pm-functions.in | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/pm/pm-functions.in b/pm/pm-functions.in index a0895f5..7461087 100644 --- a/pm/pm-functions.in +++ b/pm/pm-functions.in @@ -82,16 +82,17 @@ load_hook_blacklist() } remove_parameters() { - local x="" - for p in $PM_CMDLINE; do - [ "$1" = "$p" ] && { - log "Removing parameter $1." - continue - } - x="$x $p" - [ "$2" ] && shift + local x y + for p in "$@"; do + for x in $PM_CMDLINE; do + [ "$x" = "$p" ] && { + log "Removing parameter $x." + continue + } + y="$y $x" + done + PM_CMDLINE="$y" done - PM_CMDLINE="$x" } add_parameters() { |