I Was DEFINITELY Using The Wrong Terminal Shell

Поделиться
HTML-код
  • Опубликовано: 12 окт 2024
  • ✅ Zero To KNOWING Kubernetes in Under 90 Minutes:
    learn.omerxx.c...
    ✅ Build a Second Brain With Neovim in Under 90 Minutes: learn.omerxx.c...
    At some point in my terminal journey I found out I completely missed out of fish...
    ⌨️ Tech I use: kit.co/omerxx/...

Комментарии • 161

  • @codeman99-dev
    @codeman99-dev День назад +22

    8:30 *Always* use /usr/bin/env in your shebang statements! There are plenty of systems where /bin/bash does not exist.

  • @ayoubelmhamdi7920
    @ayoubelmhamdi7920 День назад +11

    When the fish feature out of the box moves to a POSIX shell, it is game changing. all developers will use it.

  • @typecraft_dev
    @typecraft_dev День назад +50

    Excellent video with some awesome tips I didn't know!

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars 22 часа назад +11

    1:28, I don't think the result code is 0 due to echoing 0 but rather the echo statement executed sucessfully

  • @maxarendorff6521
    @maxarendorff6521 День назад +15

    I've been using Fish for years simply because it is so fully-featured out of the box and easy to use. If it was POSIX-compliant, nobody would use anything else tbh. Nushell looks interesting too though, maybe you should have included it in your video ;-)

    • @keaneplayingmbae2852
      @keaneplayingmbae2852 День назад

      There is a posix compliant version of fish

    • @riufq
      @riufq День назад

      ​@@keaneplayingmbae2852what's it?

    • @keaneplayingmbae2852
      @keaneplayingmbae2852 День назад

      @@riufq there are many but most of them are not actively managed. nsh and fizsh are the main two I know but it's just better to use bass instead

    • @riufq
      @riufq День назад

      @@keaneplayingmbae2852 okay thanks

  • @gr33nDestiny
    @gr33nDestiny День назад +6

    I started using fish a few years ago, I have known about it longer, but I kept seeing people using zsh and so I thought maybe Fish was missing something and I didn't have time to check it out fully. When I did have time I realised I wasn't missing out using Fish and that it was saving me time if I had to re-setup so I just figured I would default it. This was a great explanation you did tho was nice to watch

    • @devopstoolbox
      @devopstoolbox  15 часов назад +1

      Thanks! and I agree with every word

    • @gg-gn3re
      @gg-gn3re 6 часов назад +1

      I keep seeing people say to use zsh too but I tried fish like 15 years ago and every time I get on a machine with zsh I just hate it. I'd rather just use bash than zsh.. if I have a choice though, fish

  • @soymadip.
    @soymadip. День назад +25

    Another modern alternative shell is `NuShell` which is a modern shell. try that out. (it's cross paltform too)

    • @CNich90
      @CNich90 День назад +3

      Nutshell is fantastic!

    • @plaintext7288
      @plaintext7288 День назад

      does it support braazilin nuts though?

    • @CNich90
      @CNich90 День назад

      @@plaintext7288
      Sorry, that’s still in beta. Macadamia, Walnut, and pistachio though are supported.

    • @summerWTFE
      @summerWTFE День назад

      As soon as they implement history substring search by pressing the up arrow I’ll start using it.

    • @joegrier9934
      @joegrier9934 23 часа назад +1

      If you like nu check out elvish. It's still in early days but I really enjoy the workflow

  • @domsch1302
    @domsch1302 День назад +5

    With any other shell, i'd still keep bash as my login shell. And with that, using any other shell as my interactive shell would mean managing two environments. SSH Agents don't carry over or unlock on Login, Paths need to be managed in two places etc. For me, managing a second shell on top of bash was just to much stuff for what little benefit they gave me. With fzf i get all the completion and history in bash as well. I can also whip up a fancy prompt with git integration etc. And since many of my shells are in emacs, i get vim mode "for free".

    • @Mankepanke
      @Mankepanke 16 часов назад

      Why would you keep bash as your login shell, though? Seems to me that you're just listing the reasons why you shouldn't do that instead of reasons not to switch shell.

  • @AdamHillikerLikesRobots
    @AdamHillikerLikesRobots День назад +7

    I use ohmyzsh but really only feel like I take advantage of the completion and appreciate the coloration. I agree that it's bloated for my needs. I would love to see a video about going from ohmyzsh to simply zsh with control over which plugins a user might want. Cheers!

    • @dimaryk11
      @dimaryk11 День назад

      You include the plugins you need in zshrc though?

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      check out the video I made with starship! I'm a big starship fan and I still use it!
      my config is here - dotfiles.omerxx.com

    • @j4yd34d5
      @j4yd34d5 2 часа назад

      "the valuable dev" has a really good series of blogs on how to set up zsh without any frameworks.

    • @j4yd34d5
      @j4yd34d5 2 часа назад

      the valuable dev has a really good blog series on how to set up zsh without any frameworks

  • @takennmc
    @takennmc День назад +9

    i tried fish tho sometimes it does get annoying when you want to quickly export a variable or if you want to use a tool that doesn't support fish

    • @oguzhanyyo
      @oguzhanyyo День назад +2

      Check bass, which is a fish plugin that let's you run bash commands

    • @keaneplayingmbae2852
      @keaneplayingmbae2852 День назад +1

      There is also a posix complaint version of fish if bass sucks for you

    • @riufq
      @riufq День назад +1

      ​@@keaneplayingmbae2852can you just tell the name?

    • @MichaelButlerC
      @MichaelButlerC День назад

      Yeah this was my experience. Fish was really cool but I didn't feel like doing any extra work getting other stuff working (didn't want to figure out bass)

    • @theherk
      @theherk 22 часа назад +2

      What doesn’t work for you? `set` isn’t exactly arduous to type.

  • @madmaxdev
    @madmaxdev День назад +5

    I've been using fish for long time, no config, more features out of the box.

  • @leif_p
    @leif_p День назад +1

    To edit a long command in bash emacs mode (like at 2:23) type C-x C-e. You still need backslashes to break a command across multiple lines.

  • @c_kemper
    @c_kemper День назад +6

    Hopefully that api key isn’t valid anymore…

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      I made sure of it but thanks 😅

  • @corewarrior
    @corewarrior День назад +3

    definitely curious about Fish programming. I'm also curious about the difference between vi mode in Bash and Fish, particularly since vi mode in Bash is like a superpower

    • @freeo6242
      @freeo6242 День назад

      Also have a look into "zle" vi mode from zsh. It has more vi features compared to bash.

  • @freeo6242
    @freeo6242 День назад +2

    Your "Part 2: Differences from Bash" would be the most important part IMHO. I never bothered with fish because of non-posix-compliancy. I watched this video expecting to learn "how bad is it really?". So waiting for part 2. Also thought nushell would be a part of a video in 2024 covering shells. The big question I want to answer by watching all this: Is nushell worth breaking with posix, but fish is not? That is my current working assumption that I want to test.
    Thanks for the mention to local atuin - will set this up eventually.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      There's an atuin video i made recently if you want it as well :)
      And yeah, I'll get to the other modern options soon enough! thanks

    • @teeesen
      @teeesen 12 часов назад

      For your terminal shell there is very little advantage to being posix compliant. You need posix compliance if you write scripts for other people to run, but that’s not your interactive shell. The only disadvantage comes when you have to “source” some script written by someone else or when installing some piece of software involves a complex addition to your configuration file. An example of the former is activating a python virtual environment.

    • @freeo6242
      @freeo6242 2 часа назад

      @@teeesen I'm not just a single user. I want to answer the question: should the whole team and in extension the whole company move to nushell for ALL shell scripting?
      I don't care much about my personal scripts. Currently I use #!/bin/zsh to execute them, because even those scripts aren't compatible with bash. Doing a lot of executing background jobs lately, where the zsh syntax has some advantages, where bash is just plain confusing. I'm just faster in zsh. Still, it's pretty close to bash, unlike nushell. But my gut feeling is, that nushell might actually be worth it. But it would be a bold move to make it the default and leave bash behind.

  • @josh6657
    @josh6657 10 часов назад

    Great video! I’ve been using fish shell for about a year now and never knew about the fish_config command.

  • @MarkusBurrer
    @MarkusBurrer 6 часов назад +1

    You really should try Nushell

  • @rainerblessing923
    @rainerblessing923 День назад +1

    There is also csh, so using "zed shell" might be less confusing.

  • @funkdefied1
    @funkdefied1 День назад +2

    I love fish, but I still end up writing my scripts in bash so that others can use it

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      I mean, why not? you've got the interpreter always there. the shabang does it's job and you can choose your language freely

  • @zrotrasukha8733
    @zrotrasukha8733 18 часов назад

    Man your videos are so calming and interesting, also I learned about setting vim mode in bash, though I have always used bash, but hey, thanks for the motivation!

  • @anonymousalexander6005
    @anonymousalexander6005 День назад +1

    trust me. use nushell or powershell unless you want to have to use python/js for anything more than a couple lines.

  • @RockTheCage55
    @RockTheCage55 День назад +1

    Definitely interested in how fish differs from bash thanks….

  • @orilivni2730
    @orilivni2730 День назад +6

    Have you tried Nu Shell?

  • @Ziggurat1
    @Ziggurat1 День назад +1

    Of course it is easy to assume zsh replaced bash on macos, but in fact it didn't. The previous default shell on Mac was tcsh :)

  • @mmj5916
    @mmj5916 День назад +2

    I use bash with blesh and starship, and I have mostly all the features you talked about.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      Yep, legit! My only claim here is that fish does most of it out of the box. That's why I was shocked

  • @somerandomdude-UWU
    @somerandomdude-UWU День назад +4

    Bro, I really wanna have my setup on NixOS and am currently on arch. But it seems like a rabbithole. I know there are resources like docs and vimjoyer videos, but I'd love if u give a full setup tutorial. 🥺

    • @md.taufikkhan6832
      @md.taufikkhan6832 День назад

      It's not that hard

    • @somerandomdude-UWU
      @somerandomdude-UWU День назад +1

      ​@@md.taufikkhan6832 It's overwhelming...
      There is a lot.

    • @devopstoolbox
      @devopstoolbox  14 часов назад

      I actually did make a video, one that covers the basics from scratch to a running flake and then another for mac users. check them out!
      it is a rabbit hole though... so watch out ;)

  • @RenderingUser
    @RenderingUser День назад +3

    One of my favorite things about fish that you havent yet mentioned, is fish saving directory a command is run in
    this gives fish directory specific history. meaning for some directories where i run a couple commands, all i have to do is press up and everything is handled

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      Totally! I'm so used to Atuin by now (it comes with the feature) that I missed it

    • @RenderingUser
      @RenderingUser 15 часов назад +1

      @@devopstoolbox you gave me a reason to keep using nushell

    • @RenderingUser
      @RenderingUser 14 часов назад +1

      @@devopstoolbox you just gave me a reason to keep using nu shell

  • @iduran
    @iduran День назад +1

    I used fish for many years but came back to zsh. Reason, there are a few things that I can’t do in fish, such as expanding ** with tab as part of fzf. Also, here and there there are instructions for something that would work in either bash or zsh but not in fish, so would have to spend time tweaking those instructions to fish. But otherwise, fish is great.

    • @devopstoolbox
      @devopstoolbox  15 часов назад +1

      1. Makes total sense
      2. It feels like those who'd feel the "edges" of fish are power users like yourself, which are also likely to go deeper into fish.

  • @laurentevrard8194
    @laurentevrard8194 День назад +3

    You should take a look at nushell !

  • @shyampadia
    @shyampadia День назад +3

    What about nushell?

  • @StefanoCanepa1970
    @StefanoCanepa1970 19 часов назад

    I switched to fish a few months ago. I'm not going back.

  • @ianliu88
    @ianliu88 19 часов назад +1

    echo 0 isnt equivalent to true. The truthiness of a command is its return code, not what it prints to stdout

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      hmm yep. I guess I should have stressed that out. thanks

  • @commandantkeen
    @commandantkeen День назад +1

    Nice video, but still prefer zsh over fish, due to at work we only use bash and zsh.

  • @josh6657
    @josh6657 10 часов назад +1

    Can you tell us what browser you’re using? It looks like safari but I’m not sure how you get the transparent background.

    • @devopstoolbox
      @devopstoolbox  2 часа назад

      It's Arc, the transparency is just a video edit trick... (sorry 😉)

  • @kavishgour3267
    @kavishgour3267 6 часов назад +1

    What's the symbol thingy above your prompt ? Is it starship ? It looks like that it stays in place. First time seeing this.

    • @devopstoolbox
      @devopstoolbox  2 часа назад

      This is tmux :) I have the tmux bar show on top to separate from nvim and it works better IMO.
      Here's my tmux vid: ruclips.net/video/GH3kpsbbERo/видео.htmlsi=ZNrqeVGZITN0MR7I (upgraded since - more videos on the channel with the new setup)
      I also have a video going through the entire terminal setup if you want.
      and my dotfiles: dotfiles.omerxx.com

  • @nizexlizzy
    @nizexlizzy День назад +1

    You didn't go into any plugins or vi commands for fish. I'm also having fish_config crashing and not sure how to turn off things like showing me my branch of git when in projects. I don't like that feature. I'm playing around with it atm to see how it works overall. I do like not having to install 20 plugins to get things working but not sure how to tweak things without fish_config working.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      I didn't have issues, and I get your point (add starship on top?) but it takes a bit of config to start with but then you're off.

  • @PauloFassina
    @PauloFassina День назад +1

    You might want to check nushell

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      It's coming up a lot in the comments! On it.

  • @KuyaAndreV
    @KuyaAndreV День назад +1

    I'm too comfortable zsh already, so if fish every became THE thing I'll have to join the party late. But wow the config GUI looks amazing. Is that not possible with zshrc or bashrc?

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      What a feature huh?!
      And no, not that I know of...

  • @Sluggernaut
    @Sluggernaut 11 часов назад +1

    Is ZShell the standard on Mac or something? Why would most people be using zsh and not bash, by default? (I've heard good thing about zsh and OhMyZsh, I just had no idea the majority of people used it)

    • @devopstoolbox
      @devopstoolbox  2 часа назад

      So yea, it's default on macs now (someone in the comments mentioned it didn't actually replace bash on mac, but tcsh).
      It's just better, comes with more features, easier to config and nicer to use.
      If I'm honest, they can both enjoy one framework or another (like oh my zsh for example) and becomes infinitely better

  • @PanTek-r8g
    @PanTek-r8g День назад +1

    fish is nice...do you have a nix config to look at? Are you exclusively fish now?

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      everything's here: dotfiles.omerxx.com (although I don't think I made any special changes this time around).
      I wouldn't say I'm 100% but I'm definitely trying, just for the learning experience and then maybe it'll stick

  • @subatomicmolecules
    @subatomicmolecules День назад +5

    For fish and zsh, they have their own prompts Tide and Powerlevel10k respectively. They both provide the same features as starship but with much more optimization. For example, they both have async git status, which starship can't implement.

    • @aquepaique
      @aquepaique День назад

      How tide and powerlevel are more optimized than starship?

    • @keaneplayingmbae2852
      @keaneplayingmbae2852 День назад +3

      @@aquepaique also powerlevel10k has been archived

    • @subatomicmolecules
      @subatomicmolecules День назад +1

      @@aquepaique async git prompt and shell specific hacks. When your project has only 1 supported shell and not basically every shell in use, you have time to spend on optimization.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      I must say, I've been a powerlevel10k user for a VERY long time. works great, but not as lean and fast as starship IMO...

  • @qazyhn94
    @qazyhn94 День назад

    what terminal he uses? such a beautiful design

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      Thanks! the video was made with wezterm and I'm now testing Ghostty (video soon), that said, you won't feel the different, at least not visually. All my config is here: dotfiles.omerxx.com and you can find a video I made a couple months back going through the entire setup!

  • @jayarmstrong
    @jayarmstrong День назад

    vi mode seems redundant when you have a programmable keyboard. Home row navigation keys changed the game.

    • @freeo6242
      @freeo6242 День назад

      commands like diw di( di" proove your statement is wrong. Why would I program the keyboard for such tasks, when zle vi mode (zsh) exists? Not sure if your keyboard is even more programmable then mine, but ofc I use home row navigation on a different layer. I wouldn't program advanced text editing functions though into the keyboard itself. Just think of "f" to go to a character in a long command. Vi mode is anything but redundant. And if your keyboard makes this redundant, please send me a link.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      can't say that I agree. I'm not a home row fan as the latency bothers me a lot. found some other solutions, but vim motions are a muscle memory to me and having them inline is a game changer for me!

    • @jayarmstrong
      @jayarmstrong 12 часов назад

      @@devopstoolbox 👍 whatever's fastest. I love that we can all use what works for us. I retrain when I find better layouts.
      Is the latency from holding home row keys to activate an arrow? I have my full nav layer triggered by a thumb key so there's no latency there

    • @freeo6242
      @freeo6242 2 часа назад

      @@devopstoolbox What do you mean by latency on the home row?

  • @mskalo-1848
    @mskalo-1848 День назад +1

    how do you make browser transparent, I would love you to make a video if't too comlicated.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      The unfortunate answer is that it's a video editing trick. And, even if it was real, don't you think it'd be distracting as hell? 😅

  • @carlhandy
    @carlhandy День назад +1

    Fish is great... its the default of the freeBSD OS

    • @talideon
      @talideon День назад

      It isn't. The default shell on FreeBSD is ash, a Bourne shell implementation, and formerely tcsh for the root user.

  • @driden1987
    @driden1987 День назад +1

    api key leak alert 🚨

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      haha, was waiting for someone to notice ;) it's been rotated, but give it a go 😅

  • @towelie_dev
    @towelie_dev День назад +1

    thanks for the "v" to open cmd in editor. Didnt knew that! how can we set this to nvim for example?

    • @leif_p
      @leif_p День назад +1

      Set your EDITOR variable to nvim. He shows his at 2:33

    • @towelie_dev
      @towelie_dev 23 часа назад

      @@leif_p missed that part! but doens't seem to work for wsl (atleast for me, for whatever reason)

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      export EDITOR=
      (or "set" in fish)

  • @jochenburkhard9132
    @jochenburkhard9132 День назад

    Am I right that you not only presume your audience using Linux (or Mac, I cannot tell and you just won't) but require that as setup for your videos? If I'm mistaken, what do I miss here? I love your content and try to make sense of it as a Windows user.

    • @devopstoolbox
      @devopstoolbox  15 часов назад +1

      Well, in a way, yeah. I'm using mac and lots of Linux in my line of work, but since windows and bash are friends now I guess you can get the same.
      That said, I definitely didn't try any of it on windows machines... (sorry)

    • @jochenburkhard9132
      @jochenburkhard9132 6 часов назад

      @@devopstoolbox No need to be sorry 🤗 I just wish you'd bring some less demanding, noob-compatible content I could follow up on. I'm especially fond of your nvim notetaking approach but wasn't able to get anything substentially out of it (Yeah, I have a macbook as well). Thank you anyway for your inspiring top-notch content.

  • @GV14982
    @GV14982 День назад +2

    fish gang 🐟

  • @emidiobia
    @emidiobia День назад

    I feel like you haven't experimented enough with ZSH... You felt oh-my-zsh bloated but fish with all those features were not? ZSH has auto completion too

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      I've been running zsh for ~7 years, moved from oh my zsh to startship to manage my prompt, this killed 90% of the bloating. That said, fish defaults are mind blowing to me.... comes with so many built ins, and this turns my config to near-zero compared to earlier...

  • @comosaycomosah
    @comosaycomosah День назад +1

    Meh may have to give fish a try a boring bash type of guy tho

  • @samarthnagar2939
    @samarthnagar2939 Час назад

    No nushell??

  • @MasterHigure
    @MasterHigure День назад

    Fish, modern? I don't think so. They say themselves they are 30 years out of date. Of course, with the unstated implication that its main competitors belong even further in the past.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      It's all relative. I agree that there are WAY more modern options which I intend to get to, but theses are the leaders, and of the three, fish feels like the cool kids option

  • @alpha_proof
    @alpha_proof День назад +5

    nushell ?

  • @weiSane
    @weiSane День назад +2

    NuShelllllllllllllllllllllllllllllllllllllll👌

  • @vikaspoddar001
    @vikaspoddar001 День назад +2

    nushell video please

  • @dereklomax161
    @dereklomax161 День назад +3

    "You can now pick your nushell"..... wait you didn't explain nushell!
    I've tried all of these shells and they are great. But I have a requirement these don't meet of a full cross platform support.
    Powershell 7 is my true shell love! It's FOSS, and it's powerful!
    The thing I really love about powershell is an oop pipeline instead of just text pipeline.
    Proficiency in powershell doesn't require other programs for basic tasks like parsing to and from json or xml.
    The language itself is so much more friendly too!
    You can even write modules in C# or F# to create lightning fast configs! Or load native dlls and run pretty much anything.

    • @devopstoolbox
      @devopstoolbox  14 часов назад

      I get it, but I'm far from windows-based working environments... that said, working on exploring and covering nushell!

  • @lbGkifoo1bj12e9plhjfWA
    @lbGkifoo1bj12e9plhjfWA 17 часов назад

    I still don't get the hype about all these terminals and bash alternatives..
    Not a fan of too fancy features that might break at inconvenient times, or which is incompatible at inconvenient times...
    I am staying with alacrity and bash for now.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      I must be honest - there's a huge difference between zsh / fish and the smaller ones like nushell etc. These are battle tested for real. Maybe not around as long as bash but definitely not new.

  • @mikegreiling
    @mikegreiling День назад +5

    "ok, let's move on to the real reason we're here" at 2/3 of the video runtime 😂

  • @somerandomdude-UWU
    @somerandomdude-UWU День назад +1

    UwUbuntu got hyprland in 24.10 ☠️
    (First btw)

  • @aftamohd
    @aftamohd День назад

    No doubt fish is good but I bet you will come back with a video soon stating back to zsh !!! By the way Very nicely presented as always

    • @devopstoolbox
      @devopstoolbox  15 часов назад +1

      Thanks!
      And you may be right 🤷

  • @randall.chamberlain
    @randall.chamberlain День назад

    I use the even better fizsh

  • @cnlawrence1183
    @cnlawrence1183 День назад

    Thanks for making videos.
    I might be the only person here with this take but I really want to listen to the content; However, something about the typing is really off putting asmr.

    • @freeo6242
      @freeo6242 День назад

      "Your $500 keyboard sound is off putting asmr" is the most 1st-world-problem I've heard today.

  • @RazoBeckett.
    @RazoBeckett. День назад +2

    IMO zsh is best balance between bash and fish, so it's zsh for me!

  • @0xchilli
    @0xchilli День назад

    bash us please with tips

  • @TheLotw
    @TheLotw День назад

    Wrong. bash is all you need, the rest are just bloat and FIsh is the worst as its not POSIX complaint so some things done work.

    • @devopstoolbox
      @devopstoolbox  15 часов назад

      Well, like many things, it's not about wrong and right, it's about what works for you...
      ymmv you know

  • @CZiNTrPT
    @CZiNTrPT 27 минут назад

    Finally

  • @VioletJewel1729
    @VioletJewel1729 День назад

    skill issue

  • @NehalHasnayeen
    @NehalHasnayeen День назад +2

    check out nushell

  • @niksingh710
    @niksingh710 День назад +1

    Man dash is the best 🥸