ed .ssh/config
68d
wq
done, didnt fill my terminal with vim or emacs, didnt tab over to my gui editor then back againalso it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions:
postPatch = ''
ed Makefile <<EOF
/^CFLAGS/s/-DFOO//
/-funroll-loops/s//-ffast-math/
/_BSD_SOURCE/s//_DEFAULT_SOURCE/
/^LDFLAGS/d
/ranlib/s,,${pkgs.my_special_epic_ranlib}/bin/ranlib,
wq
EOF
'';
etc etcsure, using ed as your daily driver code editor in 2022 is probably stupid, but it's still useful enough that any linux distro that excludes it by default irritates me
I think this is my ed use-case as well. I've noticed I need to "apt-get install ed" sometimes. The standard editor is not always standard, it seems.
one of these days i will go around pestering distro release engineers to include it; after all, it's less heavyweight than any one of their homespun lightdm greeters
https://pubs.opengroup.org/onlinepubs/009604499/utilities/se...
It's "ed" which is de facto non-standard.
Linux distros don’t follow a standard anymore, as as I can tell. And Linux was never entirely POSIX compliant.
sed -i 68d .ssh/config
It was an eye-opening experience for me when I realized sed and ed commands are almost identical
ssh-keygen -R $HOST
IIRC the security warning actually used to suggest this command, but then stopped in order to discourage people from thoughtlessly bypassing it. (I don’t like this pracrice of deliberate unhelpfulness—cf Chrome’s “thisisunsafe” HSTS override—but neither do I like the results of being helpful in such cases. Ugh.)> also it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions
As far as I can tell, your ed script sans the wq at the end is a valid sed(1) script, and that is what people usually use for casual patching in packaging situations (although Nix also has substituteInPlace et al).
> no reason
This is like saying "There is no reason to use UNIX (now that we have Ubuntu, Gnome, and Wayland)." Personally, I tend to stick with the CLI for as long as it gets me where I need.
(And then install Emacs and turn off the screen candy fluff they've added over the last 25-30 years).