purge fext
This commit is contained in:
parent
a1cacd1ca3
commit
b5a2566b63
42
.bashrc
42
.bashrc
|
@ -139,9 +139,49 @@ gitpush() {
|
|||
}
|
||||
|
||||
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() {
|
||||
env \
|
||||
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
|
||||
|
|
Loading…
Reference in New Issue