Misc. code cleanup and minor improvement to help command

This commit is contained in:
2013-06-02 20:27:28 +03:00
parent bf6969ba37
commit bd585ca2bb
2 changed files with 7 additions and 6 deletions

View File

@@ -20,13 +20,12 @@ has-completions() {
grep -i "^# Provide tmuxifier completions" "$1" >/dev/null
}
command="$1"
if [ -z "$command" ]; then
if [ -z "$1" ]; then
echo "$(tmuxifier-help completions)" >&2
exit 1
fi
! command_path="$(tmuxifier-resolve-command-path "$command")"
! command_path="$(tmuxifier-resolve-command-path "$1")"
if [ -n "$command_path" ] && has-completions "$command_path"; then
shift