TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Elvish – Scripting language and interactive shell

80 点作者 kartikarti大约 1 个月前

13 条评论

photonthug大约 1 个月前
While removing weird stuff from daily bash annoyances is interesting, I&#x27;m not necessarily looking to replace that with brand new but also pretty random weird stuff. Adding new rules isn&#x27;t the same as adding structure. The documentation is also frequently strange in a way that makes it hard to digest. From <a href="https:&#x2F;&#x2F;elv.sh&#x2F;learn&#x2F;first-commands.html#external-commands" rel="nofollow">https:&#x2F;&#x2F;elv.sh&#x2F;learn&#x2F;first-commands.html#external-commands</a><p>&gt; While Elvish provides a lot of useful functionalities as builtin commands, it can’t do everything. This is where external commands come in, which are separate programs installed on your machine. Many useful programs come in the form of external commands, and there is no limit on what they can do. Here are just a few examples: Git provides the git command to manage code repositories<p>At first I thought, wait, is this a shell or not, do I have to write code or something to get access to normal external commands? But no, this is more like going to a car dealership and having the salesman say &quot;Hey thanks for coming by, a car is a mechanical device consisting of metal parts and rubber parts for the purpose of taking you where you need to go! Now that we&#x27;re on the same page about that, money is a thing made of paper for the purposes of ..&quot;<p>Docs are hard, once or twice is fine, but lots of parts are like this and I gave up reading. Not sure if it&#x27;s AI generated, but if the project is doing that then it should stop, and if it&#x27;s not doing that it should consider starting to
评论 #43885879 未加载
Arcuru大约 1 个月前
I&#x27;ve been using fish for many years now though I keep trying all these new shells.<p>Ultimately I&#x27;ve found that for my interactive shell I just want something widely supported and with easy syntax for `if` and `for` loops for short multi-line commands. For anything longer than that I just reach for real Python using either the `sh` or `plumbum` package.<p>I don&#x27;t need the extra features very often, so I just run things in full Python where I&#x27;m already comfortable.<p>I&#x27;ve tried oils&#x2F;ysh, elvish, xonsh, nushell, and while they are _fine_ I don&#x27;t want to learn a different language that&#x27;s not quite Python and not quite shell.
评论 #43897977 未加载
gxonatano22 天前
After getting frustrated with how unusual and convoluted BASH syntax tends to be, especially with involved scripts, I&#x27;ve tried almost all of the alternative shells: Elvish, Fish, Oil, Xonsh (Python!), Emacs&#x27;s eshell, and even the Haskell-based shell repls like Turtle and Shelly. The only one I really stuck with was Nushell. It&#x27;s friendly, pretty, intuitive, easy to read, heavy on pipes, and super powerful for data analysis. Plus it&#x27;s modern replacement for a lot of tools, like `ls`, `jq`, `curl`, and so on. Writing a little command-line program is a joy in Nushell.
rendaw大约 1 个月前
I went down this route based on HN recommendations, with some people calling it stable well documented.<p>There&#x27;s TODOs all over the documentation! There&#x27;s no background task tools for scripting, and in interactive use background tasks are barely supported - an issue about background tasks has people going roughly &quot;nobody needs to do tasks in parallel, that was only important when people were working on mainframes&quot;. The shell hooks have (undocumented) weird restrictions. Lazy iteration of lists is only supported by using functions with callbacks. Stable = development appears stopped.<p>This is half baked and dead. For my new computer I really <i>really</i> wanted a lightweight new shell with orthogonal syntax thought out from the ground up and not glued together over 4 decades, and this seemed like the closest option! But this isn&#x27;t it.
评论 #43886661 未加载
评论 #43886483 未加载
评论 #43886371 未加载
评论 #43886998 未加载
评论 #43887310 未加载
评论 #43886302 未加载
dang大约 1 个月前
Related. Others?<p><i>Elvish, expressive programming language and a versatile interactive shell</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40316010">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40316010</a> - May 2024 (114 comments)<p><i>Elvish Scripting Case Studies</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39549902">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39549902</a> - Feb 2024 (1 comment)<p><i>Elvish is a friendly interactive shell and an expressive programming language</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24422491">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24422491</a> - Sept 2020 (49 comments)<p><i>Elvish: a shell with some unique semantics</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17987258">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17987258</a> - Sept 2018 (1 comment)<p><i>Elvish 0.11 released</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16174559">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16174559</a> - Jan 2018 (1 comment)<p><i>Elvish: friendly and expressive shell for Linux, macOS and BSDs</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14698187">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14698187</a> - July 2017 (86 comments)<p><i>Elvish – An experimental Unix shell in Go</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8090534">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8090534</a> - July 2014 (75 comments)
linsomniac大约 1 个月前
I&#x27;ve been eyeing a &quot;better shell&quot; for a while, but I&#x27;ve just decided that a couple zsh plugins and I&#x27;m probably happiest. As the meme says &quot;Change my mind&quot;.<p>I&#x27;ve been using fish for the last year or more, and I like some of the &quot;batteries included&quot;, particularly the predicting of the command you want to run. But fish is too much like bash in syntax, meaning that I just think of it like bash until I have to type &quot;(foo)&quot; instead of &quot;$(foo)&quot;, or &quot;end&quot; instead of &quot;fi&quot;. The zsh plugins for doing command predicting and fancy prompt seems to get me all the fish benefits with none of the rough spots. And, frankly, the changes fish does doesn&#x27;t seem to have any benefit (what is the benefit of &quot;end&quot; over &quot;fi&quot;).<p>Even xonsh (I&#x27;m a huge Python fan) doesn&#x27;t really have enough pull for me to stick in it. Oils, nu, elvish, they all have some benefits for scripting, but I can&#x27;t see myself switching to them for interactive use.<p>It&#x27;s kind of feeling like zsh is &quot;good enough&quot; with no real downsides. Maybe this is mostly that I&#x27;ve been using sh&#x2F;ksh&#x2F;bash&#x2F;zsh for 40 years, some of these other shells might be easier to switch to if you lack the muscle memory?
评论 #43887576 未加载
评论 #43887714 未加载
account-5大约 1 个月前
Ever since I &#x27;discovered&#x27; Nushell I&#x27;ve noticed a lot of new shells appearing on HN.<p>The thing I like about Nushell is it does away with some of the things that I found hard with bash, and made data formats a first class citizen (something I enjoyed about powershell).<p>I think if you like Lisp elvish would be ideal but for me the lack (seeming, I&#x27;ve not done a deep dive on the docs) of built-in data parsing is a no.
评论 #43886929 未加载
gatane大约 1 个月前
I just use rc shell from Plan9 (ported to Linux[1]) nowadays, it is more simple than bash and whatever other shell there is out there.<p>You want functions? For loops? Lists? They got them.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;rakitzis&#x2F;rc">https:&#x2F;&#x2F;github.com&#x2F;rakitzis&#x2F;rc</a>
IshKebab大约 1 个月前
Looks nice. Obviously way better than Bash, but there are a few options that are way better than Bash, so I feel like it should spend some time convincing me why I should use this over e.g. Nushell.<p>Anyone have any experience of both?
评论 #43885520 未加载
评论 #43885563 未加载
xiaq大约 1 个月前
Elvish author here, seems like I missed the annual posting of Elvish to HN this time :)
atiq-ca大约 1 个月前
Looks interesting! Does it have OOP features kinda like how powershell has that?
baobun大约 1 个月前
Anyone here using elvish on the regular? Anecdotes please!
评论 #43885429 未加载
TrnsltLife大约 1 个月前
Here I was hoping for a scripting language in Sindarin or Quenya. So disappointed.