Fish: add abbreviations & aliases

This commit is contained in:
GHOSCHT 2024-01-07 15:37:01 +01:00
parent 8c2ed133c3
commit 6894adf02e
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82

View file

@ -12,6 +12,7 @@
hasLazydocker = hasPackage "lazydocker";
hasNixYourShell = hasPackage "nix-your-shell";
hasShellColor = config.programs.shellcolor.enable;
hasWezterm = config.programs.wezterm.enable;
shellcolor = "${pkgs.shellcolord}/bin/shellcolor";
in {
programs.fish = {
@ -61,6 +62,13 @@ in {
slp = "systemctl suspend";
sdn = "shutdown 0";
nrs = "nh os switch ~/.setup";
ls = mkIf hasExa "eza";
ll = mkIf hasExa "eza -l";
la = mkIf hasExa "eza -la";
exa = mkIf hasExa "eza";
imgcat = mkIf hasWezterm "wezterm imgcat";
};
shellAbbrs = rec {
jqless = "jq -C | less -r";
@ -73,8 +81,13 @@ in {
nbn = "nix build nixpkgs#";
nf = "nix flake";
ls = mkIf hasExa "eza";
exa = mkIf hasExa "eza";
glk = "gpg --list-keys --with-keygrip";
gssh = "gpg --export-ssh-key";
gnk = "gpg --full-generate-key --expert";
gek = "gpg --edit-key --expert";
udmount = "udisksctl mount -b";
udumount = "udisksctl unmount -b";
};
functions = {
# Disable greeting