vamolessa / pepper

simple and opinionated modal code editor for your terminal
https://vamolessa.github.io/pepper/
373 stars 15 forks source link

QoL feature: respect completion for aliases #14

Closed leahneukirchen closed 3 years ago

leahneukirchen commented 3 years ago

Just a minor thing, but would be nice to have (and probably not hard): When I use :open ... I get file completion, but when I use :o ... I don't. (Same for self-defined aliases.)

vamolessa commented 3 years ago

Are you using the latest(ish) commit from master? Yeah it's kinda frustrating the current alias support. At first I changed it so it would work kinda like bash aliases, so you would be able to: alias cmd "long-command some-arg some-another-arg". But then we lose info on auto complete. There's a chance we can fix this by only changing the auto-complete function. Otherwise, we may have to revert to aliases being only alternative command names.

leahneukirchen commented 3 years ago

Yes, latest HEAD. But I think you could expand the alias internally and then do the completion? E.g. zsh does this too.

vamolessa commented 3 years ago

You're right, that would work. However I'd like to first try a zero-copy solution! If that fails, I'll consider expanding any alias on each keystroke.

leahneukirchen commented 3 years ago

I guess expanding after the first time space is pressed would work, too?

vamolessa commented 3 years ago

I'll take a look into it in the next few days and then get back here

vamolessa commented 3 years ago

I think I got it working on 073c118 Please reopen if needed!