Skip to content
This repository
Browse code

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.
  • Loading branch information...
commit bffae2a1e1a65ee09ec4080b9d8f8b14a3a5d9c2 1 parent 3bde23a
Erich Smith erichs authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/helpers.bash
4 lib/helpers.bash
@@ -74,7 +74,7 @@ disable-plugin ()
74 74 fi
75 75 done
76 76 else
77   - typeset plugin=$(ls $BASH_IT/plugins/enabled/$1.*bash 2>/dev/null | head -1)
  77 + typeset plugin=$(command ls $BASH_IT/plugins/enabled/$1.*bash 2>/dev/null | head -1)
78 78 if [ ! -h $plugin ]; then
79 79 printf '%s\n' 'sorry, that does not appear to be an enabled plugin.'
80 80 return
@@ -107,7 +107,7 @@ enable-plugin ()
107 107 fi
108 108 done
109 109 else
110   - typeset plugin=$(ls $BASH_IT/plugins/available/$1.*bash 2>/dev/null | head -1)
  110 + typeset plugin=$(command ls $BASH_IT/plugins/available/$1.*bash 2>/dev/null | head -1)
111 111 if [ -z "$plugin" ]; then
112 112 printf '%s\n' 'sorry, that does not appear to be an available plugin.'
113 113 return

0 comments on commit bffae2a

Please sign in to comment.
Something went wrong with that request. Please try again.