bash: housekeeping
This commit is contained in:
parent
61edb91dd5
commit
fab85b0ebb
1 changed files with 1 additions and 39 deletions
40
.bash_extra
40
.bash_extra
|
@ -52,6 +52,7 @@ export LESS_TERMCAP_us=$'\E[01;36m'
|
|||
|
||||
# bash history bei mehreren Session
|
||||
shopt -s histappend
|
||||
|
||||
# bach History Zeitstempel am Anfang der Zeile
|
||||
export HISTTIMEFORMAT='[%F_%T] '
|
||||
|
||||
|
@ -66,37 +67,6 @@ export LESS='--mouse --wheel-lines=3 eFRX'
|
|||
unalias ll 2>/dev/null
|
||||
|
||||
### Funktionen
|
||||
function sgc {
|
||||
case "$1" in
|
||||
--help)
|
||||
echo "Suche in der kompletten git-history nach "\$1""
|
||||
echo ""
|
||||
echo " Usage: sgc <Suchbegriff>"
|
||||
;;
|
||||
"")
|
||||
echo "[ERROR] Suchbegriff fehlt..."
|
||||
;;
|
||||
*)
|
||||
git grep "$1" "$(git rev-list --all)"
|
||||
esac
|
||||
}
|
||||
function m2m {
|
||||
if [[ "$1" == "--help" ]]; then
|
||||
echo "Sende Datei "\$2" per Mail; Betreff = "\$1""
|
||||
echo ""
|
||||
echo " Usage: m2m <Pfad zu Datei> <Betreff>"
|
||||
else
|
||||
if [ ! -f "$2" ]; then
|
||||
echo "[ERROR] Dateipfad fehlt..."
|
||||
else
|
||||
if [ -z "$1" ]; then
|
||||
echo "[ERROR] Betreff fehlt..."
|
||||
else
|
||||
echo "$1" | mail -s "$1" -A "$2" michael.grote@posteo.de
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
function rgf {
|
||||
if [[ "$1" == "--help" ]]; then
|
||||
echo "Finde alle Dateien die "\$1" im Namen haben."
|
||||
|
@ -211,7 +181,6 @@ alias tmuxn="tmux new -s "
|
|||
alias tmuxl="tmux ls"
|
||||
alias tmuxk="tmux kill-session -t"
|
||||
# abkuerzungen
|
||||
alias se="sudoedit"
|
||||
alias ip="ip --color=auto"
|
||||
alias cls="clear"
|
||||
alias tracert="traceroute"
|
||||
|
@ -221,7 +190,6 @@ alias grep="grep -i --color=auto"
|
|||
alias hostname="hostname -f"
|
||||
alias untar="tar -xzf"
|
||||
alias unmount="umount"
|
||||
alias psk="pkill"
|
||||
alias ru="rip url --max-quality 3 --codec fla"
|
||||
alias mkdir="mkdir -p"
|
||||
alias last="last -w"
|
||||
|
@ -234,13 +202,10 @@ alias gdel="git add . && git stash && git stash clear"
|
|||
alias glast="git log -1 HEAD --stat"
|
||||
alias gd="git diff"
|
||||
alias gsp="git stage -p"
|
||||
# vim
|
||||
alias v="view"
|
||||
# docker
|
||||
alias dcu="docker-compose up"
|
||||
alias dcd="docker-compose down"
|
||||
alias dcr="docker-compose down && docker-compose up -d"
|
||||
alias lzd="docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock lazyteam/lazydocker"
|
||||
# safeguard
|
||||
alias mv="mv -i "
|
||||
alias cp="cp -i "
|
||||
|
@ -251,6 +216,3 @@ alias hibernate="~/dotfiles/scripts/pwr.sh -hb"
|
|||
alias restart="~/dotfiles/scripts/pwr.sh -r"
|
||||
alias shutdown="~/dotfiles/scripts/pwr.sh -s"
|
||||
alias reboot="~/dotfiles/scripts/pwr.sh -r"
|
||||
# k3s
|
||||
alias k="sudo kubectl"
|
||||
export KUBECONFIG="/etc/rancher/k3s/k3s.yaml"
|
||||
|
|
Loading…
Reference in a new issue