-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Create shopt settings during tab completion (Allow running bash-completion in YSH) #499
Comments
Instead of procs and functions having tags #1147 , we could do something like
Or maybe?
|
Um, I don't seem to understand the solution you posted, but I think you mentioned this issue in conjunction with calling functions from sourced libraries. I think that is an important feature. Does your idea help in doing that? |
So I believe that problem is impossible in general ... consider this:
Now you have two different call stacks:
Now you have a choice.
You might be able to argue that behavior 2 is OK. However my feeling now is that it's simply too confusing. The reason that completion works is that when you hit Also, completion codebases are self-contained. They don't really interact with other shell scripts. I believe the best way to interface OSH and Oil functions is by using the $0 dispatch pattern and separate processes Having a mixed call stack is way too confusing. With separate processes you have one set of options for the whole call stack And yes completion is almost like a different process -- it has a different call stack. A new one is created on every |
I guess a shorter way of saying this is that I don't want to debug any code with a mixed call stack :-/ It is not a gradual upgrade -- you can't just upgrade some functions, not upgrade other functions, and then call them altogether. That is madness :) Instead you have to So you go from one error handling paradigm to the other. Mixing them is bad You don't want to have some functions relying on |
This is problematic now because
shopt
flags are global.I think there should be a mode to tag functions with them.
Note that this applies to the
echo
builtin, which is affected byshopt -s simple_echo
. I think the function-specific options would work there.The text was updated successfully, but these errors were encountered: