xfe.li

Two shell aliases you didn't know you needed

2022-08-30 • Félix Dorn
This article is over 1 years old. I may think differently or it may be outdated.
1alias \$='true && '
2alias \#='true && '

No more going back to remove the leading $ or # from copied commands.

I’ve used this alias quite a lot.

Using home-manager.

For the one person that uses Nix:

1# May be named something else but you get the idea.
2{
3 programs.zsh.shellAliases = {
4 "\\$" = "true && ";
5 "\\#" = "true && ";
6 }
7}