From 4d5d851bff8e94c3f332faeb70a286c65f8de685 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Aug 2014 03:27:32 -0400 Subject: [PATCH] Redo aliases --- zsh/aliases | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index 386376b2..d4bf4a36 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -2,15 +2,19 @@ # GIT if command_exists 'git'; then + alias gi='git init' alias ga='git add' alias gap='git add --patch' alias gt='git tag' alias gtl='git describe --tags --abbrev=0' - alias gcu='git reset --soft "HEAD^"' git-move-root() { git filter-branch --subdirectory-filter "$@" --prune-empty -- --all } + + git-undo-commit() { + git reset --soft "HEAD^" + } fi # Tmux @@ -22,6 +26,30 @@ if command_exists 'tmux'; then function tmux-send { tmux send-keys -s "x" $1 Enter } + + if command_exists 'irssi'; then + function tmux-irssi-nickpane { + tmux renamew irssi # name the window + tmux -q setw main-pane-width $(( $(tput cols) - 21)) # set the main pane width to the total width-20 + tmux splitw -v "cat ~/.irssi/nicklistfifo" # create the window and begin reading the fifo + tmux -q selectl main-vertical # assign the layout + tmux selectw -t irssi # select window 'irssi' + tmux selectp -t 0 # select pane 0 + } + + function tmux-irssi { + tmux-irssi-nickpane + $(which irssi) # launch irssi + } + + # repair running irssi's nicklist pane + function tmux-irssi-repair() { + tmux selectw -t irssi + tmux selectp -t 0 + tmux killp -a # kill all panes + irssi_nickpane + } + fi fi # OS-specific aliases @@ -45,6 +73,7 @@ if command_exists 'transmission-remote'; then fi alias va='vagrant' +alias r='noglob rake -g' # Interpreters alias rbe='rbenv' @@ -55,21 +84,15 @@ alias py3='python3' [ -e /Applications/love.app ] && alias love="/Applications/love.app/Contents/MacOS/love" # Shell conveniences -alias q='exit' - alias sha1='openssl sha1' alias header='curl -I' - # Resume download if possible alias wget='wget -c' -# Lets us sudo aliases -# alias sudo='sudo ' - # Make a directory and change to it function mkd { mkdir "$@" && cd "$@" } -alias c='clear' -alias r='noglob rake -g' +alias qq='exit' +alias cc='clear' # vim:set ft=zsh: