Add match_prev_cmd strategy and fix default strategy #131

Merged
merged 2 commits into from Mar 5, 2016

2 participants

@gezalore

Re-raised #129 as requested. There is also a bugfix for the default strategy. Feedback is welcome.

gezalore added some commits Mar 1, 2016
@gezalore gezalore Fix default suggestion strategy and add testing 17d8d40
@gezalore gezalore Add match_prev_cmd strategy.
A new suggestion strategy 'match_prev_cmd' is available. This is a bit
more context aware variaton on the default strategy.
The suggestion will be:
- The newest history entry that matches the current prefix, AND
- Whose preceding history entry also matches the previously executed
command.

See src/strategies/match_prev_cmd.zsh for an example.
fa4f9d0
@ericfreese
zsh-users member

Thanks for this. Looks like good stuff! Will dig in a bit deeper as I have time over the next few days.

@ericfreese ericfreese merged commit 722374f into zsh-users:features/suggestion_strategies Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment