TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Introducing nushell

1477 pointsby bradleybudaalmost 6 years ago

78 comments

toygalmost 6 years ago
The Powershell idea to push structured data through the pipe, which this project fundamentally replicates with a relational structure, has its merits; but it will always displease someone, and carries the burden of having to rewrite millions of utilities in order to unlock the real potential.<p>What if, instead, we pushed the approach “upstream”, asking systems to have an additional stream that all shells can access? We have stdout and stderr, we could add “stddata” - a pipe that expects and produces structured data. Then it would become trivial to add support around the userland, without displeasing anyone - because it’s just an additional interface, not a replacement. The pipe should support two or three formats to start with (csv, json, and maybe xml, so you can handle both tabular and child-parent relations with a varying degree of precision) and shells could have a special character for piping stddata (I like ¥) so everything else about them would stay the same.
评论 #20786245 未加载
评论 #20786375 未加载
评论 #20786171 未加载
评论 #20796572 未加载
pixelmonkeyalmost 6 years ago
The compelling idea here is that they convert the output of common shell commands into tabular data that can be manipulated using common operators, so that you don&#x27;t have the remember sorting&#x2F;filtering&#x2F;grouping flags that may be different for every different shell command. So, imagine being able to use the same sorting&#x2F;filtering logic on the output of `ls` as you might on the output of `ps`, and without relying on hacky solutions like pipelines to `grep`, `cut`, and `sort`.<p>It also means shell command output can be easily transposed into JSON and CSV. Actually pretty clever!
评论 #20783579 未加载
评论 #20784331 未加载
评论 #20784074 未加载
评论 #20783586 未加载
评论 #20784090 未加载
评论 #20784088 未加载
评论 #20785452 未加载
评论 #20796430 未加载
评论 #20786121 未加载
评论 #20783936 未加载
评论 #20785427 未加载
mamcxalmost 6 years ago
This is almost exactly what I have dreamed with a shell. I&#x27;m building a relational language (<a href="http:&#x2F;&#x2F;tablam.org" rel="nofollow">http:&#x2F;&#x2F;tablam.org</a>) with the plan of something alike.<p>Some extra ideas:<p>- Tables are amazing. But I think we need at least support for this &quot;shapes&quot; of data: List, Tables, Trees and maybe graphs<p>- I think will be nice to have an equivalent of Request&#x2F;responses alike http. And then a way to introspect what a command do, like auto-swagger.<p>- Having widgets like table-browser, graphs, etc AS COMPONENTS.<p>In FoxPro you could say &quot;browse&quot; and it display a DataTable grid with full editing capabilities on the current table (or it ask for a table to open). In this case:<p><pre><code> ls | ui_browse </code></pre> The key here is that the widgets work stand-alone, so is not necesary to fully build a terminal app just to see nicely data. Look like <a href="https:&#x2F;&#x2F;goaccess.io" rel="nofollow">https:&#x2F;&#x2F;goaccess.io</a> and more like this idea: <a href="https:&#x2F;&#x2F;github.com&#x2F;sqshq&#x2F;sampler" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sqshq&#x2F;sampler</a><p>This mean we could get a jupyter-like experience here!<p>- Some way to do curryng and maybe environment alias: You could setup an environment for the system, the user, this directory. In the environment is a .toml with vars and stuff.<p>The other thing where I think shells fail... is that are still old-style terminal. Having text output is cool, but having more rich widget system will unlock better the potential
评论 #20788467 未加载
评论 #20786090 未加载
roryrjbalmost 6 years ago
There&#x27;s a lot of comments here already so I don&#x27;t know if this has been addressed already, but I don&#x27;t get this shell. It seems to be fixing a problem that doesn&#x27;t exist, and a lot of comments are echoing it. Current shells are not deficient, as Doug McIlroy originally stated, the universal interface is text and tools should take input and generate output based on this. You obviously can then pipe things together with these tools not necessarily knowing in advance how they will be used in a pipeline. You can get very far with sed, awk, etc, you just have to spend a little bit of time learning them, but they are not complicated. You can of course then introduce a command like jq for specialised purposes. But hte point is the shell isn&#x27;t providing this, they are separate tools that you orchestrate using the shell. There is not a flaw with how it works at the moment, I truly believe and this isn&#x27;t a dig at this project or anyone in particular, that people do not spend enough time learning these tools that have been there for decades. The re-inventions that appear on GitHub are not a product of the deficiency of the existing tools, I don&#x27;t know what they are but it&#x27;s not that. Unless I am missing something.
评论 #20788697 未加载
评论 #20786299 未加载
评论 #20788448 未加载
评论 #20787142 未加载
评论 #20792161 未加载
评论 #20786117 未加载
评论 #20786120 未加载
rvzalmost 6 years ago
A brand new shell, especially in Rust is a great thing to see and also how it tackles the problems that exist in other shells.<p>However, its interesting to see so many dependencies that are required to build it (73 crates last time I checked) and as shells have always been portable across many operating systems, I wonder how portable nushell would be since it wishes to replace my current shell.
评论 #20783638 未加载
评论 #20783521 未加载
评论 #20785555 未加载
评论 #20784050 未加载
评论 #20785701 未加载
评论 #20785361 未加载
felixfbeckeralmost 6 years ago
This looks great, but what exactly are the benefits over PowerShell? The article mentions PowerShell, then says:<p>&gt; What if we could take the ideas of a structured shell and make it more functional? What if it worked on Windows, Linux, and macOS? What if it had great error messages?<p>- Any shell with piping is already very functional, and PowerShell has script blocks (higher-order functions). Or does this mean &quot;functional&quot; in the literal sense? What functionality is missing? - PowerShell works on macOS, Linux and Windows - The examples of error messages further down look almost exactly like PowerShells error messages (underlining the command in the pipeline that failed)<p>It is not clear to me what exactly the authors sought out to do different
评论 #20783501 未加载
评论 #20783518 未加载
评论 #20784036 未加载
评论 #20785783 未加载
评论 #20783514 未加载
评论 #20783446 未加载
massungalmost 6 years ago
Pretty cool idea and project. Hope you take it further and it turns into something truly spectacular!<p>My only comment is on the article. This line:<p>&gt; Nu would not have been possible without Rust.<p>That&#x27;s just patently false.<p>Perhaps you wouldn&#x27;t have chosen to code it in another language. Or perhaps Rust had one or two benefits that assisted in the development of Nu. But you don&#x27;t word it that way or go into any details as to what made Rust special&#x2F;better than X, Y or Z language (not that you need to, but if you&#x27;re going to make a wild statement, you should be prepared to back it up). The only 3 points made following that were about features that have widely existed in other languages well before Rust came along: async&#x2F;await, async streams, and serde.<p>Rust is cool and is still exploring some really great ideas in making programs safer and more maintainable. But, it&#x27;s not the greatest language ever (at least not yet), nor does it make the impossible possible. It can merely make some things easier at the cost of something else.<p>I&#x27;m glad you were able to use it effectively to create a tool you - and others - find useful.
评论 #20785838 未加载
评论 #20786780 未加载
评论 #20786268 未加载
评论 #20785159 未加载
Legogrisalmost 6 years ago
Interesting! I am also looking forward to setting aside time to play around with <a href="https:&#x2F;&#x2F;elv.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;elv.sh&#x2F;</a>, which takes a completely different approach with a similar philosophy.
评论 #20783376 未加载
arendtioalmost 6 years ago
I pretty much like the idea, but my biggest problem with current day shells is error handling.<p>Errexit (aka `set -e`) is a great idea badly executed. There are many things which can be improved (e.g. printing a stack trace by default), but at its core, there are two things which break it.<p>1. Inconsistent behavior: <a href="https:&#x2F;&#x2F;www.in-ulm.de&#x2F;~mascheck&#x2F;various&#x2F;set-e&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.in-ulm.de&#x2F;~mascheck&#x2F;various&#x2F;set-e&#x2F;</a><p>2. You can&#x27;t rely on it.<p>Inconsistent behavior should be no problem if a new cross-platform implementation is coming, but not being able to rely on it sucks. To give a quick demo:<p><pre><code> #!&#x2F;bin&#x2F;bash foo() { set -e false echo &quot;Sucks&quot; } printf &#x27;Normal: %s\n&#x27; &quot;$(foo)&quot; printf &#x27;Condition: %s\n&#x27; &quot;$(foo || true)&quot; </code></pre> Output:<p><pre><code> Normal: Condition: Sucks </code></pre> So if someone is about to bring a new shell, please fix the error handling along the way. But hey, Yehuda Katz is part of the project. So I am looking forward to what is coming next :-)
评论 #20786958 未加载
评论 #20791089 未加载
burlesonaalmost 6 years ago
I read this, and read all about it, and the whole time I thought the name was “nutshell,” until I saw they abbreviated it “nu.”<p>Now I’m really disappointed that it’s not called “nutshell.”<p>But this is still very cool.
评论 #20786542 未加载
goranmoominalmost 6 years ago
While I fully appreciate &amp; support the structured shell approach (I believe it’s the future), I wish the efforts in making a mew shell should be more directed to a small selection of projects.<p>elvish[0], uxy[1], ngs[2] and basically all shell projects that allow other languages(e.g. python: tako[3], racket: rash[4] janet: janetsh[5]) are all similar attempts; and there are numerous more alternative (non-structured) shells like fish[6], and a whole lot more.<p>As a daily user of fish and a person hyped by elvish (but not using it as a daily driver :-(), I hope some structured shells get at least some traction, but there are too much approaches.<p>Well, I didn’t start as a rant but it became one anyway.<p>[0]: <a href="https:&#x2F;&#x2F;elv.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;elv.sh&#x2F;</a><p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;sustrik&#x2F;uxy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sustrik&#x2F;uxy</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;ngs-lang&#x2F;ngs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ngs-lang&#x2F;ngs</a><p>[3]: <a href="https:&#x2F;&#x2F;takoshell.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;takoshell.org&#x2F;</a><p>[4]: <a href="https:&#x2F;&#x2F;rash-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rash-lang.org&#x2F;</a><p>[5]: <a href="https:&#x2F;&#x2F;github.com&#x2F;andrewchambers&#x2F;janetsh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;andrewchambers&#x2F;janetsh</a><p>[6]: <a href="https:&#x2F;&#x2F;fishshell.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fishshell.com&#x2F;</a>
antplsalmost 6 years ago
Interesting PoC, but does it solve a real world problem?<p>If I had to reinvent the shell by breaking backward compatibility, I would do a statistical study using all the shell scripts publicly available on GitHub, a survey about the critics of the current shells in the literature, and then I would try to optimize a metric such as : words typed to complete a task, reproductivity, time-to-market, communication, mathematical soundness, etc. The result of the study might be that the current shell is enough and the cost of switching to another is too big (I don&#x27;t know, it&#x27;s an hypothesis)<p>People shared many thoughts and opinions on this thread, so that&#x27;s already a win by itself
评论 #20786682 未加载
评论 #20786674 未加载
01100011almost 6 years ago
Looks cool, but when I see things like this I figure there&#x27;s no point in trying to learn something that won&#x27;t exist on 99% of the systems I need to work on. Bash sucks, but it&#x27;s almost always there. Embedded systems, desktops, big iron... Like many of the established Unix tools, bash has market penetration and staying power.
评论 #20785848 未加载
thih9almost 6 years ago
I like the concept a lot, especially the focus on outputting data in an organised way.<p>What I feel could be improved is the presentation of the tabular data. Some ideas below:<p>- The screenshots show two horizontal lines consisting of dashes, one at the start of the table, one at the end. To me they seem redundant and could be replaced with spaces (whitespace). I did a quick check and PostgreSQL&#x27;s psql tables also don&#x27;t have lines like this.<p>- How about using Unicode lines instead of dashes and plus sign in the header? This way there would be fewer gaps there. I&#x27;m not sure though how this would affect compatibility.
评论 #20784516 未加载
评论 #20783755 未加载
maestalmost 6 years ago
I love the idea of treating output as tabular data.<p>I see you already have a where operator. What would fit this very well would be in-built sql-like syntax. Since tables are first class, you should have an in-built way of handling them.<p>A languiage similar to q&#x2F;kdb - it has a great SQL dsl, but also works as a regular programming language. It&#x27;s also very concise and expressive, you can write oneliners that do mind bogglingly complex things.
评论 #20783669 未加载
dom96almost 6 years ago
Whoa. It has been a while since I&#x27;ve seen something that truly feels like it can revolutionise my workflow. Amazing job to everyone involved in this project!<p>Really excited to try this, surprised that there is no pre-built binaries. Are these planned?
评论 #20783534 未加载
sigmonsaysalmost 6 years ago
i feel like structured data in a shell will phase out. The posix pipes allow streaming <i>any</i> data. So if programs want to stream structured data, just build programs who know how to communicate with each other using structured data. The older shells withstand the test of time with generic interfaces.<p>For instance, because of the influx of JSON the past few years I have learned to use jq very well. It does everything I need and I didn&#x27;t need to upgrade my shell to use it. What if everything becomes protobuf down the road?
评论 #20785782 未加载
t0astbreadalmost 6 years ago
I like this a lot but why does this have to be a completely new shell? Couldn&#x27;t this also just be a set of tools that I can use in an existing shell and get the best of both worlds?
评论 #20784537 未加载
评论 #20784224 未加载
orfalmost 6 years ago
Looks amazing! Unfortunately a `cargo install` on stable fails due to a dependency &quot;futures-async-stream v0.1.0-alpha.4&quot; with the &quot;rawkey,clipboard&quot; features.<p>The source is pretty interesting. Here&#x27;s the PS command: <a href="https:&#x2F;&#x2F;github.com&#x2F;nushell&#x2F;nushell&#x2F;blob&#x2F;master&#x2F;src&#x2F;commands&#x2F;ps.rs#L27" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nushell&#x2F;nushell&#x2F;blob&#x2F;master&#x2F;src&#x2F;commands&#x2F;...</a><p>And the sort-by: <a href="https:&#x2F;&#x2F;github.com&#x2F;nushell&#x2F;nushell&#x2F;blob&#x2F;master&#x2F;src&#x2F;commands&#x2F;sort_by.rs#L29" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nushell&#x2F;nushell&#x2F;blob&#x2F;master&#x2F;src&#x2F;commands&#x2F;...</a>
评论 #20785928 未加载
zellynalmost 6 years ago
How do I do this in nushell? It&#x27;s an alias I created recently to ripgrep through java and go files and tell me which have both of two words:<p><pre><code> function both { comm -1 -2 &lt;(rg -i -l -t java -t go $1 | sort) &lt;(rg -i -l -t java -t go $2 | sort) } </code></pre> Example usage: `both sharded jobqueue`
评论 #20784975 未加载
评论 #20787589 未加载
entire-namealmost 6 years ago
An object pipeline is certainly interesting, and I do use PowerShell from time to time. However, there is a reason extremely simple concepts such as &quot;everything is a file&quot; or &quot;input&#x2F;output&#x2F;error are all text&quot; survived for this long. I will quote an answer provided in a vaguely related question [0]:<p>&gt; There is no spoon^H^H^Hstructured data. There is only text.<p>[0]: <a href="https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;a&#x2F;400" rel="nofollow">https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;a&#x2F;400</a>
foucalmost 6 years ago
This nicely ties into the recent HN thread about a dream OS that would provide databases at the OS level instead of forcing the re-implementation of databases in many programs.<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20754592" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20754592</a>
coldteaalmost 6 years ago
<p><pre><code> ^ls -la | lines | skip 1 | split-column &quot; &quot; perms files group user size month day time name </code></pre> This is neat, but does nushell have the ability (should be trivial to add) to save such a pipeline and reuse it (similar to an &quot;alias&quot;)?<p>e.g.<p><pre><code> myls = ^ls -la | lines | skip 1 | split-column &quot; &quot; perms files group user size month day time name </code></pre> and then:<p><pre><code> myls | where size &gt; 1000 </code></pre> Also perhaps the built-in commands could be namespaced? E.g. nu.ls or nu-ls vs ls. Then you wouldn&#x27;t need escaping, and the names wouldn&#x27;t shadow traditional commands (but could allude to them).
评论 #20791138 未加载
评论 #20788818 未加载
chrissoundzalmost 6 years ago
I really enjoy seeing new ideas around interfaces. But I do wonder, rather than creating a new shell, couldn&#x27;t we have a &#x27;json&#x2F;structured&#x27; mode for cli programs - and maintain compatibility with existing shells? For example if it was toggled with a SHELL_FORMAT environment variable?<p>What issues could be faced with this approach?
评论 #20784023 未加载
评论 #20784348 未加载
评论 #20784026 未加载
评论 #20784033 未加载
dustfingeralmost 6 years ago
This project has goals similar to GNU eshell [1]. Great ideas, thank you for sharing.<p>[1] <a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;emacs&#x2F;manual&#x2F;html_mono&#x2F;eshell.html#Introduction" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;emacs&#x2F;manual&#x2F;html_mono&#x2F;eshell.h...</a>
m3atalmost 6 years ago
This is great, we have a tendency to be content with existing tools we&#x27;re familiar with but be blind to their limitations. I&#x27;m looking forward to how this project evolve!<p>However an important point for practical usage is the capability to run existing scripts, for example as oilshell [1] does. I skimmed through the README and doc but couldn&#x27;t find the current status nor future plans.<p>[1] <a href="http:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2019&#x2F;06&#x2F;17.html" rel="nofollow">http:&#x2F;&#x2F;www.oilshell.org&#x2F;blog&#x2F;2019&#x2F;06&#x2F;17.html</a>
mstratmanalmost 6 years ago
Any time the first line of a project description reads &quot;This is NewTool, written in &lt;language&gt;&quot; it&#x27;s an immediate red flag that makes it hard for me to continue reading.<p>Obviously it doesn&#x27;t necessarily mean the project has no merits, but language choice is one of the less relevant details and it signals that the author wanted to make a toy in a language new to them. Good for them, but most of the time the rest of the world doesn&#x27;t care.<p>If the project has merits, and this one might, it should talk about them in the intro.
评论 #20784278 未加载
评论 #20784284 未加载
评论 #20784309 未加载
评论 #20785281 未加载
评论 #20785806 未加载
skywhopperalmost 6 years ago
This is really cool. I&#x27;ve always liked the ideas behind Powershell&#x27;s approach, and so I&#x27;m glad to see someone is working on Linux-friendly shell that has the same sort of features.<p>I have to say that I don&#x27;t care for the snark about &quot;having to remember&quot; arguments to various pipeline-munging commands. I get that this is a big challenge for new folks working with typical unix shells, but I&#x27;m not sure I see how this actually solves it. In order to avoid all those flags, a system like this requires more verbs overall, and those verbs have their own argument structure, eg `split-column &quot; | &quot; firstname lastname job`, so now instead of being able to label the arguments and order them how I want, I now have to remember the order they come in, and what they mean, and that `split-column &quot; &quot;` apparently eats extra whitespace (does `split-column &quot; | &quot;`?). Yes, the standard unix tools have these issues, as well. That&#x27;s my point.<p>So yes, I love this idea, please keep pursuing it, and I look forward to trying it out. But focus on the benefits of working with structured data rather than pushing lines that sound good but aren&#x27;t actually true.
savolaialmost 6 years ago
The idea is inspiring!<p>I&#x27;m finding it hard to get over them using pipes and dashes for table borders. Is this the 70&#x27;s? It&#x27;s genuinely hard to read these tables. See: <a href="https:&#x2F;&#x2F;www.interaction-design.org&#x2F;literature&#x2F;topics&#x2F;gestalt-principles" rel="nofollow">https:&#x2F;&#x2F;www.interaction-design.org&#x2F;literature&#x2F;topics&#x2F;gestalt...</a>
nikisweetingalmost 6 years ago
Hmm I like this but there&#x27;s no way it&#x27;s replacing fish for me, I&#x27;d rather use it as standalone command that provides the same functionality.<p>e.g. `ls | nu where size &gt; 10` or `nu open Cargo.toml`
评论 #20786567 未加载
naileralmost 6 years ago
As a long time Unix person who also discovered pwsh, like Yehuda did in the article:<p>Can I make nushell cmdlets (or equivalent) in something other than rust? pwsh limits me to .net languages, but I wanna use node.
gigatexalalmost 6 years ago
This looks really cool but isn’t Powershell cross platform now? It looks to shadow much of the features of Powershell which opens scripting to the whole of the .Net library
评论 #20786900 未加载
naaskingalmost 6 years ago
Not sure if they&#x27;re aware of Shcaml, which seems even more powerful since it supports anonymous records in lines:<p><a href="https:&#x2F;&#x2F;www.ccs.neu.edu&#x2F;home&#x2F;tov&#x2F;code&#x2F;shcaml&#x2F;doc&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.ccs.neu.edu&#x2F;home&#x2F;tov&#x2F;code&#x2F;shcaml&#x2F;doc&#x2F;</a><p>Edit: features look similar in fact, since you can name columns and refer to them by name. Neat!
Klasiasteralmost 6 years ago
I find it good in general but don&#x27;t like the idea of reusing the names like `ls` and so on which is confusing with the option to invoke the real `ls`. Since they have single-character names already, a simple `l` would be one way to solve this.<p>I&#x27;m interested to see a solution to error handling (within multiple pipes!) and subprocess management as well but couldn&#x27;t find much in the docs.
j88439h84almost 6 years ago
Mario has a similar feel to this but in Python, and lets you use arbitrary code and construct your own functions in pure Python.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;python-mario&#x2F;mario" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;python-mario&#x2F;mario</a><p><pre><code> $ mario read-csv-dicts map &#x27;x[&quot;name&quot;]&#x27; &lt; hackers.csv Alice Bob Carol</code></pre>
评论 #20785136 未加载
评论 #20786670 未加载
jonahssalmost 6 years ago
Love it! Thanks. I&#x27;ve always thought powershell was a great concept, badly executed (those long names with capital letters, confusing errors, and insanely long time to return when a command is missing).<p>Is anyone interested in a shell with a GUI? As in, data still passing as text, but having a shell which can render textual data into widgets when displayed in the shell?
评论 #20786193 未加载
perspective1almost 6 years ago
Very neat, love it. Few things-- 1) Recommend this install line (for those of us on mainline&#x2F;standard who&#x27;ve never used a different toolchain) cargo +nightly install nu 2) Things like ls | where readonly don&#x27;t work as expected-- readonly should be a bool, shouldn&#x27;t it? 3) How do you paginate? ls | less doesn&#x27;t work
rajangdavisalmost 6 years ago
This seems like it could potentially be an awesome tool for data cleaning&#x2F;munging in the terminal.<p>Really interested to see where this goes..
cwmoorealmost 6 years ago
Within the boundaries of the demo, it feels like all my time reading man pages is a landline network, and this is cellular.
gitgudalmost 6 years ago
Interesting, there&#x27;s definitely a niche for this. But I&#x27;m not sure it could replace a normal shell in my opinion. I&#x27;m confused at what other commands would do in this context? Will it tabularize; echo &quot;Hello World&quot;?<p>There&#x27;s an elegant simplicity of treating all piped output as a string rather than objects...
aerovistaealmost 6 years ago
Feature suggestion: detect timing differences between program outputs to determine where an individual output ended and the next one began, so people can automatically scroll to the top of a stack trace for instance by double clicking it or something because the shell will recognize all those lines as a single message.
Gehinnnalmost 6 years ago
Is the processed data typed? Can you offer auto completion of data fields based on these types?<p>I also thought quite a couple of times about implementing a data centric, typed shell language. My primary goal was to have a shell where one could discover every feature by oneself through the magic of types.
maestalmost 6 years ago
People are really excited about this. Here&#x27;s a question:<p>Would you pay for this?<p>My prior is that no, people would not pay for a new shell - they&#x27;d prefer sticking to bash because A. it&#x27;s &quot;standard&quot; B. it&#x27;s free.<p>I have to wonder how developing new tolls like nushell can be sustained over the long run.
lostmsualmost 6 years ago
I feel open parsing files is misguided. Downright wrong if it profilerates into scripts, because suddenly simple scripts can&#x27;t work on JSON, because opening JSON returns something different from a stream of lines.
评论 #20783437 未加载
评论 #20783343 未加载
评论 #20784357 未加载
评论 #20786213 未加载
sriram_malharalmost 6 years ago
This looks very interesting.<p>Unfortunately, I&#x27;m having trouble building it on Mac OS X 10.14.5 and with the latest rust update installed.<p><pre><code> cargo:warning=libgit2&#x2F;src&#x2F;streams&#x2F;stransport.c:12:10: fatal error: &#x27;CoreFoundation&#x2F;CoreFoundation.h&#x27; file not found cargo:warning=#include &lt;CoreFoundation&#x2F;CoreFoundation.h&gt; </code></pre> Can anyone clue me in? An Xcode update perhaps? (I&#x27;m doing it, but it is taking forever). I have a CoreFoundation.h on my system under MacOSX10.14.sdk, but it is not under a CoreFoundation folder.
magoonalmost 6 years ago
Bash is ubiquitous - the best selling point for knowing it and sticking to it.<p>I desire a fancy new shell but don’t want it to become a crutch, limiting my usefulness and familiarity when I’m on a system lacking it.
tarrudaalmost 6 years ago
The idea of programs that work on structured data is quite old. Anyone ever read &quot;structural regular expressions&quot; by Rob Pike? Highly recommended: <a href="http:&#x2F;&#x2F;doc.cat-v.org&#x2F;bell_labs&#x2F;structural_regexps&#x2F;" rel="nofollow">http:&#x2F;&#x2F;doc.cat-v.org&#x2F;bell_labs&#x2F;structural_regexps&#x2F;</a><p>Also, using structural regexps for efficient interactive text editing: <a href="https:&#x2F;&#x2F;github.com&#x2F;martanne&#x2F;vis" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;martanne&#x2F;vis</a>
kerngalmost 6 years ago
This is very cool! The giant drawback of Poweshell is that it&#x27;s so focused on Windows - this projects seems to provide some of that power cross platform. Very neat idea!
评论 #20786187 未加载
qwerty456127almost 6 years ago
I&#x27;we always felt like there should be no file system and no shell but a relational database with a particularly suitable and extensible SQL dialect REPL.
评论 #20784053 未加载
评论 #20786222 未加载
weymanalmost 6 years ago
Yes! I’ve always preferred PowerShell for scripting, Bash for an interactive shell. This seems like the best of both worlds, can’t wait to try it out.
grandinjalmost 6 years ago
how long before it starts implementing SQL over the input data?<p>They are already tables after all :-)
评论 #20791165 未加载
评论 #20786786 未加载
SneakyPitalmost 6 years ago
In case you are interested in more sophisticated ls or find, try fselect ( <a href="https:&#x2F;&#x2F;github.com&#x2F;jhspetersson&#x2F;fselect" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jhspetersson&#x2F;fselect</a> ). That tool supports JSON as output as well.<p>Fselect has few really cool features, esp. when you got to deal with complex queries. Although not unix way at all.
dgudkovalmost 6 years ago
&gt; Everything is data<p>We use a similar approach in our data prep tool [1] for non-technical users. Lists of files, lists of emails, contents of text files, spreadsheets or database tables - piping it all together allows mixing ETL and process automation in a similar fashion.<p>[1] <a href="https:&#x2F;&#x2F;easymorph.com" rel="nofollow">https:&#x2F;&#x2F;easymorph.com</a><p>Disclaimer: I&#x27;m the founder.
nixpulvisalmost 6 years ago
I too have been off and on writing a Rust shell, though I want it to support `chsh` POSIX compatibility for my Arch setup. It&#x27;s no where near complete though.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;nixpulvis&#x2F;oursh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nixpulvis&#x2F;oursh</a><p>`nu` seems very cool (and I love the name ;), but isn&#x27;t building atm.
GordonSalmost 6 years ago
I like how powerful Powershell is, but I absolutely loathe it&#x27;s verbose syntax and Pascal-Kebab-Case naming (at least for idiomatic Powershell).<p>This seems to have a lot of the power of Powershell, but with a terse, familiar syntax - I really like the look of this!<p>Being cross-platfotm is a huge seller for me too - I mainly work on Windows, but also on Linux and MacOS.
评论 #20787336 未加载
pvgalmost 6 years ago
Wonder if the temptation wasn&#x27;t there to just call it &#x27;nutshell&#x27; and if so, how it was resisted.
评论 #20783652 未加载
评论 #20783910 未加载
hestefiskalmost 6 years ago
I like this. Very neat with tables; easier to memorise than PowerShells very verbose command names. It feels like a pseudo SQL interface to the OS. Only area where I think it oversteps the Unix philosophy is the integrated terminal multiplexer. I think the shell should be terminal agnostic.
frankusalmost 6 years ago
This seems to address a lot of the shortcomings presented here: <a href="https:&#x2F;&#x2F;mkremins.github.io&#x2F;blog&#x2F;unix-not-acceptable-unix&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mkremins.github.io&#x2F;blog&#x2F;unix-not-acceptable-unix&#x2F;</a>
ilakshalmost 6 years ago
This looks great. Is the autocomplete as good as fish? If so I may switch from fish to nu. The autocomplete matters a lot. With fish I often repeat commands during development and I only have to type the first letter or two.
评论 #20786240 未加载
guylepage3almost 6 years ago
Lately I&#x27;ve been paying more attention to alternative CLI tooling, extensions, etc. Our open source community uses git-flow-avh for example and it has been extremely helpful. I can&#x27;t wait to try this out.
thesuperbigfrogalmost 6 years ago
Nu looks very promising. Are there any prebuilt binaries available?
评论 #20783523 未加载
quickthrower2almost 6 years ago
The next step this begs for is for the shell to be like lisp. The results are s expressions and you can write macros to slice dice and pipeline the data to your hearts content.
评论 #20786020 未加载
ameliusalmost 6 years ago
Do shells exist which don&#x27;t have a fixed maximum argument size, so you&#x27;d never need &quot;xargs&quot;? Or is the problem innate to Unix?
评论 #20785068 未加载
评论 #20786236 未加载
djabattalmost 6 years ago
I just like seeing the fresh hacking in the Unix Shell space. I miss my old friends sed, awk, and xargs. This is compelling and fun too.
rabidratalmost 6 years ago
This is great! It&#x27;s like VisiData as a shell. I wonder how easy it would be to use the VisiData interface with the shell output?
simonblackalmost 6 years ago
Why did I keep getting the impression on reading the article that I was seeing mysql &#x27;select&#x27; readouts?
farxalmost 6 years ago
What a missed opportunity not naming the post &quot;nushell in a nutshell&quot;
e2lealmost 6 years ago
Nutshell looks like it&#x27;s shaping up to be the new hotness in shell land.
ulughalmost 6 years ago
Cool project! I like the intuitive syntax and clean doc. Will give it a try.
KhoomeiKalmost 6 years ago
Am I the only one who first read the title as &quot;nutshell&quot;?
techntokealmost 6 years ago
In the example you have, `ps` takes way too long.
lemoncucumberalmost 6 years ago
Could someone explain this to me in a nushell?
bigtrakzapzapalmost 6 years ago
Wow. Impressive usability OOTB. Great job!
ertucetinalmost 6 years ago
It looks great!
djsumdogalmost 6 years ago
I really like this conceptually. I feel like with Powershell, you need a bunch of commands that actually pass objects around or act upon them; and something similar in Linux would require writing a lot of extensions first.<p>I&#x27;ve been using fish shell for years and glad I started down that route. It&#x27;s been incredibly useful.<p>I really want to give this a shot too. I feel like too often I&#x27;ll open up Python, read a file and then manipulate it when I need to something more complex than simple grep&#x2F;sed&#x2F;cut&#x2F;wc etc... This feels like it really fills in that gap. It starts with something really simple: get your unstructured output in a structure, and then build from it. I could see people writing more custom extensions and objects later on if this gets popular.
评论 #20783826 未加载
评论 #20784030 未加载
tus88almost 6 years ago
Job management?
评论 #20783739 未加载
boobePhuu7iet7ialmost 6 years ago
Looks stupid
评论 #20789957 未加载
bradknowlesalmost 6 years ago
It looks to me like they took the concept of “everything as sql” to the extreme.<p>Do you want to live your entire life and everything you do in sql? I don’t.<p>I think I will pass.