9 ms·
Elvish: friendly and expressive shell for Linux, macOS and BSDs
- caio1982 9y agoDo its arithmetic operations use some sort of polish notation or am I missing something clever here?
- simcop2387 9y agoLooks more lisp like. It's treating the operations as commands that you pass arguments to
- xiaq 9y agoIt is lisp-like, and I am going to make the old arguments that it is actually superior because it supports multiple arguments :) ~> + 1 7 6 324 234 ▶ 572
- guftagu 9y agoNice! That file manager looks awesome!
- voltagex_ 9y agoLooks interesting, but it's got some rough edges: https://github.com/elves/elvish/issues/364 https://github.com/elves/elvish/issues/364
- voltagex_ 9y agoIs there anything that implements the file browsing for bash or zsh? Edit: https://github.com/chadj2/bash-ui https://github.com/chadj2/bash-ui
- deleted 9y ago[deleted]
- fdw 9y agoYou might like [ranger]. Also similar to the history feature are [autojump] and [fzf] [ranger]: http://ranger.nongnu.org/ http://ranger.nongnu.org/ [autojump]: https://github.com/wting/autojump https://github.com/wting/autojump [fzf]: https://github.com/junegunn/fzf https://github.com/junegunn/fzf
- partycoder 9y agohttps://stedolan.github.io/jq/ https://stedolan.github.io/jq/ is good for filtering json in a similar manner.
- mifix 9y agoA way to get the same output as the first example, would be: curl -s https://api.github.com/repos/elves/elvish/issues | jq -r '.[] | [(.number|tostring), .title] | join(": ")'
- microcolonel 9y agoThe shell I've really been looking for is basically fish-but-bash. All the feedback and usability of fish, with bash compatible syntax. Bash's syntax may be a lecherous growth upon a lecherous growth, but at least it's a familiar leech.
- georgyo 9y agoHave you tried zsh with oh-my-zsh?
- myhf 9y agoDoes that have anything like syntax highlighting or dim text typeahead suggestions and completions? https://fishshell.com/assets/img/screenshots/autosuggestion.png https://fishshell.com/assets/img/screenshots/autosuggestion....
- symlinkk 9y ago> Pipelines in Elvish can carry structured data, not just text. You can stream lists, maps and even functions through the pipeline. Sounds like Powershell.
- throwanem 9y agoLooks a bit like it, too, if only in that regard. No criticism, though. Powershell is brilliant, and I'm glad to see the Unix world starting to take cues from it.
- mwj 9y ago"Powershell is brilliant" Wot? Ugly syntax, cryptic error messages and random idiosyncrasies like misplaced semicolons turning variables into lists... The language is a nightmare.
- ianai 9y agoBuuuut there's definite room for improvement in unix pipes.
- flukus 9y agoI see the point and to a certain extent agree in theory. But every improvement feels like it's improved on something that just didn't need to be improved, some things become easier, but others become worse. Along the way the simplicity of text streams becomes lost. I can see a case where passing around structured data could make sense, but Powershell definitely takes things to far by passing around full .net classes that have functionality.
- Gaelan 9y ago“Simplicity of text streams” This is a common complaint about PS/elvish/etc, but I’m not sure it makes sense. Is that “simple text stream” tab delimited data? CSV? JSON? XML? At the end of the day, what you have isn’t just a “simple” text stream; you have a more complex data structure serialized into text, which will need to be parsed by each command in the pipeline for any non-trivial processing.
- hossbeast 9y ago"Elvish has no concept of exit status. Instead, it has exceptions that, when thrown, interrupt the flow of execution." ... "Non-zero exit status from external commands are turned into exceptions" You had me up until this point.
- hota_mazi 9y agoWhat's wrong with that?
- enz 9y agoIt is similar to `set -o errexit` in Bash, I guess.
- vortico 9y agoBut think of how useful this would be in a complex-hierarchy shell system. Some commands might fail when processing in the tree, and you might want to just remove that one leaf instead of halt further processing of data in another part of the tree.
- noway421 9y agoTheir web site is beautiful. Static served over h2 with regional POPs from cloudflare provides seamless experience between pages, and that's with no javascript. After first load it caches and literally takes less than a frame to switch between pages. It feels like an SPA.
- reitanqild 9y agoFrontenders: take note! This is the next step logical step in the frontend evolution. All javascript can now be minified to zero bytes [0]. This can result in a significant improvement in asset load times as well as render times. Furthermore, by following the process backwards developers can save time in the build process. I'm also happy to announce that this new technology is supported by all major browsers that anyone will ever want to use: Firefox, Chrome, Opera, Edge, lynx etc. (PS: there are also significant improvements waiting in accessibility and SEO.) Sincerly, Greybeard Fullstacker [0]: for more details about how this can happen see the papers linked here: https://www.google.no/search?q=html+spec https://www.google.no/search?q=html+spec
- allover 9y ago> Frontenders: take note! Frontend communities have been building their docs as static sites forever. You aren't telling 'frontenders' anything they don't know here.
- reitanqild 9y agoWho should we blame in your opinion?
- BoorishBears 9y agoNo one, it's not productive
- reitanqild 9y agoSo what should we do to end this massive abuse of js in places where it isn't needed?
- shellbackground 9y agoMy super-quick checklist for new shells consist of only one point: does it decently support background tasks? It seems that none of recently emerged shells had that point in their design: - elvish: no (https://github.com/elves/elvish/issues/193 https://github.com/elves/elvish/issues/193). - xonsh: no (https://github.com/xonsh/xonsh/issues/1959 https://github.com/xonsh/xonsh/issues/1959). - fish: no (https://github.com/fish-shell/fish-shell/issues/238 https://github.com/fish-shell/fish-shell/issues/238).
- xiaq 9y agoAuthor here, happy to answer questions. :)
- vidarh 9y agoI love the structured pipes, but as mentioned in another discussion, replacing the shell is a big leap for a lot of people. And you can get quite far without it with tools like "jq". And when I saw this, I just had to tinker a bit to see what I could do with Ruby, based on the example on the homepage: $ curl -s https://api.github.com/repos/elves/elvish/issues | jr 'each{|issue| puts "#{issue["number"]}: #{issue["title"]}"} ' | head -n 11 Or (I expect pitchforks when you see the implementation for this): $ curl -s https://api.github.com/repos/elves/elvish/issues | jr 'puts{"#{$I["number"]}: #{$I["title"]}"}' | head -n 11 With "jr" looking like this[1]. Expect this to fall apart in all kinds of ways - it was just something I threw together. Not convinced the monkey-patched "puts" is worth it, but it's just an experiment.. [1] https://gist.github.com/vidarh/d088d6e342e665f0b6554ec4fbaa5e53 https://gist.github.com/vidarh/d088d6e342e665f0b6554ec4fbaa5...
- yAnonymous 9y agoI use JSON, because it's simple yet powerful. Command line JSON tools seem to have a very convoluted syntax and that kinda defeats the whole purpose.
- vidarh 9y agoI don't think there's a whole lot more we can achieve beyond what you see there... I mean, I guess you could dynamically assign global variables based on the keys, and enforce treating them as strings, so you could reduce it to jr 'puts{$number+": "+$title}' E.g by changing the "each" in my example with: def each █ $J.each do |i| $I = i; i.keys.each {|k| eval("$#{k} = $I[k].to_s")} block.call(i) end end Though this is error prone - e.g. if the key collides with any pre-defined Ruby globals like $stdin... Would probably be worth using a prefix etc.. This is the downside to using a general purpose language for stuff like this instead of a specialised tool like jq which can ignore other syntax concerns..
- gravypod 9y ago> Pipeline is the main tool for function composition. To make pipelines suitable for complex data manipulation, Elvish extends them to be able to carry structured data (as opposed to just bytes). Well that is definitely interesting.... Are there any examples? I was writing a compiler that worked by pipelining different stages to different parts of the compiler (tokenizer -> parser -> AST) all using unix pipes. I had to stop and do something productive once I realized I couldn't pipe complex datatypes easily without a lot of effort to parse the inputs. I'd love to see an example of this.
- BoorishBears 9y agoSounds a lot like Powershell
- agumonkey 9y agoin a way lisp OSes too, they didn't serialize data at all, it was single space pointer passing (with all the issues it creates)
- TheAceOfHearts 9y agoThis looks really neat. There's way too little experimentation happening in shells. Most shells are a few decades old, and they provide incredibly poor defaults and tooling. For example, since I'm prone to making stupid mistakes, I always use a linter. But as far as I know, there weren't any well known options for linting until ShellCheck [0]. Personally, I've been using fish for a while now and I'm generally happy with it. It has great defaults, so I rarely have to tweak anything. Hacking together small scripts is easy, leaving very little room for error. If I have to do anything event remotely tricky, I use node with shelljs [1]. Now that async functions are available, it results in some pretty clean scripts. And although I haven't tried it yet, the pkg [2] tool allows you to bundle things up into a single binary. That should make certain deployments incredibly easy. Circling back to Elvish, one minor detail that immediately stood out to me was that they create another folder in your home folder. Since I dislike the ever-growing clutter in my home, I created a GitHub issue asking them to consider following the XDG base directory spec [3]. [0] https://www.shellcheck.net https://www.shellcheck.net [1] http://documentup.com/shelljs/shelljs http://documentup.com/shelljs/shelljs [2] https://github.com/zeit/pkg https://github.com/zeit/pkg [3] https://github.com/elves/elvish/issues/383 https://github.com/elves/elvish/issues/383
- RoutinePlayer 9y agoWas kind of hoping to see "Why the need for another shell" at the top of the page.
- RoutinePlayer 9y agoWas kind of hoping to see "Why the need for yet another shell" at the very top of the page.
- Instructor 9y agoThe way to search history seems cool.
- Cryptoboss 9y agoHas anyone tried this and Fish? How do they compare?
- carapace 9y agoNot to be a nay-sayer, but I would use IPython for almost all of the tasks I saw mentioned in the Elvish docs. Python was originally developed as a shell language for the Amoeba distributed operating system. ( https://docs.python.org/3/faq/general.html#why-was-python-created-in-the-first-place https://docs.python.org/3/faq/general.html#why-was-python-cr... ) I find with the addition of the IPython "shell magic" I can easily do anything that doesn't fit e.g. Bash (for my skill level of course.)