Skip to content

Commit

Permalink
zsh new alias for ghq
Browse files Browse the repository at this point in the history
  • Loading branch information
shyouhei committed Apr 12, 2017
1 parent f462d7e commit 09f6821
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions zsh/tmux.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,23 @@ function ssh_in_tmux() {
tmux new-window -n "$host" ssh -At "$host" "$@"
}

function ghq_in_tmux() {
case $1 in
look)
noglob tmux new-window -n "$2" -- ghq "$@"
;;
*)
command ghq "$@"
;;
esac
}

function() {
[[ -n $TMUX ]] || return

local i
alias ssh=ssh_in_tmux
alias ghq=ghq_in_tmux

compdef _env tmux_fulltitle

Expand Down

0 comments on commit 09f6821

Please sign in to comment.