complete: support -k (--keep-files) in printed completions

This commit is contained in:
Aaron Gyes 2019-09-19 02:01:33 -07:00
parent 7302dcc12b
commit e9ee2fb089

View File

@ -1686,6 +1686,9 @@ wcstring complete_print() {
const option_list_t &options = e.get_options(); const option_list_t &options = e.get_options();
for (const complete_entry_opt_t &o : options) { for (const complete_entry_opt_t &o : options) {
out.append(L"complete"); out.append(L"complete");
if (o.flags & COMPLETE_DONT_SORT) append_switch(out, L'k');
if (o.result_mode.no_files && o.result_mode.requires_param) { if (o.result_mode.no_files && o.result_mode.requires_param) {
append_switch(out, L'x'); append_switch(out, L'x');
} else if (o.result_mode.no_files) { } else if (o.result_mode.no_files) {