From bffae2a1e1a65ee09ec4080b9d8f8b14a3a5d9c2 Mon Sep 17 00:00:00 2001 From: Erich Smith Date: Sun, 20 May 2012 13:18:04 -0400 Subject: [PATCH] fix for issue #136 issue #136 was found to be caused by an aliased 'ls' command that generated rogue values for 'plugin' in the enable/disable-plugin() functions. this commit fixes that by forcing the shell to disregard aliased 'ls' commands. --- lib/helpers.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/helpers.bash b/lib/helpers.bash index d0c16b8..dfd64b0 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -74,7 +74,7 @@ disable-plugin () fi done else - typeset plugin=$(ls $BASH_IT/plugins/enabled/$1.*bash 2>/dev/null | head -1) + typeset plugin=$(command ls $BASH_IT/plugins/enabled/$1.*bash 2>/dev/null | head -1) if [ ! -h $plugin ]; then printf '%s\n' 'sorry, that does not appear to be an enabled plugin.' return @@ -107,7 +107,7 @@ enable-plugin () fi done else - typeset plugin=$(ls $BASH_IT/plugins/available/$1.*bash 2>/dev/null | head -1) + typeset plugin=$(command ls $BASH_IT/plugins/available/$1.*bash 2>/dev/null | head -1) if [ -z "$plugin" ]; then printf '%s\n' 'sorry, that does not appear to be an available plugin.' return -- 2.17.1