← Back to context

Comment by yencabulator

1 month ago

I'll switch to fish after it stops expanding `car TAB` to `blkdiscard` when I don't have `cargo` in path. Non-prefix completion for commands is plain evil.

I’ll switch to fish when it comes preinstalled on all of the computers I use so I can write scripts in it.

  • I already avoid bash scripting so I lose very little. Shell scripting beyond throwaway one-liners is a problem not a solution.

    (Well that and all my machines come from the same NixOS configs.)

    • Ha that’s funny, considering nixos is 99% stdenv which is one of the worst bash monstrosities in existence, and drives people ever further into the swamp of bash. (Ever tried to debug stdenv setup hooks? I still have water damage from the tears.)

      I have personally embraced the insanity but let’s not kid ourselves about nixos basically just being three bashes in a trench coat.

      Basically https://xkcd.com/224/ , but s/lisp/nix/ s/perl/bash/

      2 replies →

  • Do you really limit your shell experience to plain POSIX? That sounds masochistic.

    • Ever since shellcheck came around I have been writing all my scripts in POSIX sh. Its not that bad actually and knowing stuff is just more compatible is worth that little friction.

      3 replies →

    • I would rather limit myself to things I know are going to be preinstalled on the platforms I use than deal with the masochism that is scripted dependency management. No thanks.

      All these comments here "Uhhh just use PythoN!" Yeah? I write scripts that need to run on macOS. No Python there. Yeah I can have my script sit there and pull the command line tools in an automated way and wait the 20 minutes it takes to install or I can pull on my big boy pants and just figure out how to do it in shell. It's turing complete. It works. Whatever.

      3 replies →

  • That's why I use C to write all my shell scripts. Can't have something non-portable like bash, which is missing from 75% of computers by default.

    (Seriously, what am I missing here? Is `apt-brew pacman install fish` really that hard to type? If cross-platform portability is actually a concern, shouldn't you be using Python anyway?)

    • I don't really care about portability as I do "how much shit do I need to install to actually get work done on my workstations and servers"

      Maybe it's because I was a sysadmin in a former life, but overmanaging is almost always a mistake. If I had one single computer and only one, sure, who cares. But I have a homelab full of servers and a constant churn of VMs and I don't need to add in another step of "oh shit X isn't installed yet". Maybe it's also because of that that I don't really give a shit about how "bad" sh/bash/zsh are.

      Yes, I can sync dotfiles and crap to git (which I also have to install to use), but it's just a small weight off my shoulders to not have to worry or think about that shit before I can use a server or workstation. I don't want to have to unlearn normal shell to learn fish and then have to switch back when I'm trying to get some thing online so that I can install fish. I'm just not fuckin interested.

      (inb4 someone is like nix solves this, i don't give a shit about nix either)

I bet this is configurable but I wanted to say that this is totally personal preference; I have the exact opposite opinion. Prefix only matching requires much more tab slapping in my experience.

  • I believe you would lose that bet. I look every few years and I don't see it

    • I gave up on fish after a few weeks because of a similar preference issue where the fish maintainers flat out refused to make a bad default configurable: https://github.com/fish-shell/fish-shell/issues/8618

      > We don't really do config flags like this, as a philosophical point.

      > I would be against accepting such a PR. I do not believe this should be changed.

      I understand that they want to keep the list of configs short and manageable, but it means that's not a tool for me. I'm all for good, opinionated defaults but I want to be able to make some changes if I want to.

      They apparently reconsidered and implemented the change since migrating fish to rust though.