|
|
@ -269,6 +269,7 @@ mainScript() { |
|
|
|
dogit=0 |
|
|
|
dogit=0 |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
case "${args[0]}" in |
|
|
|
case "${args[0]}" in |
|
|
|
deepsearch) deepSearch "${args[@]:1}"; safeExit ;; |
|
|
|
deepsearch) deepSearch "${args[@]:1}"; safeExit ;; |
|
|
|
del|delete) deleteFile "${args[@]:1}"; safeExit ;; |
|
|
|
del|delete) deleteFile "${args[@]:1}"; safeExit ;; |
|
|
@ -374,7 +375,7 @@ unset options |
|
|
|
|
|
|
|
|
|
|
|
# Print help if no arguments were passed. |
|
|
|
# Print help if no arguments were passed. |
|
|
|
# Uncomment to force arguments when invoking the script |
|
|
|
# Uncomment to force arguments when invoking the script |
|
|
|
[[ $# -eq 0 ]] && set -- "--help" |
|
|
|
#[[ $# -eq 0 ]] && set -- "--help" |
|
|
|
|
|
|
|
|
|
|
|
# Read the options and set stuff |
|
|
|
# Read the options and set stuff |
|
|
|
while [[ $1 = -?* ]]; do |
|
|
|
while [[ $1 = -?* ]]; do |
|
|
@ -401,6 +402,10 @@ done |
|
|
|
# Store the remaining part as arguments. |
|
|
|
# Store the remaining part as arguments. |
|
|
|
args+=("$@") |
|
|
|
args+=("$@") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if no arguments or options are passed, assume fuzzy as default |
|
|
|
|
|
|
|
[ "${#args[@]}" -eq 0 ] && args+=("fuzzy") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
############## End Options and Usage ################### |
|
|
|
############## End Options and Usage ################### |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|