3 ms·
Thanks, that's really fun to hear. ACK on the command substitution not working, with the current lexer that I have in place fixing this isn't easy and might ta
by idank 13y ago
Thanks, that's really fun to hear.
ACK on the command substitution not working, with the current lexer that I have in place fixing this isn't easy and might take a while. But it's definitely up there on my todos.
Yeah, long pipelines are somewhat of a problem. You can currently navigate the commands with the buttons at the top, maybe they're not visible enough.
But I like the idea of being able to pin a particular line by pressing it, but I fear it might be a bit subtle and easy to miss.
- jfasi 13y agoI liked one idea submitted: having the command pin to the top of the screen on scroll down. It would be tricky to make happen with the hover effect for the boxes, though.
- idank 13y agoYes, I had this suggested on numerous occasions and gave it a go a while ago and it's indeed not trivial. If a JS wiz would like to hack on this I'll gladly help and accept it.
- drothlis 13y agoDo you have any thoughts, or writings that you could point me to, regarding shell's parseability? For example, is it possible to parse a shell script without running it? Would it be possible to extract Bash's lexer+parser into a stand-alone library to be used by IDEs?
- idank 13y agoYes, you can parse without executing. I think shell is easier to parse than it seems, there are definitely some nuances that might be tricky to emulate, but I guess it's a matter of effort and how far you're willing to go. For syntax highlighting in IDEs, you probably don't need much, and maybe even a few regexs can get you close enough. I actually spent a considerable amount of time going over bash's parser [0], and also zsh's [1]. Bash uses lex/yacc with some custom code. zsh seems to have a custom written lexer/parser. Unfortunately none of them were written to be used as a library, as evident by global state, and a lot of hooks for prompts while parsing, etc. It might be possible to somehow make it work, but it seems like a lot of work to me. You might have an easier time looking at the parser I wrote, and extending that, or rewriting it in another language (as it's fairly small compared to the ones you find in shells). There's also libbash [2], haven't looked closely though. [0]: http://git.savannah.gnu.org/cgit/bash.git/tree/parse.y http://git.savannah.gnu.org/cgit/bash.git/tree/parse.y [1]: https://github.com/zsh-users/zsh/blob/master/Src/parse.c https://github.com/zsh-users/zsh/blob/master/Src/parse.c [2]: http://www.gentoo.org/proj/en/libbash/ http://www.gentoo.org/proj/en/libbash/
- Groxx 13y agoYeah, the buttons are not visible enough IMO. I didn't even notice them (nor connect them to the output) until you mentioned it. Also, maybe hook them up to the arrow keys on the keyboard? Same problem with scrolling for large lists.