-
Notifications
You must be signed in to change notification settings - Fork 356
feat: override builtin commands #2334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hello @joelim-work. What it could solve: Altering the behaviour of builtin commands while also inheriting their command line completions. This could allow for better integration of tools like Just wanting to know whether this idea might be worth to explore further or not. |
|
This sounds a lot like I tried your patch but doesn't allow redefining |
|
It was intended to work just like the You are right about the map expression, I did not consider it (that was the one thing I did not test and just assumed...). |
|
Apart from |
Think of advanced aliases that are functions and not just text substitution (that is how aliases work in |
|
It sounds like you're not satisfied with the existing As for keeping completions, this probably is just part of the larger feature request of having custom completions, whether it is by allowing the user to define their own from scratch, or by piggybacking off an existing command. The idea of having custom completions does sounds rather niche to me (I barely even use the command line myself during everyday usage, let alone tab completions), and I don't recall anyone actually requesting such a feature. If this kind of feature is implemented, will you consider other niche use cases, such as redefining |
|
This PR was more about replacing builtin commands while also inheriting its completion. I do like and use completions all the time (as you can probably tell by now). In terms of improving them for custom commands, I have this completely separate idea, which would also allow for custom command descriptions, which is something users actually request: I completely agree with your points and really don't want to add features without thinking them through which will only every benefit myself and bloat In general, my mind always seems to race from one topic to another (also besides programming). I love exploring many different things. That is why I often come up with many different ideas (which sometimes even contradict each other). I hope I don't bother you too much will all the drafts etc. |
|
I'm going to assume that the main purpose of this PR is to inherit completions, and not about overriding existing command names which can be worked around by choosing a different name like I'm not saying that it's impossible to implement more advanced behavior for customizing completion logic - any kind of feature can be implemented if code is written for it. It's just that I don't value it as much when considering the cost-benefit ratio. In comparison, You are welcome to keep this PR around and/or start a discussion to see if other users have anything else to say on the topic. A couple of other points in this PR I forgot to mention:
|
No description provided.