From c48fff0322149fe9bbf07763f933640a931c4124 Mon Sep 17 00:00:00 2001 From: Frank Dietrich Date: Thu, 8 Mar 2018 08:08:50 +0100 Subject: [PATCH 1/3] merge consecutive calls to sed --- goto.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goto.bash b/goto.bash index 7c3b9a2..bd11ecd 100644 --- a/goto.bash +++ b/goto.bash @@ -198,7 +198,7 @@ function _goto_find_alias_directory() { local resolved - resolved=$(sed -n "/^$1 /p" ~/.goto 2>/dev/null | sed 's/[^ ]* //') + resolved=$(sed -n "s/^$1 \(.*\)/\1/p" ~/.goto 2>/dev/null) echo "$resolved" } From ff75b024b4846e482b6881f88e9dac17c4941c80 Mon Sep 17 00:00:00 2001 From: Frank Dietrich Date: Thu, 8 Mar 2018 08:18:27 +0100 Subject: [PATCH 2/3] typo fix --- goto.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goto.bash b/goto.bash index bd11ecd..ed20fda 100644 --- a/goto.bash +++ b/goto.bash @@ -97,7 +97,7 @@ function _goto_expand_directory() cd "$1" 2>/dev/null && pwd } -# Lists regstered aliases. +# Lists registered aliases. function _goto_list_aliases() { local IFS=$'\n' From 21da83518fede47a90dbf2eef15dbe08a12233e4 Mon Sep 17 00:00:00 2001 From: Lazarus Lazaridis Date: Thu, 8 Mar 2018 16:10:37 +0200 Subject: [PATCH 3/3] Fix shellcheck warning. Comply with https://github.com/koalaman/shellcheck/wiki/SC1117 --- goto.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goto.bash b/goto.bash index ed20fda..b31ee73 100644 --- a/goto.bash +++ b/goto.bash @@ -198,7 +198,7 @@ function _goto_find_alias_directory() { local resolved - resolved=$(sed -n "s/^$1 \(.*\)/\1/p" ~/.goto 2>/dev/null) + resolved=$(sed -n "s/^$1 \\(.*\\)/\\1/p" ~/.goto 2>/dev/null) echo "$resolved" }