Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 8010d38f3e8ee7a66c08105bbf08df2aba271e68 1 parent 514f2f7
@msuriar authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 zsh/functions/tmuxLog
View
6 zsh/functions/tmuxLog
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.