purge fext

This commit is contained in:
Amber 2020-11-17 10:57:44 +01:00
parent a1cacd1ca3
commit b5a2566b63
1 changed files with 41 additions and 1 deletions

42
.bashrc
View File

@ -139,9 +139,49 @@ gitpush() {
} }
swp() { swp() {
find ${1-~} -name *.swp -exec rm -i {} \; cpath=.
interactive='-i'
while [ -n "$1" ]; do # while loop starts
case "$1" in
-noi) interactive='';;
-d) if [[ -d "$2" ]]; then
cpath="$2"
else
echo Folder "$2" not exists
fi
shift;;
*) echo "Option $1 not recognized" ;;
esac
shift #shift params
done
find $cpath -name "*."swp -exec rm "$interactive" {} \;
} }
purgefext() {
cpath=.
interactive='-i'
ext=''
while [ -n "$1" ]; do # while loop starts
case "$1" in
-noi) interactive='';;
-d) if [[ -d "$2" ]]; then
cpath="$2"
else
echo Folder "$2" not exists
fi
shift;;
-e) ext="$2"
shift;;
*) echo "Option $1 not recognized" ;;
esac
shift #shift params
done
find $cpath -name "*."$ext -exec rm $interactive {} \;
}
man() { man() {
env \ env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \ LESS_TERMCAP_mb=$(printf "\e[1;31m") \