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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
zoxide init ion #66
Comments
Ion definitely does look interesting, but I'm not familiar with the syntax. Is there a mechanism for prompt/pwd hooks? If you can make a PR adding Ion support, I would be happy to merge it! |
ion currently does not allow functions to be called with different numbers of args, unless the args are passed in as an array. So in practice, you'd need to write With that caveat, here is an
Adding a hook that calls |
@kolia I had a look at However, given that |
Sure I could make a PR. I鈥檝e also opened an issue for ion https://gitlab.redox-os.org/redox-os/ion/issues/962, alternatively we could wait and see if someone picks up on it. |
Yes, I too think waiting is a good idea for now. We can pick this up later if they decide against implementing variadic functions. Thank you for your work on this! |
@kolia @ajeetdsouza regarding the issue of adding the
|
@ajeetdsouza I have no idea what to do if a user supplied a For me in ion A this point I also think that it is problematic to implement ion support. For the ones that are interested in ion, at this point in time they should probaly put this manually into their shell. |
Let me summarize what to implement in the ion REPL as a sort of plan, once we get the grammar formally defined and the parser rewritten in a more robust way.
|
Hey @matu3ba, thanks for the update!
How so? I didn't exactly understand the alternative you proposed, could you elaborate?
Admittedly, designing a shell is much harder than designing a programming language, because you have to ensure that it's easy enough for anyone to read/write, concise enough to be able to do a lot of work in a single line of code, and yet powerful enough to write scripts with. I have no experience with programming language design, but I'm interested - could you explain why the |
You want to (over)write the shell configuration to have defined entry- and exit-points from what the shell is doing (on user keypress), since that is way simpler, has less delay etc.
And fast for the use case (batch processing = nu or individual processing = ion). Other shells use more tradeoffs (zsh, bash etc), but are still complex beasts. Or they are okay with being slower (fish). Dash is comparable (with less functionality), but it is very difficult to safely optimise C code (and you get some parsing+evaluation overhead of POSIX shell requirements).
Copy-assign is always slower, since you need to allocate a not efficiently precomputable space (depends on context of execution). Hence you want Personally, I would also like to restrict the access to other scopes, but that are some rules for the longer future to do. And thats too slow+complex to do in every parsing for execution. Another, way simpler, parser could be used for that. |
Hm, doesn't the absence of |
let var:int = 1;
let stuff:int = 2;
fn testme
let var:int = 3;
mut stuff = 42;
echo $var
end
testme
echo $var
echo $stuff 3
1
42 We could also use |
I'm closing this issue for now. The related Ion issue (https://gitlab.redox-os.org/redox-os/ion/-/issues/834) has been open 4 years without a conclusion, so it's unlikely we'll be able to support it in the near future. Feel free to reopen / create a new issue once Ion adds enough functionality / stability to support something like this. |
Would be nice to support ion shell too 馃懠.
The text was updated successfully, but these errors were encountered: