psk entfernt, rgi/rgf überarbeitet
This commit is contained in:
parent
a7a4970eed
commit
0b61c98659
1 changed files with 4 additions and 19 deletions
23
.bash_extra
23
.bash_extra
|
@ -85,21 +85,6 @@ function m2m {
|
|||
fi
|
||||
fi
|
||||
}
|
||||
#function psk {
|
||||
# if [[ "$1" == "--help" ]]; then
|
||||
# echo "Beende Prozess "\$1""
|
||||
# echo ""
|
||||
# echo " Usage: psk <prozessname>"
|
||||
# else
|
||||
# if [ -z "$1" ]; then
|
||||
# echo "[ERROR] Prozessname fehlt..."
|
||||
# else
|
||||
# ps -ef | grep "$1" | grep -v grep | awk '{ print $2 }' | xargs kill -9
|
||||
# fi
|
||||
# fi
|
||||
#}
|
||||
|
||||
|
||||
function rgf {
|
||||
if [[ "$1" == "--help" ]]; then
|
||||
echo "Finde alle Dateien die "\$1" im Namen haben."
|
||||
|
@ -112,10 +97,10 @@ function rgf {
|
|||
return 1
|
||||
fi
|
||||
if command -v rg >/dev/null ; then
|
||||
rg --files -g *"$1"* --hidden
|
||||
rg --ignore-case --files --hidden --glob=!.git/ *"$1"*
|
||||
else
|
||||
echo "[INFO] ripgrep ist nicht installiert... suche mit 'find'"
|
||||
find . -type f -name *"$1"*
|
||||
find . -type f -not -path '*/\.git/*'; -name *"$1"*
|
||||
fi
|
||||
}
|
||||
function rgi {
|
||||
|
@ -130,10 +115,10 @@ function rgi {
|
|||
return 1
|
||||
fi
|
||||
if command -v rg >/dev/null ; then
|
||||
rg -i "$1"
|
||||
rg --ignore-case --hidden --glob=!.git/ "$1"
|
||||
else
|
||||
echo "[INFO] ripgrep ist nicht installiert... suche mit 'grep'"
|
||||
grep -r -n -i "$1" .
|
||||
grep --recursive --line-number --ignore-case --exclude-dir=".git" "$1" .
|
||||
fi
|
||||
}
|
||||
function ssh {
|
||||
|
|
Loading…
Reference in a new issue