Change shebang to /bin/bash
This commit is contained in:
parent
ae1b2801cf
commit
94d60a3767
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Trim an audio file given a startpoint and an endpoint
|
||||
|
||||
set -o nounset
|
||||
|
||||
printHelp() {
|
||||
cat << EOF
|
||||
Usage: audiotrim [input file] [start time] [stop time] [output file]
|
||||
|
@ -5,6 +5,8 @@
|
||||
# - fd
|
||||
# - fzf
|
||||
|
||||
set -o nounset
|
||||
|
||||
printHelp() {
|
||||
cat << EOF
|
||||
Usage: cptemplate [-h,--help] [options] [filename]
|
||||
|
2
ef.sh
2
ef.sh
@ -5,6 +5,8 @@
|
||||
# - fzf
|
||||
# - mlocate
|
||||
|
||||
set -o nounset
|
||||
|
||||
printHelp() {
|
||||
cat << done
|
||||
Usage: ef [-h|--help] [-E|--editor editor] [patterns]
|
||||
|
9
fedit.sh
9
fedit.sh
@ -13,6 +13,7 @@ Options:
|
||||
-e, --etc edit a file in /etc
|
||||
-E, --editor use a given editor (default: ${EDITOR:-none})
|
||||
-h, --help print this help page
|
||||
-l, --locate use locate to search for files
|
||||
EOF
|
||||
}
|
||||
|
||||
@ -23,6 +24,7 @@ readonly noeditor_error="Error, no editor entered"
|
||||
# Pre-run correctness checks
|
||||
unset fd_opts
|
||||
file=
|
||||
find_cmd='fd'
|
||||
dir=
|
||||
editor=
|
||||
|
||||
@ -90,6 +92,11 @@ while true; do
|
||||
printHelp
|
||||
exit
|
||||
;;
|
||||
'-l'|'--locate')
|
||||
find_cmd='locate --all --ignore-case --null'
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
@ -113,7 +120,7 @@ if [[ "${dir}" ]]; then
|
||||
fd_opts+=('.' '--' "${dir}")
|
||||
fi
|
||||
|
||||
file="$(fd "${fd_opts[@]}" | fzf --read0 --select-1 --exit-0)"
|
||||
file="$("${find_cmd}" "${fd_opts[@]}" | fzf --read0 --select-1 --exit-0)"
|
||||
|
||||
[[ ! "${file}" ]] && exit 1
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
# Dependencies:
|
||||
# fd
|
||||
|
||||
set -o nounset
|
||||
|
||||
printHelp() {
|
||||
cat << EOF
|
||||
Fuzzy find and delete files matching patterns
|
||||
@ -20,7 +22,6 @@ EOF
|
||||
# Pre-run correctness checks
|
||||
unset files
|
||||
unset fd_opts
|
||||
ans=
|
||||
|
||||
declare -a files
|
||||
declare -a fd_opts
|
||||
|
Loading…
x
Reference in New Issue
Block a user