From daa4a0e7bf798d147e661194eb9ebddd143881af Mon Sep 17 00:00:00 2001 From: Ian Henry Date: Sun, 5 Dec 2021 09:05:48 -0800 Subject: [PATCH] fix --new when run without an initial script It was creating a file in the current directory, instead of the ~/sd directory. --- sd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sd b/sd index c6f0a65..3e22623 100755 --- a/sd +++ b/sd @@ -148,7 +148,7 @@ EOF chmod +x "$script" if [[ -z "$body" ]]; then - __sd_edit "${command_path[@]}" + __sd_edit "$script" fi } @@ -214,7 +214,7 @@ sd() ( __sd_new "$target" "$@" exit 0 elif [[ "$found_edit" = "true" ]]; then - __sd_edit "$target" "$@" + __sd_edit "$target" exit 0 elif [[ "$found_cat" = "true" ]]; then __sd_cat "$target"