diff options
author | Robin Jarry <robin@jarry.cc> | 2023-10-03 21:47:54 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-10-28 19:24:29 +0200 |
commit | a2a692e7736ef82627eae885d17024d92e33cb4a (patch) | |
tree | 0233f4091055683677daf1d5282f880a9b5237fd | |
parent | 900d7da296f12081946666c82973f408d9d5f5aa (diff) | |
download | aerc-a2a692e7736ef82627eae885d17024d92e33cb4a.tar.gz |
lib: remove unused ShellQuote function
This function is not used anywhere. Remove it.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Tested-by: Inwit <inwit@sindominio.net>
-rw-r--r-- | lib/format/format.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/format/format.go b/lib/format/format.go index 9a675ef0..7c2d5f64 100644 --- a/lib/format/format.go +++ b/lib/format/format.go @@ -91,23 +91,6 @@ func TruncateHead(s string, w int, head string) string { return head + s[pos:] } -func ShellQuote(args []string) string { - quoted := make([]string, len(args)) - - for i, arg := range args { - if strings.ContainsAny(arg, " '\"|&!#$;[](){}<>*\n\t") { - if strings.ContainsAny(arg, "!\"$") { - arg = "'" + arg + "'" - } else { - arg = "\"" + arg + "\"" - } - } - quoted[i] = arg - } - - return strings.Join(quoted, " ") -} - func DummyIfZeroDate(date time.Time, format string, todayFormat string, thisWeekFormat string, thisYearFormat string, ) string { |