Permalink
Browse files

Quoted "H" to avoid global alias expansion in tmuxLog shell function.

  • Loading branch information...
msuriar committed Mar 19, 2012
1 parent 514f2f7 commit 8010d38f3e8ee7a66c08105bbf08df2aba271e68
Showing with 3 additions and 3 deletions.
  1. +3 −3 zsh/functions/tmuxLog
View
@@ -1,11 +1,11 @@
#!/bin/zsh
if [[ (-n $1 && -d $1 && -w $1) ]]; then
echo "Have argument $1, which is a writeable directory."
- tmux bind-key H pipe-pane -o "cat >> $1/#W.log" \\\; display-message "Toggled logging to $1/#W.log"
+ tmux bind-key 'H' pipe-pane -o "cat >> $1/#W.log" \\\; display-message "Toggled logging to $1/#W.log"
elif [[ -z $1 && -w $(pwd) ]]; then
echo "No argmuent, and current working directory is writeable."
- tmux bind-key H pipe-pane -o "cat >> $(pwd)/#W.log" \\\; display-message "Toggled logging to $(pwd)/#W.log"
+ tmux bind-key 'H' pipe-pane -o "cat >> $(pwd)/#W.log" \\\; display-message "Toggled logging to $(pwd)/#W.log"
else
echo "Falling back to ~"
- tmux bind-key H pipe-pane -o "cat >> $HOME/#W.log" \\\; display-message "Toggled logging to $HOME/#W.log"
+ tmux bind-key 'H' pipe-pane -o "cat >> $HOME/#W.log" \\\; display-message "Toggled logging to $HOME/#W.log"
fi

0 comments on commit 8010d38

Please sign in to comment.