aboutsummaryrefslogtreecommitdiffstats
path: root/commands/util.go
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2019-09-20 17:38:09 +0100
committerDrew DeVault <sir@cmpwn.com>2019-09-20 15:07:05 -0400
commit043a02d99d93441021788891d3f86c6fdeea22f0 (patch)
tree978fcba2206abaefd303ecde6baccdf067330648 /commands/util.go
parentd2a18e267c5d8908377d5a73172bd4313edc4891 (diff)
downloadaerc-043a02d99d93441021788891d3f86c6fdeea22f0.tar.gz
Sort path completions
Diffstat (limited to 'commands/util.go')
-rw-r--r--commands/util.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/util.go b/commands/util.go
index 81d2da6e..a5c30af2 100644
--- a/commands/util.go
+++ b/commands/util.go
@@ -6,6 +6,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "sort"
"strings"
"time"
@@ -94,6 +95,7 @@ func CompletePath(path string) []string {
}
}
+ sort.Strings(matches)
return matches
}
@@ -108,6 +110,7 @@ func CompletePath(path string) []string {
files[i] = f
}
+ sort.Strings(files)
return files
}