From 417936620ee0a397deff19c07a5e11febdc271f9 Mon Sep 17 00:00:00 2001 From: Steven Saus Date: Mon, 28 Sep 2020 15:28:56 -0400 Subject: [PATCH] Fixed issue with sr recursively calling itself --- sr.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sr.sh b/sr.sh index ca9b3a8..8280eff 100755 --- a/sr.sh +++ b/sr.sh @@ -22,7 +22,7 @@ if [[ "${FirstVar}" == "-g" ]];then fi # read in array of elvi -readarray -t sr_elvi < <(sr -elvi | awk '{print $1}') +readarray -t sr_elvi < <("${Binary}" -elvi | awk '{print $1}') # Was the elvi specified on the command line? if [[ " ${sr_elvi[@]} " =~ " ${FirstVar} " ]]; then @@ -33,7 +33,7 @@ fi # use fzf to determine which elvi to use if [[ ! " ${sr_elvi[@]} " =~ " ${FirstVar} " ]]; then - Elvi=$(sr -elvi | fzf --multi | awk '{print $1}') + Elvi=$("${Binary}" -elvi | fzf --multi | awk '{print $1}') # If nothing selected, assume it's the default and pass it all to sr if [ -z "${Elvi}" ];then