Make better use of conditional operators and quote vars properly

This commit is contained in:
2012-04-30 02:14:35 +01:00
parent 1fc854dbdd
commit 178bbdecff
4 changed files with 9 additions and 9 deletions

View File

@@ -20,7 +20,7 @@ fi
! command_path="$(tmuxifier-resolve-command-path "$command")"
if [ ! -z "$command_path" ] && has-completions "$command_path"; then
if [ -n "$command_path" ] && has-completions "$command_path"; then
shift
exec "$command_path" --complete "$@"
fi

View File

@@ -2,7 +2,7 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x
if [ ! -z $TMUX ]; then
if [ -n "$TMUX" ]; then
for item in $(tmux list-sessions -F "#{?session_attached,1,0}:#S"); do
if [[ "$item" == "1:"* ]]; then
echo ${item/1:/}