Redo aliases
This commit is contained in:
parent
a97b4deb08
commit
4d5d851bff
41
zsh/aliases
41
zsh/aliases
|
@ -2,15 +2,19 @@
|
||||||
|
|
||||||
# GIT
|
# GIT
|
||||||
if command_exists 'git'; then
|
if command_exists 'git'; then
|
||||||
|
alias gi='git init'
|
||||||
alias ga='git add'
|
alias ga='git add'
|
||||||
alias gap='git add --patch'
|
alias gap='git add --patch'
|
||||||
alias gt='git tag'
|
alias gt='git tag'
|
||||||
alias gtl='git describe --tags --abbrev=0'
|
alias gtl='git describe --tags --abbrev=0'
|
||||||
alias gcu='git reset --soft "HEAD^"'
|
|
||||||
|
|
||||||
git-move-root() {
|
git-move-root() {
|
||||||
git filter-branch --subdirectory-filter "$@" --prune-empty -- --all
|
git filter-branch --subdirectory-filter "$@" --prune-empty -- --all
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git-undo-commit() {
|
||||||
|
git reset --soft "HEAD^"
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Tmux
|
# Tmux
|
||||||
|
@ -22,6 +26,30 @@ if command_exists 'tmux'; then
|
||||||
function tmux-send {
|
function tmux-send {
|
||||||
tmux send-keys -s "x" $1 Enter
|
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
|
fi
|
||||||
|
|
||||||
# OS-specific aliases
|
# OS-specific aliases
|
||||||
|
@ -45,6 +73,7 @@ if command_exists 'transmission-remote'; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alias va='vagrant'
|
alias va='vagrant'
|
||||||
|
alias r='noglob rake -g'
|
||||||
|
|
||||||
# Interpreters
|
# Interpreters
|
||||||
alias rbe='rbenv'
|
alias rbe='rbenv'
|
||||||
|
@ -55,21 +84,15 @@ alias py3='python3'
|
||||||
[ -e /Applications/love.app ] && alias love="/Applications/love.app/Contents/MacOS/love"
|
[ -e /Applications/love.app ] && alias love="/Applications/love.app/Contents/MacOS/love"
|
||||||
|
|
||||||
# Shell conveniences
|
# Shell conveniences
|
||||||
alias q='exit'
|
|
||||||
|
|
||||||
alias sha1='openssl sha1'
|
alias sha1='openssl sha1'
|
||||||
alias header='curl -I'
|
alias header='curl -I'
|
||||||
|
|
||||||
# Resume download if possible
|
# Resume download if possible
|
||||||
alias wget='wget -c'
|
alias wget='wget -c'
|
||||||
|
|
||||||
# Lets us sudo aliases
|
|
||||||
# alias sudo='sudo '
|
|
||||||
|
|
||||||
# Make a directory and change to it
|
# Make a directory and change to it
|
||||||
function mkd { mkdir "$@" && cd "$@" }
|
function mkd { mkdir "$@" && cd "$@" }
|
||||||
|
|
||||||
alias c='clear'
|
alias qq='exit'
|
||||||
alias r='noglob rake -g'
|
alias cc='clear'
|
||||||
|
|
||||||
# vim:set ft=zsh:
|
# vim:set ft=zsh:
|
||||||
|
|
Loading…
Reference in a new issue