4 ms·
FWIW, POSIX emulation is on my TODO list: https://github.com/elves/elvish/issues/205 https://github.com/elves/elvish/issues/205 Not sure whether I will actuall
by xiaq 9y ago
FWIW, POSIX emulation is on my TODO list: https://github.com/elves/elvish/issues/205 https://github.com/elves/elvish/issues/205
Not sure whether I will actually get to it though. Parsing sounds like a lot of headache. Your work is very impressive, but I’m not sure I will want to go through that... :)
- chubot 9y agoYeah, running ~/.bashrc is tough, and I'm not sure even Oil will get to it. Not only do you need parsing and execution of the bash language, but you also need builtins like bind and set -o vi (i.e. see "help bind"). Maybe bind is easier than I think; maybe it's just a few readline calls. I haven't looked into it. But also, I noticed almost no shell scripts use extended globs like @(foo|bar), whereas the bash-completions package uses them EVERYWHERE. Completion scripts are almost like a different dialect than other shell scripts. If you want to source /etc/bashrc on most distros, you're going to end up with thousands and thousands of lines of plugins from the bash-completions project. The parsing is a big headache, but I think it forced me to learn how people use shell, which will benefit Oil. It's been a full year since our alternative shells thread... might be time to revive it and see what's changed! Congrats on the Elvish releases!
- xiaq 9y agoGood point about bindings and completion scripts. Binding commands themselves are not big problems, the problem is replicating readline commands, there are loads of those. I'm not sure how much work one needs to do to implement things like extended globbing, but my gut feeling is that once you can parse them it's more than half done. The functionalities are quite simple, as my impression goes. I was mainly thinking about environment variables, aliases and wrapper functions when I said sourcing bashrc; that's probably what most people's bashrc files are mostly made of. We totally should revive our alternative shells thread! I'll try to summarize my progress in the last year. Congrats on your progress with Oil too! ^_^