peterh / liner

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

Add an example for filepath tab completion #156

Closed krasi-georgiev closed 1 year ago

krasi-georgiev commented 2 years ago

Would you consider adding an example for a prompt that auto completed file names on tab presses?

peterh commented 2 years ago

I would consider adding such an example if it is small and to the point. My main concern is that proper filesystem access often requires much error checking, which might make the example more about the filesystem access and less about liner.

krasi-georgiev commented 2 years ago

Could you share some code here as a starting point and I will use it to see if it turns out to be working well or not

peterh commented 2 years ago

Sorry, I misunderstood. I thought you offering to write an example for others.

krasi-georgiev commented 2 years ago

yeah I thought this is a common feature so was hoping someone already wrote it.