From 9f72897072406730088d13d04e42e9712d7ba6cb Mon Sep 17 00:00:00 2001 From: rootiest Date: Sun, 26 Apr 2026 02:11:25 -0400 Subject: [PATCH] refactor: move machine-specific abbreviations to local.fish --- README.md | 22 +++++++++++++++------- conf.d/abbr.fish | 9 --------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 0b6900b..03f40e9 100644 --- a/README.md +++ b/README.md @@ -313,7 +313,6 @@ Abbreviations expand in-place as you type, keeping your history clean. | `:cdh` | `cd ~` | | `:cdp` | `cd ~/projects/` (with cursor placement) | | `:cdcz` | `cd ~/.local/share/chezmoi/` | -| `cdnote` | `cd ~/Documents/Rootiest Notes/` | ### Git @@ -354,21 +353,20 @@ These abbreviations mirror Vim/tmux ergonomics for managing Kitty splits, tabs, ### SSH -| Abbr | Expands To | -|---|---| -| `sshr` | `ssh rootiest@rootiest-server.local` | -| `sshrt` | `ssh rootiest-server` | +Machine-specific SSH abbreviations (e.g. `sshr`, `sshrt`) live in `~/.config/.user-dots/fish/local.fish`. +(See [Personalization](#personalization) for examples) ### Docker | Abbr | Expands To | |---|---| -| `dcr` | `docker context use rootiest` | | `dcl` | `docker context use default` | -| `dck` | `docker context use racknerd` | | `dcls` | `docker context ls` | | `lzd` | `ld` (LazyDocker) | +Named context shortcuts (e.g. `dcr`, `dck`) live in `~/.config/.user-dots/fish/local.fish`. +(See [Personalization](#personalization) for examples) + ### Systemctl | Abbr | Expands To | @@ -492,6 +490,16 @@ set -gx cdp /home/youruser/projects # CDPATH — directories searched by cd set -gx CDPATH . /home/youruser/projects /home/youruser + +### SSH ### +# Quick shortcuts to your own servers +abbr -a sshr 'ssh you@your-server.local' +abbr -a sshw 'ssh you@work-server.example.com' + +### Docker contexts ### +# Named shortcuts for your own Docker contexts (docker context ls) +abbr -a dcr 'docker context use my-remote-server' +abbr -a dcw 'docker context use work-server' ``` ### How it works diff --git a/conf.d/abbr.fish b/conf.d/abbr.fish index 93395ad..91310ba 100644 --- a/conf.d/abbr.fish +++ b/conf.d/abbr.fish @@ -195,15 +195,8 @@ abbr -a editt kitty @ launch --type tab nvim # Spawn window abbr -a :sw spwin -### SSH ### -abbr -a sshr 'ssh rootiest@rootiest-server.local' -abbr -a sshrt 'ssh rootiest-server' -abbr -a sshrl 'ssh rootiest@rootiest-server.local' - ### Docker ### -abbr -a dcr 'docker context use rootiest # Rootiest Server' abbr -a dcl 'docker context use default # Local Host' -abbr -a dck 'docker context use racknerd # RackNerd Server' abbr -a lzd ld abbr -a dcls 'docker context ls' @@ -225,5 +218,3 @@ abbr -a ssct 'sudo systemctl status' abbr -a sscs 'sudo systemctl start' abbr -a sscr 'sudo systemctl restart' -### Rootiest Notes ### -abbr -a cdnote 'cd ~/Documents/Rootiest\ Notes/ # Rootiest Notes'