this post was submitted on 15 Sep 2025
352 points (98.4% liked)

Linux

58260 readers
1578 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

I've been trying nushell and words fail me. It's like it was made for actual humans to use! 🤯 🤯 🤯

It even repeats the column headers at the end of the table if the output takes more than your screen...

Trying to think of how to do the same thing with awk/grep/sort/whatever is giving me a headache. Actually just thinking about awk is giving me a headache. I think I might be allergic.

I'm really curious, what's your favorite shell? Have you tried other shells than your distro's default one? Are you an awk wizard or do you run away very fast whenever it's mentioned?

you are viewing a single comment's thread
view the rest of the comments
[–] communism@lemmy.ml 24 points 2 days ago (4 children)

Nushell looks cool but I prefer to stick with the POSIXes so that I know my scripts will always work and syntax always does what I expect it to. I use zsh as a daily driver, and put up with various bashes, ashes, dashes, that come pre-installed with systems I won't be using loads (e.g. temporary vms).

[–] nimpnin@sopuli.xyz 26 points 2 days ago (3 children)

Always confuses me when people say this. You can use multiple different shells / scripting languages, just as you can use multiple programming languages.

[–] Ferk@lemmy.ml 2 points 1 day ago (1 children)

If you want your scripts to "always work" you'll need to go with the most common/standard language, because the environments you work on might not be able to use all of those languages.

[–] nimpnin@sopuli.xyz 2 points 1 day ago (1 children)

I mean if all your scripts are fully general purpose. That just seems really weird to me. I don't need to run my yt-dlp scripts on the computational clusters I work on.

Moreover, none of this applies to the interactive use of the shell.

[–] Ferk@lemmy.ml 1 points 1 day ago* (last edited 1 day ago) (1 children)

It's not only clusters.. I have my shell configuration even in my Android phone, where I often connect to by ssh. And also in my Kobo, and in my small portable console running Knulli.

In my case, my shell configuration is structured in some folders where I can add config specific to each location while still sharing the same base.

Maybe not everything is general, but the things that are general and useful become ingrained in a way that it becomes annoying when you don't have them. Like specific shortcuts for backwards history search, or even some readline movement shortcuts that apparently are not standard everywhere.. or jumping to most 'frecent' directory based on a pattern like z does.

If you don't mind that those scripts not always work and you have the time to maintain 2 separate sets of configuration and initialization scripts, and aliases, etc. then it's fine.

[–] nimpnin@sopuli.xyz 1 points 1 day ago* (last edited 1 day ago) (1 children)

those scripts not always work

This feels like ragebait. I have multiple devices, use fish whenever that can be installed and zsh/bash when not, and have none of these issues.

EDIT:

or some methods to jump to most recent directory like z.

Manually downloading the same shell scripts on every machine is just doing what the package manager is supposed to do for you. I did this once to get some rust utils like eza to get them to work without sudo. It's terrible.

[–] Ferk@lemmy.ml 1 points 1 day ago* (last edited 1 day ago) (1 children)

Manually downloading the same shell scripts on every machine is just doing what the package manager is supposed to do for you

If you have a package manager available, and what you need is available there, sure. My Synology NAS, my Knulli, my cygwin installs in Windows, my Android device.. they are not so easy to have custom shells in (does fish even have a Windows port?).

I rarely have to manually copy, in many of those environments you can at least git clone, or use existing syncing mechanisms. In the ones that don't even have that.. well, at least copying the config works, I just scp it, not a big deal, it's not like I have to do that so often.. I could even script it to make it automatic if it ever became a problem.

Also, note that I do not just use things like z straight away.. my custom configuration automatically calls z as a fallback when I mistype a directory with cd (or when I intentionally use cd while in a far/wrong location just so I can reach faster/easier).. I have a lot of things customized, the package install would only be the first step.

[–] nimpnin@sopuli.xyz 1 points 1 day ago (1 children)

So you're willing to do a lot of manual package managing, in general put a lot of work into optimizing your workflow, adjusting to different package availability, adjusting to different operating systems...

...but not writing two different configs?

That is your prerogative but you're not convincing me. Though I don't think I'll be convincing you either.

I have separate configs/aliases/etc for most of my machines just because, well, they are different machines with different hardware, software, data, operating systems and purposes. Even for those (most) that I can easily install fish on.

[–] Ferk@lemmy.ml 1 points 1 day ago* (last edited 1 day ago) (1 children)

It's actually the lazy way. I only work once, then copy that work everywhere. The copying/syncing is surprisingly easy. If that's what you call "package management" then I guess doing "package management" saves a lot of work.

If I had to re-configure my devices to my liking every time I would waste time in repetition, not in an actual improvement. I configured it the way I liked it once already, so I want to be able to simply copy it over easily instead of re-writing it every time for different systems. It's the same reason why I've been reusing my entire /home partition for ages in my desktop, I preserve all my setup even after testing out multiple distros.

If someone does not customize their defaults much or does not mind re-configuring things all the time, I'm sure for them it would be ok to have different setup on each device.. but I prefer working only once and copying it.

And I didn't say that bash is the only config I have. Coincidentally, my config does include a config.fish I wrote ages ago (14 years ago apparently). I just don't use it because most devices don't have fish so it cannot replace POSIX/Bash.. as a result it naturally was left very barebones (probably outdated too) and it's not as well crafted/featureful as the POSIX/bash one which gets used much more.

[–] nimpnin@sopuli.xyz 1 points 1 day ago

I only work once, then copy that work everywhere.

Good that works for you. If only my needs were so simple that the configs could be same on each machine.

paljastusI know that's an insufferable way to put it but holy shit have you been like that too.

[–] communism@lemmy.ml 9 points 2 days ago

I know that. I just don't have a use case for alternative shells. Zsh works fine for me and I know how it works. I don't have problems that need fixing, so I don't need to take the time to learn a new, incompatible shell.

[–] elmicha@feddit.org 6 points 2 days ago (1 children)

Some people work on machines where they are not allowed to install anything.

[–] nimpnin@sopuli.xyz 1 points 2 days ago (1 children)

What does that have to do with anything?

[–] elmicha@feddit.org 1 points 1 day ago (1 children)

You said you/I/everyone can use multiple shells, I said: no, I can't, at least not on all the machines that I have to use.

[–] nimpnin@sopuli.xyz 2 points 1 day ago

at least not on all the machines that I have to use

Ok?

[–] Aatube@kbin.melroy.org 18 points 2 days ago (2 children)

Your scripts should have Bourne shebangs

[–] syklemil@discuss.tchncs.de 10 points 2 days ago* (last edited 2 days ago)

Yeah, there should be a clear separation between scripts, which should have a shebang, and interactive use.

If a script starts acting oddly after someone does a chsh, then that script is broken. Hopefully people don't actually distribute broken script files that have some implicit dependency on an unspecified interpreter in this day and age.

[–] communism@lemmy.ml 2 points 2 days ago (2 children)

They have !/bin/sh shebangs. /bin/sh is a symlink, in my case to zsh. I like using one language.

[–] ReversalHatchery@beehaw.org 6 points 2 days ago* (last edited 2 days ago) (2 children)

than your hashbangs are bad. isn't their point to tell the kernel exactly which interpreter can process it correctly?

[–] Aatube@kbin.melroy.org 4 points 2 days ago

To be fair, I'm fairly sure the zsh interpreter has a POSIX sh mode

[–] communism@lemmy.ml 2 points 2 days ago

They're posix scripts... Any posix compliant bin/sh can interpret them.

[–] Aatube@kbin.melroy.org 2 points 2 days ago

Hopefully you're not using the sh language—hopefully you're restraining yourself from using any of the non-POSIX extensions then

[–] phantomwise@lemmy.ml 10 points 2 days ago (1 children)

I don't really mind having a non-POSIX shell since it doesn't prevent bash scripts from working, but I get that if you want portability bash is still best since it'll work mostly anywhere.

[–] 4am@lemmy.zip 2 points 2 days ago (1 children)

If I can shebang nutshell (assuming all the builtins from bash or even sh work) and pass a flag to remove all the fancy UI-for-humans formatting so that piped commands int eh scripts work, then I think this is incredible.

Yeah having this installed along side other more “standard” shells is fine I guess, but it looks like maybe it has some neat functionality that is more difficult in other shells? I guess I’d need to read up on it more but having a non-interactive mode for machines to read more easily would be a huge plus for it overall. I suppose that depends on what it offers/what it’s trying to accomplish.

[–] Aatube@kbin.melroy.org 6 points 2 days ago (1 children)

The Unicode bars aren't actually stored; that's just the graphical representation of the table datatype which you can think of as JSON

[–] rokejulianlockhart@lemmy.ml 1 points 1 day ago (1 children)
[–] Aatube@kbin.melroy.org 4 points 1 day ago

exactly

some claim that was the inspiration for nushell: powershell but less verbose and more bashy

[–] MonkCanatella@sh.itjust.works -3 points 2 days ago

I love NuShell but it is annoying when using LLMs to generate troubleshooting code.