From b1b77f25742f7e6862cc2775c8bb0423beb42ea5 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Tue, 4 Dec 2018 07:40:29 -0800 Subject: [PATCH] Revert "Change shebang to /bin/bash" This reverts commit 94d60a376718ffe005ed5880c07b407edfb94e2b. --- audiotrim.sh | 2 -- cptemplate.sh | 2 -- ef.sh | 2 -- fedit.sh | 9 +-------- quickdel.sh | 3 +-- 5 files changed, 2 insertions(+), 16 deletions(-) diff --git a/audiotrim.sh b/audiotrim.sh index 328e425..24fe491 100755 --- a/audiotrim.sh +++ b/audiotrim.sh @@ -1,8 +1,6 @@ #!/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] diff --git a/cptemplate.sh b/cptemplate.sh index cb92bd8..7869625 100755 --- a/cptemplate.sh +++ b/cptemplate.sh @@ -5,8 +5,6 @@ # - fd # - fzf -set -o nounset - printHelp() { cat << EOF Usage: cptemplate [-h,--help] [options] [filename] diff --git a/ef.sh b/ef.sh index 2ac382a..1327bfd 100755 --- a/ef.sh +++ b/ef.sh @@ -5,8 +5,6 @@ # - fzf # - mlocate -set -o nounset - printHelp() { cat << done Usage: ef [-h|--help] [-E|--editor editor] [patterns] diff --git a/fedit.sh b/fedit.sh index 15fdc5e..ebe5c09 100755 --- a/fedit.sh +++ b/fedit.sh @@ -13,7 +13,6 @@ 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 } @@ -24,7 +23,6 @@ readonly noeditor_error="Error, no editor entered" # Pre-run correctness checks unset fd_opts file= -find_cmd='fd' dir= editor= @@ -92,11 +90,6 @@ while true; do printHelp exit ;; - '-l'|'--locate') - find_cmd='locate --all --ignore-case --null' - shift - continue - ;; --) shift break @@ -120,7 +113,7 @@ if [[ "${dir}" ]]; then fd_opts+=('.' '--' "${dir}") fi -file="$("${find_cmd}" "${fd_opts[@]}" | fzf --read0 --select-1 --exit-0)" +file="$(fd "${fd_opts[@]}" | fzf --read0 --select-1 --exit-0)" [[ ! "${file}" ]] && exit 1 diff --git a/quickdel.sh b/quickdel.sh index 00fc1bb..f7d4509 100755 --- a/quickdel.sh +++ b/quickdel.sh @@ -3,8 +3,6 @@ # Dependencies: # fd -set -o nounset - printHelp() { cat << EOF Fuzzy find and delete files matching patterns @@ -22,6 +20,7 @@ EOF # Pre-run correctness checks unset files unset fd_opts +ans= declare -a files declare -a fd_opts