5 ms·
Elvish author here, AMA :)
by xiaq 6y ago
Elvish author here, AMA :)
- ilaksh 6y agoHello. Looks amazing. How does the command completion compare to fish? That's the feature I like about fish because it seems very predictive. But just the other day I needed to parse JSON from curl or whatever and ended up writing a Node.js script which would have been unnecessary with Elvish.
- xiaq 6y agoElvish has a really simple API for writing completers (https://elv.sh/ref/edit.html#completion-api https://elv.sh/ref/edit.html#completion-api). The simplicity of the API stems from some fundamental language features like first-class functions, value pipes and composite data types. In more traditional shells without these language features (including fish), the completer API is usually made up of obscure naming conventions, specialized command for outputting candidates and controlling the format, etc. I think Elvish's simple completer API (which is very similar to completion protocols used by editors, FWIW) is proof that serious programming capabilities is actually quite essential for a shell. You wouldn't write editor plugins using bash, but people have to write completers and other shell plugins in bash all the time. However, what would affect your day to day experience the most is probably the coverage of existing completers. There are some community efforts you can find in https://github.com/elves/awesome-elvish#completion-scripts https://github.com/elves/awesome-elvish#completion-scripts, but it's quite clear that Elvish is lagging behind. This is mostly because I'm still trying to figure out a lot of things in the language itself, and I don't want people to invest a lot of completers before they get broken by language changes. Once the language becomes more stable (which will perhaps take another year or so) I'll invest much more in this area.
- warent 6y agoThis is really exciting. I've been using zsh for years but would probably change to this shell with better completions and theming.
- ilaksh 6y agoThe API looks awesome. But when I tried it just now, I see no color in the terminal, and it does not have anything like the completion I see in fish. I don't know if you have tried it but fish basically predicts what you are going to enter based on the directory you are in and what you have entered before and gives a preview as you are typing, and then you can hit the right arrow to complete it. Since that is extremely convenient for me and your shell seems to not have color (at least not in my Ubuntu terminal right now), I am going to stick with fish.
- weinzierl 6y ago> "There are some community efforts you can find in https://github.com/elves/awesome-elvish#completion-scripts https://github.com/elves/awesome-elvish#completion-scripts, but it's quite clear that Elvish is lagging behind." clap-rs, which is a popular command line parser for Rust, can generate Elvish completion scripts automatically and it works really well. Maybe you want to add that to the list.
- gdsdfe 6y agokudos for the website
- xiaq 6y agoThanks! Is there anything you particularly like, and anything that can be improved?
- bovermyer 6y agoHow does Elvish compare to Powershell, at least in philosophy?
- xiaq 6y agoElvish and PowerShell shares one big thing: let command outputs carry structured value. Everything else is quite different: * Elvish is a more minimalist language influenced by the Lisp tradition, whereas PowerShell is a much larger language with its own distinct "flavor" (in a good way; the language has some quirks but seems decent overall). * PowerShell has a lot of integration with the .NET ecosystem and Windows APIs. Elvish obviously has none of those. * Elvish has a pretty sophisticated UI, whereas PowerShell seems to lag behind a bit in UI features. Getting back to philosophy, it seems to me that the development PowerShell is largely driven by facilitating common Windows sysadmin tasks, and the team seems to have some very concrete use cases in mind. On the other hand, the design of Elvish has two main tenets, one theoretical and one practical: make a good programming language that is still "shell like", and make a powerful flexible UI suitable for daily use.
- andreareina 6y ago> Elvish is a more minimalist language influenced by the Lisp tradition, whereas PowerShell is a much larger language with its own distinct "flavor" (in a good way; the language has some quirks but seems decent overall). Could you expand on what you mean by this? It sounds like you're conflating the size of the language with some measure of lispiness, but Common Lisp for example is huge.
- KuhlMensch 6y agoIs there a road map?
- yumaikas 6y agoSo, trying out elvish a bit tonight, I've noticed that there are a lot of little quirky places that whitespace is significant in elvish? One example is lambda syntax. Do you have any plans on making that less of a thing, or is it here to stay?
- weinzierl 6y agoI dabbled a bit with Elvish recently and enjoyed it. What I found harder than I expected it to be was getting an initial configuration to my liking. While the documentation is excellent I find that it lacks some kind of beginners tutorial for plain users. The Fundamentals section is a good intro to the language but what I wanted to know more as a newbie was that my startup file is expected to be ~/.elvish/rc.elv, for example. It's all there but the basic info could be more prominent in the docs in my opinion. Otherwise I'm happy with Elvish, thanks for the good work.