aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-31 15:01:02 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-31 15:01:02 -0700
commitc38a40d1930d0af2f0d078896fe02fd0bee5fabd (patch)
tree2e70a5cbdd863bde7373ffaa9972a0cd5aaa0c10 /expand.cpp
parent23ba7b5bfff9393d222cd8e4a045e3439e24aba1 (diff)
Adjust prefix completions to sort alphabetically instead of by length.
Other completions are still sorted by length. https://github.com/fish-shell/fish-shell/issues/923
Diffstat (limited to 'expand.cpp')
-rw-r--r--expand.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/expand.cpp b/expand.cpp
index dc83c385..9dfe5026 100644
--- a/expand.cpp
+++ b/expand.cpp
@@ -1766,7 +1766,7 @@ int expand_string(const wcstring &input, std::vector<completion_t> &output, expa
case 1:
{
res = EXPAND_WILDCARD_MATCH;
- sort_completions(expanded);
+ std::sort(expanded.begin(), expanded.end(), completion_t::is_alphabetically_less_than);
out->insert(out->end(), expanded.begin(), expanded.end());
break;
}