-
Notifications
You must be signed in to change notification settings - Fork 400
completions: invoke "cd" as "builtin cd" #528
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
Conversation
|
Hm, I don't think I've heard of I've resisted changes like this, because one could make the same argument for pretty much any command out there leading to prefixing everything which would be annoying. In some cases would not be the right thing to do either, because there might be very real reasons for why something is aliased and having bash-completion use it is desirable. If there is a case why we'd like to do this for |
For some simple aliases, maybe you can search with I also wrote my own, being inspired by some blog article (it is about ten years ago, so I don't remember the page. Anyway it was written in Japanese). Also, I have received in my project a report on the problem caused by alias/function
There seem to be also discussions on
I think that is because these aliases and functions usually preserve the visible behavior of
builtin
I think
I don't think these interactive features (history recording, automatic corrections/expansions, etc.) are wanted for internal completions by users.
OK, I don't have particular preferences on them so will make them |
That's right. But with this I was trying to refer to blanket |
|
Anyway, thank you for the references, I'm sold on it now :) Let's have a look after #527 as you said. |
e5b5937 to
cac9293
Compare
|
I have updated to use |
cac9293 to
b7c68e1
Compare
|
Thanks! |
In searching the uses of
cdcommand in completions, I found thatcdis directly called instead of throughbuiltin cd. The builtincdis one of the commands that users define an alias or a function (to save the visited directory, etc.). I suggest prefixing them withbuiltinkeyword.I searched for the policy of
bash-completionon this kind of treatment and found inCONTRIBUTING.mdthe following item:So I think we should also apply this rule to
cdbuiltin. (By the way, I found that so far no builtin commands have been prefixed bybuiltinin any completions, socdis the first one).I have also added a rule to
test/runLint. There are a few false positives, and manycdin test codes. If we should also prefixcdin test codes, please let me know. Then, I will add them.