From 09f682136ba9ff0da891275cc2e9fa9731c1bb51 Mon Sep 17 00:00:00 2001 From: "Urabe, Shyouhei" Date: Wed, 12 Apr 2017 17:46:53 +0900 Subject: [PATCH] zsh new alias for ghq --- zsh/tmux.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zsh/tmux.zsh b/zsh/tmux.zsh index 487a5d8..9adb380 100644 --- a/zsh/tmux.zsh +++ b/zsh/tmux.zsh @@ -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