From a4f4526748482fd8c08a132d4dcb4762fc111041 Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Wed, 19 Mar 2008 21:25:37 -0500 Subject: remove_parameters was not doing The Right Thing. Rewrote parameter removal loop to try and fix that. --- pm/pm-functions.in | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'pm') 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() { -- cgit v1.2.3