Skip to content

Instantly share code, notes, and snippets.

@saikrn112
Last active January 14, 2026 21:00
Show Gist options
  • Select an option

  • Save saikrn112/b9d16ad838fc240fe7370697039eb56c to your computer and use it in GitHub Desktop.

Select an option

Save saikrn112/b9d16ad838fc240fe7370697039eb56c to your computer and use it in GitHub Desktop.
alias lt='ls -lrth'
alias gs='git status'
alias ga='git add'
alias gc='git commit'
alias gco='git checkout'
alias gcf='git clean -fd'
alias gb='git branch'
alias gcfo='git checkout . && git clean -df'
alias gd='git diff'
alias gg='git graph'
pid() { ps -fu "$USER" | grep -F -- "$1" | grep -v grep; }
# tmux helpers
tml() {
tmux ls 2>/dev/null || echo "no tmux sessions"
}
tma() {
[ -z "${1:-}" ] && { echo "usage: tma <name>"; return 1; }
tmux has-session -t "$1" 2>/dev/null && tmux attach -t "$1" || tmux new -s "$1"
}
if [ -n "${ZSH_VERSION:-}" ]; then
bindkey '^[[1;3D' backward-word
bindkey '^[[1;3C' forward-word
if zle -l history-substring-search-up >/dev/null 2>&1; then
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey '^P' history-substring-search-up
bindkey '^N' history-substring-search-down
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment