aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-10-03 21:47:54 +0200
committerRobin Jarry <robin@jarry.cc>2023-10-03 22:34:39 +0200
commita99e0f007ead1d427465efe987294c19ed2f26f2 (patch)
treea61c4a1a7cd6e35017a83478a68dbab546160dc1
parent61bca76423ee87bd59084a146eca71c6bae085e1 (diff)
downloadaerc-a99e0f007ead1d427465efe987294c19ed2f26f2.tar.gz
aerc-a99e0f007ead1d427465efe987294c19ed2f26f2.zip
lib: remove unused ShellQuote function
Signed-off-by: Robin Jarry <robin@jarry.cc>
-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 {