1
0
Fork 0

shells: some cleanup for bash and zsh

This commit is contained in:
Von Random 2025-03-04 14:00:46 +02:00
parent ebf583cb5a
commit e898af0e0d
4 changed files with 8 additions and 43 deletions

View file

@ -1,4 +1,4 @@
# shellcheck shell=bash disable=SC1090
# shellcheck shell=bash disable=SC1090,SC2164
[[ $- != *i* ]] && return
HISTSIZE=1000
@ -14,9 +14,6 @@ export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
PS1='\[\e[0m\][ \u@\h \[\e[34m\]\w\[\e[0m\] ]\n\$ '
beep() { printf "\007"; }
fixterm() { printf "\u001bc"; }
diff() { command diff --color "$@"; }
tailf() { command less +F "$@"; }
rgrep() { command grep --exclude-dir=\.git -R "$@"; }
@ -34,7 +31,7 @@ gci() { command git commit "$@"; }
gsl() { command git stash list "$@"; }
gss() { command git status -sbu "$@"; }
gup() { command git pull "$@"; }
groot() { cd "$(command git rev-parse --show-cdup)" || return 1; }
groot() { cd "$(command git rev-parse --show-cdup)"; }
ggrep() { command git grep "$@"; }
gsi() { command tig status; }
@ -42,9 +39,6 @@ gsi() { command tig status; }
tmux() { command tmux -2 "$@"; }
atmux() { tmux attach; }
# sudo
sush() { command sudo -Es; }
# bash-completion
completion_path='/usr/share/bash-completion/bash_completion'
[[ -r "$completion_path" ]] && source "$completion_path"