this post was submitted on 13 Dec 2025
25 points (87.9% liked)

Linux

10948 readers
683 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

I am writing POSIX shell scripts quite often, mostly for speed and portability. Though, that might not even be needed, as bash might have gotten a speed increase compared to dash, ash and whatnot.

Here are some tests I plan to run to see if the speed difference is still the case

As my normal user shell I use fish since quite some time. I enjoy

  • a simple PS1 that shows the git branch, git status, truncated path where I am
  • autocompletion based on history
  • autosuggestions from -h or --help even if the tool has no autocompletions in other shells
  • abbr instead or alias is quite cool to not forget the actual commands. But I can live without

I dont use more features really. I have a couple of fish functions, and fish might just be a better bash with easier syntax. But bash is the standard, so I never use them anyways.

I wouldnt want to switch to zsh because it is weird permissively licensed. But if it is faster or better than bash, maybe?

I also like that fish is completely rewritten in rust. There is rusty-bash aka. sushi shell, anyone use that? Is is compatible with modules?

Are these extensions just scripts that you run on startup of the shell?

you are viewing a single comment's thread
view the rest of the comments
[–] pantherina@feddit.org 2 points 3 weeks ago (2 children)

Yes that is what I do. But bash snippets dont work in fish.

I could learn something better like lua, but never used it

[–] trevor@lemmy.blahaj.zone 1 points 3 weeks ago

I just wrap bash snippets in bash -c '<snippet goes here>' and I have a great time with Fish that way.

[–] somegeek@programming.dev 1 points 3 weeks ago (1 children)

Write anything that gets even slightly complex in either python, lua or clojure. That's my rule.

[–] pantherina@feddit.org 1 points 3 weeks ago (1 children)
[–] somegeek@programming.dev 1 points 3 weeks ago (1 children)

Look into it. Absolutely amazing language.

[–] pantherina@feddit.org 2 points 3 weeks ago (1 children)

Oooh, so Lisp huh? Why not normal lisp?

[–] somegeek@programming.dev 1 points 3 weeks ago

Welp there's no normal lisp. Clojure has more expressive power and is more functional than common lisp, it's also a hosted language so you have clojure which is on the jvm (you get access to all the libraries and adoption of jvm) you have clojurescript that runs on node (compiles to js) you have babashka that is run on graalVM for scripts, jank that is on the LLVM and etc.

It's more evolved than common lisp I would say.