env/roles/shell-tweaks/files/shell_extras

72 lines
1.1 KiB
Text
Raw Normal View History

################
# ALIASES #
################
# TMUX things.
# Lists all sessions
alias ts="tmux ls"
# Attaches to session with name $1
alias ta="tmux attach -t $1"
# Create new session with provided name.
alias tm="tmux new -s $1"
# VIM/NVIM things.
# All roads lead to nvim.
alias vim=nvim
2024-01-28 16:23:07 +00:00
alias ghpr="gh pr create -w"
##############
# FUNCTIONS #
##############
# Autoupdates the env setup.
function env_autoupdate {
SHELL_CONFIG_PATH="$HOME/.zshrc"
{
cd ~/.env_goodies
git pull
source $SHELL_CONFIG_PATH
cd -
}
}
# Inspects available aliases based on a grep query.
function which_alias {
alias | grep $1
}
#############
# EXPORTS #
#############
# Ensures that passphrases can be entered when signing
# git commits.
export GPG_TTY=$(tty)
2024-05-20 20:13:14 +00:00
############
# CONFIG #
############
# Basic ZSH things.
export ZSH="/home/marc/.oh-my-zsh"
ZSH_THEME="lambda"
plugins=(git)
# OMZ configuration.
source $ZSH/oh-my-zsh.sh
#Initialize Starship prompt
eval "$(starship init zsh)"
unsetopt autocd
# Local binaries.
export PATH=$PATH:$HOME/.local/bin