home/fish: add more shellabbrs

This commit is contained in:
Guanran Wang 2024-09-21 01:33:24 +08:00
parent be96257cd6
commit f3c554e51d
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF

View file

@ -19,36 +19,56 @@
end end
''; '';
plugins = [ plugins =
{ lib.map
name = "autopair"; (f: {
inherit (pkgs.fishPlugins.autopair) src; name = f.pname;
} inherit (f) src;
{ })
name = "done"; (
inherit (pkgs.fishPlugins.done) src; with pkgs.fishPlugins;
} [
{ autopair
name = "puffer"; done
inherit (pkgs.fishPlugins.puffer) src; puffer
} ]
]; );
shellAbbrs = { shellAbbrs =
gi = "gitui"; let
n = "nvim"; cursor = f: {
s = "nh os switch"; setCursor = true;
expansion = f;
};
in
{
gi = "gitui";
p = "powerprofilesctl";
s = "nh os switch";
v = "nvim";
g = "git"; # TODO: maybe fishPlugins.fish-git-abbr?
ga = "git add"; g = "git";
gc = "git commit -m"; ga = "git add";
gca = "git commit --amend"; gac = cursor "git commit -am '%'";
gd = "git diff"; gc = cursor "git commit -m '%'";
gds = "git diff --staged"; gca = "git commit --amend";
gl = "git log"; gd = "git diff";
gp = "git push"; gds = "git diff --staged";
gr = "git rebase -i --autosquash"; gl = "git log";
}; gp = "git pull";
gpu = "git push";
gr = "git rebase -i --autosquash";
n = "nix";
nb = cursor "nix build nixpkgs#%";
nr = cursor "nix run nixpkgs#%";
ns = cursor "nix shell nixpkgs#%";
nbb = "nix-build -A";
nf = "nix fmt";
nu = "nix flake update";
nv = "nix eval";
};
functions = functions =
let let