add fish aliases/abbrs

This commit is contained in:
John Bowdre 2023-08-04 08:48:38 -05:00
parent 668521f9ed
commit 51b6f81eec

View file

@ -1,17 +1,14 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }: {
let
inherit (lib) mkIf;
hasPackage = pname: lib.any (p: p ? pname && p.name == pname) config.home.packages;
hasExa = hasPackage "exa";
in
{
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAbbrs = rec { shellAbbrs = rec {
ccat = "egrep -v '^\s*(#|$)'";
jqless = "jq -C | less -r"; jqless = "jq -C | less -r";
ls = mkIf hasExa "exa"; k = "kubectl";
n = "nix"; n = "nix";
scppass = "scp -o PubkeyAuthentication=no";
sshpass = "ssh -o PubkeyAuthentication=no";
tf = "terraform"; tf = "terraform";
tfyolo = "terraform apply -auto-approve"; tfyolo = "terraform apply -auto-approve";
vi = "vim"; vi = "vim";
@ -19,7 +16,7 @@ in
}; };
shellAliases = { shellAliases = {
ssh = "TERM=xterm ssh";
}; };
functions = { functions = {