Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Suffixes and menu completion vs. menu selection



On Sep 20,  3:08pm, Andrej Borsenkow wrote:
} Subject: PATCH: _insert_all_matches bindable command
}
} there is subtle difference between menu completion and menu selection - menu
} selection adds space where menu completion does not. E.g.:
} 
} bor@itsrm2% l f*
} fOo   foO   foo
} 
} (selection)
} 
} bor@itsrm2% l fOo
} Completing file
} fOo   foO   foo
} (press `i')
} bor@itsrm2% l fOo i
} Completing file
} fOo   foO   foo
} 
} (completion)
} 
} bor@itsrm2% ls fOo
} Completing file
} fOo   foO   foo
} (press `i')
} bor@itsrm2% ls fOoi
} Completing file
} fOo   foO   foo
} 
} I would really prefer the same behaviour in both cases.

In the case of menu selection, you're actually choosing a match. In the
case of menu completion, you're disambiguating the ambiguous prefix.

You could argue that menu selection should abort, rather than accept, on
self-insert, and thus restore the original string to the command line
before inserting the `i', but it should not both accept a match and
append the inserted character to it without also first inserting the
usual completion suffix.  The current menu selection behavior, though,
is intended to interrupt your typing as little as possible (i.e. you
needn't explicitly hit RETURN to accept the selection).

If you're suggesting that the menu completion menu should include the
suffix for each of the matches, even when that suffix is a space (it
already e.g. appends the slash for directories), that might be another
matter -- but it'd be a change from the way zsh has behaved for years.
If I have `ls f*<TAB>" and that results in `ls fOo ' (note space) plus
a listing, what happens when I press SPACE TAB ?  What visual feedback
is there that `f*<TAB><SPACE><TAB>' is not the same as `f*<TAB><TAB>'?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author