summaryrefslogtreecommitdiffstats
path: root/common/commandline/fish.nix
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2025-01-15 22:53:03 +0100
committerMinijackson <minijackson@riseup.net>2025-01-15 22:53:03 +0100
commita58ef3f816c19f212f24172ff2075be17bd7c29a (patch)
treec585e47b85e4984a957ddaf88ae0c6258794746a /common/commandline/fish.nix
parent07036438b2fe53b93374cb8ae0b39fdc2b2f6fdf (diff)
downloadnixos-config-reborn-a58ef3f816c19f212f24172ff2075be17bd7c29a.tar.gz
nixos-config-reborn-a58ef3f816c19f212f24172ff2075be17bd7c29a.zip
common/fish: configure some abbrs, functions, keybinds
Diffstat (limited to 'common/commandline/fish.nix')
-rw-r--r--common/commandline/fish.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/common/commandline/fish.nix b/common/commandline/fish.nix
index a371a1d..6e67865 100644
--- a/common/commandline/fish.nix
+++ b/common/commandline/fish.nix
@@ -1,9 +1,71 @@
1{ pkgs, ... }:
1{ 2{
2 programs.fish = { 3 programs.fish = {
3 enable = true; 4 enable = true;
4 useBabelfish = true; 5 useBabelfish = true;
6
7 interactiveShellInit = builtins.readFile ./fish.fish;
8
9 shellAbbrs = {
10 o = "xdg-open";
11 cpr = "rsync -ah --inplace --info=progress2";
12
13 # Git
14 # ===
15
16 g = "git";
17 gc = "git commit";
18 gca = "git commit --all";
19
20 gcs = "git show";
21
22 gco = "git switch";
23
24 # Fetch (f)
25 gf = "git fetch";
26 gfc = "git clone";
27 gfm = "git pull";
28
29 # Index (i)
30 gia = "git add";
31 gid = "git diff --cached";
32
33 # Log (l)
34 gl = "git log --topo-order";
35 glc = "git shortlog --summary --numbered";
36 glg = "git log --topo-order --graph --oneline --all";
37 glo = "git log --topo-order --oneline";
38
39 # Merge (m)
40 gm = "git merge";
41 gmt = "git mergetool";
42
43 # Push (p)
44 gp = "git push";
45 gpf = "git push --force-with-lease";
46 gpt = "git push --tags";
47
48 # Rebase (r)
49 gr = "git rebase";
50
51 # Stash (s)
52 gs = "git stash";
53
54 # Working Copy (w)
55 gws = "git status";
56 gwd = "git diff";
57 gwdt = "GIT_EXTERNAL_DIFF=difft git diff";
58 gwD = "git diff --word-diff";
59 };
5 }; 60 };
6 61
62 environment.systemPackages = [
63 pkgs.fishPlugins.fish-bd
64 pkgs.fishPlugins.grc
65 pkgs.fishPlugins.puffer
66 pkgs.grc
67 ];
68
7 home-manager.sharedModules = [ 69 home-manager.sharedModules = [
8 { 70 {
9 programs.fish.enable = true; 71 programs.fish.enable = true;