Update fd function

This commit is contained in:
crater2150 2019-07-08 16:07:46 +02:00
parent 3b385fdf19
commit b3e900cae7

View file

@ -13,10 +13,14 @@ alias :q="exit"
alias rget="rsync -rP --append-verify --inplace"
alias 7zu="7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
if command -v fd >/dev/null; then
alias f="fd"
else
f() { noglob find . -iname "*${*}*" }
if ! command -v fd >/dev/null; then
fd() {
if [[ "$1" =~ "-*" ]]; then
echo "fd not installed. shell alias supports only basic operation"
return 1
fi
noglob find . -iname "*${*}*"
}
fi
alias sudo="sudo "