Permalink
Browse files

Updating makelos autocompletion script to support both local ./makelo…

…s and global makelos calls
  • Loading branch information...
1 parent 9a025f5 commit 343db63b01be4bbae38d508a5523c67a2306d30f @bermi bermi committed Jun 19, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 README.markdown
View
@@ -250,17 +250,21 @@ with the following code
# work-around for the same issue.
colonprefixes=${cur%"${cur##*:}"}
arguments=("${COMP_WORDS[@]:1}")
- COMPREPLY=( $(compgen -W '$(./makelos makelos:autocomplete \
+ COMPREPLY=( $(compgen -W '$($1 makelos:autocomplete \
${arguments[@]})' -- $cur))
local i=${#COMPREPLY[*]}
while [ $((--i)) -ge 0 ]; do
COMPREPLY[$i]=${COMPREPLY[$i]#"$colonprefixes"}
done
return 0
} &&
-
-complete -o bashdefault -o default -F _makelos ./makelos 2>/dev/null \
+
+ complete -o bashdefault -o default -F _makelos ./makelos 2>/dev/null \
|| complete -o default -F _makelos ./makelos
+
+ complete -o bashdefault -o default -F _makelos makelos 2>/dev/null \
+ || complete -o default -F _makelos makelos
+
cd to your app dir in a new prompt and enjoy makelos autocompletion.

0 comments on commit 343db63

Please sign in to comment.