diff --git a/.bash_extra b/.bash_extra index 885897a..e8a1350 100644 --- a/.bash_extra +++ b/.bash_extra @@ -97,6 +97,17 @@ function m2m { # fi # fi #} + +function pwgen { + if [ -n "$1" ]; then + # Command ist notwendig da die Funktion genau wie das Binary heißt + # https://unix.stackexchange.com/questions/454553/bash-shadow-a-command-function-with-same-name-as-command + command pwgen --capitalize --num-passwords=1 --numerals --secure $1 + fi + if [ -z "$1" ]; then + command pwgen + fi +} function rgf { if [[ "$1" == "--help" ]]; then echo "Finde alle Dateien die "\$1" im Namen haben." @@ -231,7 +242,6 @@ alias mv="mv -i " alias cp="cp -i " alias rm="rm -i " # rest -alias rs="pwgen --capitalize --num-passwords=1 --numerals --secure 14" alias suspend="~/dotfiles/scripts/pwr.sh -sd" alias hibernate="~/dotfiles/scripts/pwr.sh -hb" alias restart="~/dotfiles/scripts/pwr.sh -r"