diff options
| author | Blake Romero <blake@developercraft.com> | 2025-10-27 18:12:19 +0000 |
|---|---|---|
| committer | Blake Romero <blake@developercraft.com> | 2025-10-27 18:12:19 +0000 |
| commit | 1eb78e56cd17d34c2813938eb1707bc9fadf4b79 (patch) | |
| tree | 38a7f89aa594ff4a25a553b8e1e11e7e4e27dff0 /bash_aliases | |
Add bash aliases
Diffstat (limited to 'bash_aliases')
| -rw-r--r-- | bash_aliases | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/bash_aliases b/bash_aliases new file mode 100644 index 0000000..34e68a8 --- /dev/null +++ b/bash_aliases @@ -0,0 +1,58 @@ +#!/bin/bash +# +# BASH ALIASES +# + +# Better defaults +alias ls="ls -hvF --group-directories --color=auto" +alias rm="rm -iv" + +exists tree && alias tree="tree --dirsfirst" + +# Eza +if exists eza; then + alias ls="eza --group --group-directories-first" + alias tree="ls --tree" +fi + +# Git +if exists git; then + alias gs="git status" + alias gc="git commit" + alias gl="git log" + alias gll="git log --all" + alias gd="git diff" + alias gds="git diff --staged" + alias gu="git add --update" +fi + +# TMUX +if exists tmux; then + function tmux() { + if [ "$#" -eq 0 ]; then + command tmux new-session -s "TMUX" + else + command tmux "$@" + fi + } +fi + +# Podman +if exists podmand; then + alias pd="podman" + alias pdi="podman images ls" +fi + +# SSH +if exists ssh-agent; then + function ssh-on() { + ssh-agent -k &>/dev/null + eval $(ssh-agent) + [ "$#" -eq 0 ] && duration=0 + ssh-add -t "$duration" + } + function ssh-off() { + ssh-agent -k + } +fi + |
