peterh / liner

Pure Go line editor with history, inspired by linenoise
MIT License
1.05k stars 132 forks source link

looping completion #11

Closed rif closed 10 years ago

rif commented 10 years ago

one liner

peterh commented 10 years ago

Thanks for the patch!

I hope you don't mind, but I took the liberty of writing an expanded log message, and making completion circular for both tab and shift-tab. See 8c0d7e0731fd974ad6dfd6d479e7691128ccbe4e

rif commented 10 years ago

You missed my home/end runes commit and context sensitive history.

The latter is a very nice feature from fish and zsh that show only those commands from history that start with the letters you typed when pressing up arrow.

peterh commented 10 years ago

You're right. I did miss those. They weren't there when you first opened the pull request, and there weren't any comments to draw my attention to them. I'll review those changes now.

peterh commented 10 years ago

Your home/end runes commit broke the letters "H" and "F". I've committed an alternate fix. Thanks for the bug report.

Context-sensitive history is great! Thanks. I've cherry-picked this commit and pushed it out.

I was going to commit a further change to only recalculate the history when it needs to (instead of on every letter), but I was unable to measure a performance difference on my 7 year old computer, so I deleted my change.