command help
This commit is contained in:
parent
b0d3274e5e
commit
68c6fe6acf
15
.bashrc
15
.bashrc
|
@ -139,11 +139,14 @@ gitpush() {
|
||||||
}
|
}
|
||||||
|
|
||||||
swp() {
|
swp() {
|
||||||
if [ "$1"="-h" ]; then
|
myhelp() {
|
||||||
echo 'This tool is usefull to remove .swp files'
|
echo 'This tool is usefull to remove .swp files'
|
||||||
echo 'Usage: swp [-d dir] [-noi]'
|
echo 'Usage: swp [-d dir] [-noi]'
|
||||||
echo 'if you do not specify the directory in -d param, search starts from the current'
|
echo 'if you do not specify the directory in -d param, search starts from the current'
|
||||||
echo 'if you do not specify the -noi param files removing is interactive'
|
echo 'if you do not specify the -noi param files removing is interactive'
|
||||||
|
}
|
||||||
|
if [ "$1" == '-h' ]; then
|
||||||
|
myhelp
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
cpath=.
|
cpath=.
|
||||||
|
@ -166,12 +169,15 @@ swp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
purgefext() {
|
purgefext() {
|
||||||
if [ "$1"="-h" ]; then
|
myhelp() {
|
||||||
echo 'This tool is usefull to remove specific files type'
|
echo 'This tool is usefull to remove specific files type'
|
||||||
echo 'Usage: purgefext -e ext [-d dir] [-noi]'
|
echo 'Usage: purgefext -e ext [-d dir] [-noi]'
|
||||||
echo 'the e param is mandatory: is the files extension you want to remove'
|
echo 'the e param is mandatory: is the files extension you want to remove'
|
||||||
echo 'if you do not specify the directory in -d param, search starts from the current'
|
echo 'if you do not specify the directory in -d param, search starts from the current'
|
||||||
echo 'if you do not specify the -noi param files removing is interactive'
|
echo 'if you do not specify the -noi param files removing is interactive'
|
||||||
|
}
|
||||||
|
if [ "$1" == '-h' ]; then
|
||||||
|
myhelp
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
cpath=.
|
cpath=.
|
||||||
|
@ -193,6 +199,11 @@ purgefext() {
|
||||||
shift #shift params
|
shift #shift params
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$ext" == '' ]; then
|
||||||
|
myhelp
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
find $cpath -name "*."$ext -exec rm $interactive {} \;
|
find $cpath -name "*."$ext -exec rm $interactive {} \;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue