fish_config: fix binding filter regression (#3327)

This commit is contained in:
Jin Liu 2016-08-24 03:30:33 -05:00 committed by Aaron Gyes
parent a872d9c299
commit 476ffe12f6

View file

@ -25,8 +25,16 @@ filters.filter("filterBinding", function() {
for(i=0; i<bindings.length; ++i) {
binding = bindings[i];
if (binding.command.indexOf(query) != -1 || binding.readable_binding.toLowerCase().indexOf(query.toLowerCase()) != -1) {
if (binding.command.indexOf(query) != -1) {
result.push(binding);
continue;
}
varieties = binding.bindings;
for (j=0; j<varieties.length; ++j) {
if (varieties[j].readable_binding.toLowerCase().indexOf(query.toLowerCase()) != -1) {
result.push(binding);
break;
}
}
}