aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-10-03 21:47:54 +0200
committerRobin Jarry <robin@jarry.cc>2023-10-28 19:24:29 +0200
commita2a692e7736ef82627eae885d17024d92e33cb4a (patch)
tree0233f4091055683677daf1d5282f880a9b5237fd
parent900d7da296f12081946666c82973f408d9d5f5aa (diff)
downloadaerc-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.go17
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 {