Didn't know about auto populating search queries, abbreviations, string scripting, and using private mode.
The BEST Shell Youโre Not Using - Fish - YouTube
https://youtube.com/watch?v=lzTDo1KsL-I
https://youtube.com/watch?v=lzTDo1KsL-I
Didn't know about auto populating search queries, abbreviations, string scripting, and using private mode.
32 Comments
BrianTheeBiscuiteer@lemmy.world · 45 pts · 358d
But I am using Fish. It's like you don't even know me!
hperrin@lemmy.ca · 14 pts · 357d
But I am using fish.
Fizz@lemmy.nz · 10 pts · 356d
I'm worried that I'll get used to the quality of.life improvements and then I'll make a dumb mistake using bash at work.
xav@programming.dev · 3 pts · 356d
Simple solution : use fish at work
Laser@feddit.org · 3 pts · 356d
Just don't microwave it.
Ephera@lemmy.ml · 10 pts · 357d
I wish that
stringcommand and also theirmathcommand were just general-purpose utilities pre-installed on all systems.Tried to script something with
sedthe other day and was so confused why my regexes weren't matching, until we realized you need to pass--regexp-extendedto get modern-day regex.And then I later tried to calculate an average, which
bcdecided to round down, because it was presumably doing integer math. I actually ended up runningpython -c "print($total /$count)", because I could not be arsed to work out, if there was some flag to makebcwork properly.I'm fine with these tools continuing to exist for legacy purposes, but I would like a modern replacement just about now.
gamma@programming.dev · 4 pts · 357d
string split/collectand similar can't work unless its a builtin. Theset foo ( ...... | string ... )pattern couldn't work ifstringwas an external binary.clot27@lemmy.zip · 6 pts · 356d
Jokes in you, I am already using it
prettybunnys@sh.itjust.works · 2 pts · 356d
Fish + starship is my go to
gamma@programming.dev · 6 pts · 357d
Scrubbing through the video, this hurts my soul
For variables bash has PE forms:
I miss these too much when I try Fish.
Laser@feddit.org · 1 pts · 356d
What's so bad about
string replace World Bash $STRING?gamma@programming.dev · 0 pts · 355d
Nothings bad about it. I don't think it's strictly better or worse. Just
Laser@feddit.org · 1 pts · 355d
I haven't watched the video, but maybe it wasn't in bad faith, but the author didn't know better. bash can be arcane at times, like when I open my old scripts I often have no clue what exactly is going on without comments. Substring removal comes to mind.
HappyFrog@lemmy.blahaj.zone · 5 pts · 358d
I use Nushell, yes, I know I'm insane.
gamma@programming.dev · 6 pts · 357d
I get annoyed by differences with (Ba|Z)sh when I try Fish, but nushell is so much its own thing that it's fun.
rozodru@social.vivaldi.net · 5 pts · 358d
@HappyFrog @ruffsl you're not insane. I think you're a person that knows what they like and knows what works for them which is the beauty of Linux.
Also I've never heard of nushell and now you've made me want to check it out!
HappyFrog@lemmy.blahaj.zone · 3 pts · 358d
Thank you :3 I just like structured data. It's tedious, and it won't work with most apps, but it's beautiful.
Cris_Color@lemmy.world · 4 pts · 357d
I'm glad you mentioned nushell (it sounds like) is a more poweruser thing. Someone recommended it in place of fish in another thread and I was curious to check it out, but it sounds like not at all what I want or need as a fish user and that saves me the trouble of trying to make heads or tails of a terminal tool I don't understand
But it looks like a cool project and I'm glad it exists for people like you! ๐
Laser@feddit.org · 1 pts · 356d
It serves a different niche. nushell is very good for working with structured data. fish on the other hand is a "conventional" shell that's not POSIX compliant. I guess that's why they call it "a command line shell for the 90s" because it doesn't incorporate modern concepts, it's just more convenient than POSIX shells.
This results in some notable differences: nushell for example has actual data types (https://www.nushell.sh/book/types_of_data.html, though they are dynamically typed by default).
All this doesn't mean that one is better than the other. I use fish daily and just sometimes dabble in nushell because most of my workflow doesn't require all the stuff nu offers.
Cris_Color@lemmy.world · 1 pts · 356d
The only thing I really care about is my terminal having a slightly more approachable user friendly ux when I need to do things in the terminal that can't be done graphically.
I'm generally a fairly non-techincal (by linux community standards) design nerd. I'm not even sure what strucrued data would really mean, so I'm pretty sure it's not useful to my usecase lol
When I need to run random shell commands I found on the internet like the non-technical, bad-life-decision-maker that I am I can just run them through bash instead ๐คท
The only thing I miss from bash is things like !! Which I think fish is in the process of adding (there's a keyboard shortcut that I think allows you to fill the same need but I find it harder to remember and have been having fun using opendoas in place of sudo, which the shortcut uses by default)
Laser@feddit.org · 2 pts · 356d
Probably not, but to give an easy example:
Here,
lsdoesn't just return a string representing directory content as text, but a table where each file is an entry with attributes that have their own data type (e.g.sizeisFilesizewhilemodifiedisDatetime). That's why I'm able to filter based on one of them; that part isn't part ofls, but of the shell itself. In a classic shell, this filtering would need to be handled in the originating binary in its own specific way, or you'd need to parse its output, transform it using tools likesedandawketc. This here is a special case becauselsis built into the shell; for non-builtin commands, if they offer it, you can have them output structured data as json or something else and read it into nu, likeIt's kind of cool, but I don't need it that often either, so I just play around with it when I feel like it.
Cris_Color@lemmy.world · 1 pts · 355d
Interesting, thank you very much for taking the time to explain ๐
yetAnotherUser@lemmy.ca · 2 pts · 356d
I wouldn't use Nushell as my main shell, but I love using it for data manipulation. It's incredible for that <3
afaik it's way more versatile than using
jq.SinTan1729@programming.dev · 3 pts · 356d
It's perfect for daily interactive use, but terrible for scripting. I write almost all my scripts in
bash, the only exceptions being convenience scripts forfishitself.traceur301@lemmy.blahaj.zone · 2 pts · 356d
I still work with bash scripts from fish (to interoperate with bash users), but it's more like how I use python: the interpreter is specified either in the shebang or explicitly on the cli command invoking the script. It works quite well actually
Laser@feddit.org · 2 pts · 356d
Same, but I don't think it was ever intended differently; I mean the word interactive is literally in the name. If you want portable scripts, use bash. For simple helpers, quickly define a function. If you feel your script becomes too long, use Python.
SinTan1729@programming.dev · 3 pts · 356d
Agree, although I've recently replaced the python usecase with Go. Almost as easy to write, but much faster and safer.
Laser@feddit.org · 1 pts · 356d
Oh yeah, I never used Python myself and did some very simple (but IMHO too much hassle in bash) Go stuff some time ago. It's a really good language for that, and if you can't build on the target, the binary is statically linked anyways.
UndercoverUlrikHD@programming.dev · 1 pts · 350d
How is Go safer?
SinTan1729@programming.dev · 2 pts · 350d
Well, it's statically typed, and it's memory safe. (There can be some race conditions during concurrent execution, but that's not relevant for simple scripts.)
cupcakezealot@piefed.blahaj.zone · 3 pts · 356d
need a blahaj shell desperately
Sturgist@lemmy.ca · 1 pts · 354d
I had to switch from fish to bash because one command to install S.T.A.L.K.E.R. - G.A.M.M.A only works in bash. I have no further details on why ๐คท