Fix fd on ubuntu/debian
This commit is contained in:
parent
b578fc04d9
commit
16e5256542
|
@ -16,13 +16,17 @@ alias 7zu="7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on"
|
|||
alias cronmail="mutt -f $MAIL"
|
||||
|
||||
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 "*${*}*"
|
||||
}
|
||||
if command -v fdfind >/dev/null; then
|
||||
alias fd="fdfind"
|
||||
else
|
||||
fd() {
|
||||
if [[ "$1" =~ "^-" ]]; then
|
||||
echo "fd not installed. shell alias supports only basic operation"
|
||||
return 1
|
||||
fi
|
||||
noglob find . -iname "*${*}*"
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
alias sudo="sudo "
|
||||
|
@ -159,7 +163,7 @@ prenumbering() {
|
|||
for i in "$@"; do
|
||||
mv $i ${(l:2::0:)n}_$i;
|
||||
((n++));
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# appends given suffix (first argument)
|
||||
|
|
Loading…
Reference in a new issue