Fix fd on ubuntu/debian

This commit is contained in:
crater2150 2023-12-14 16:56:10 +01:00
parent b578fc04d9
commit 16e5256542

View file

@ -16,13 +16,17 @@ alias 7zu="7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
alias cronmail="mutt -f $MAIL" alias cronmail="mutt -f $MAIL"
if ! command -v fd >/dev/null; then if ! command -v fd >/dev/null; then
if command -v fdfind >/dev/null; then
alias fd="fdfind"
else
fd() { fd() {
if [[ "$1" =~ "-*" ]]; then if [[ "$1" =~ "^-" ]]; then
echo "fd not installed. shell alias supports only basic operation" echo "fd not installed. shell alias supports only basic operation"
return 1 return 1
fi fi
noglob find . -iname "*${*}*" noglob find . -iname "*${*}*"
} }
fi
fi fi
alias sudo="sudo " alias sudo="sudo "