feat(shell): curated git/nix/navigation aliases on by default
Extend the zsh shellAliases in shell.nix with a curated, on-by-default set: navigation (.., ..., ....), a git block (g, gst, ga/gaa, gc/gcm, gco/gsw, gb, gd/gds, gl/glg, gp/gpl, gf), a nix block (ns, nr, nfu, nfc, nsearch, ngc), and path/reload. Same restraint as rg/fd: short where it helps but never shadowing a real binary — the git set keeps off gs (ghostscript), and the system/home rebuilds keep their sys-update / home-update names rather than cryptic aliases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -113,10 +113,14 @@ how to override it. Items marked ✓ are shipped.
|
|||||||
summer-day/night menu buttons now use its `U+F000` glyph with
|
summer-day/night menu buttons now use its `U+F000` glyph with
|
||||||
`font-family: Nomarchy` pinned in their CSS (Nerd Fonts also occupy
|
`font-family: Nomarchy` pinned in their CSS (Nerd Fonts also occupy
|
||||||
U+F000, so the pin is required). The other themes have no logo button.
|
U+F000, so the pin is required). The other themes have no logo button.
|
||||||
- **Quality-of-life command aliases:** assemble a curated collection of
|
- ✓ **Quality-of-life command aliases:** a curated set ships on by default in
|
||||||
shell aliases/abbreviations for common operations (git, nix, navigation,
|
`modules/home/shell.nix` — navigation (`..`/`...`/`....`), a git block
|
||||||
the nomarchy helpers, …), themed into the zsh shell experience
|
(`g`, `gst`, `ga`/`gaa`, `gc`/`gcm`, `gco`/`gsw`, `gb`, `gd`/`gds`,
|
||||||
(`modules/home/shell.nix`). Decide scope and which to ship on by default.
|
`gl`/`glg`, `gp`/`gpl`, `gf`), and a nix block (`ns`, `nr`, `nfu`, `nfc`,
|
||||||
|
`nsearch`, `ngc`), plus `path` and `reload`. Scope decision: short where it
|
||||||
|
helps but **never shadow a real binary** (same rule as rg/fd — the git block
|
||||||
|
deliberately avoids `gs`/ghostscript); system/home rebuilds keep their full
|
||||||
|
`sys-update`/`home-update` names rather than getting cryptic aliases.
|
||||||
- **Theme-switch feedback:** ✓ the "rebuilding…" notification is now
|
- **Theme-switch feedback:** ✓ the "rebuilding…" notification is now
|
||||||
persistent (timeout 0) and replaced in place by "applied ✓" / failure
|
persistent (timeout 0) and replaced in place by "applied ✓" / failure
|
||||||
via a synchronous tag, so a multi-minute switch never reads as a failed
|
via a synchronous tag, so a multi-minute switch never reads as a failed
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ in
|
|||||||
ignoreSpace = true;
|
ignoreSpace = true;
|
||||||
expireDuplicatesFirst = true;
|
expireDuplicatesFirst = true;
|
||||||
};
|
};
|
||||||
|
# Curated, on by default. The rule (same as rg/fd above): short where
|
||||||
|
# it helps, but never shadow a real binary — so the git block keeps off
|
||||||
|
# `gs` (ghostscript), and nothing here masks a coreutil.
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
cat = "bat --paging=never";
|
cat = "bat --paging=never";
|
||||||
less = "bat";
|
less = "bat";
|
||||||
@@ -42,8 +45,42 @@ in
|
|||||||
# eza enableZshIntegration aliases ls/ll/la; add a couple extras.
|
# eza enableZshIntegration aliases ls/ll/la; add a couple extras.
|
||||||
lt = "eza --tree --level=2 --icons=auto --group-directories-first";
|
lt = "eza --tree --level=2 --icons=auto --group-directories-first";
|
||||||
tree = "eza --tree --icons=auto --group-directories-first";
|
tree = "eza --tree --icons=auto --group-directories-first";
|
||||||
|
|
||||||
|
# Navigation — climb without counting dots.
|
||||||
".." = "cd ..";
|
".." = "cd ..";
|
||||||
"..." = "cd ../..";
|
"..." = "cd ../..";
|
||||||
|
"...." = "cd ../../..";
|
||||||
|
|
||||||
|
# Git — the verbs you retype all day.
|
||||||
|
g = "git";
|
||||||
|
gst = "git status -sb";
|
||||||
|
ga = "git add";
|
||||||
|
gaa = "git add -A";
|
||||||
|
gc = "git commit";
|
||||||
|
gcm = "git commit -m";
|
||||||
|
gco = "git checkout";
|
||||||
|
gsw = "git switch";
|
||||||
|
gb = "git branch";
|
||||||
|
gd = "git diff";
|
||||||
|
gds = "git diff --staged";
|
||||||
|
gl = "git log --oneline --graph --decorate -20";
|
||||||
|
glg = "git log --oneline --graph --decorate --all";
|
||||||
|
gp = "git push";
|
||||||
|
gpl = "git pull";
|
||||||
|
gf = "git fetch --all --prune";
|
||||||
|
|
||||||
|
# Nix — the flake/store verbs (system/home rebuilds already have the
|
||||||
|
# sys-update / home-update commands, so they're not re-aliased here).
|
||||||
|
ns = "nix shell"; # ns nixpkgs#ripgrep
|
||||||
|
nr = "nix run"; # nr nixpkgs#cowsay
|
||||||
|
nfu = "nix flake update";
|
||||||
|
nfc = "nix flake check";
|
||||||
|
nsearch = "nix search nixpkgs";
|
||||||
|
ngc = "nix-collect-garbage -d"; # user generations; sudo for system roots
|
||||||
|
|
||||||
|
# Misc.
|
||||||
|
path = "echo $PATH | tr ':' '\\n'";
|
||||||
|
reload = "exec zsh";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user