Aliases & completions
Aliases
Section titled “Aliases”Global, or scoped to a package:
aliases: ll: ls -alh gs: git status
packages: - name: kubectl from: apt aliases: k: kubectl kgp: kubectl get podsA package’s aliases live with the package, so dropping it takes them with it. Global ones become a single Bedouin-owned block.
Rendering is per shell, because the syntax genuinely differs — fish’s alias
defines a function and takes words rather than an = pair:
| Shell | Line |
|---|---|
| zsh, bash | alias k='kubectl' |
| fish | alias k 'kubectl' |
Values are quoted properly, including the awkward case: a posix shell cannot
escape ' inside '…', so Bedouin closes, emits an escaped quote, and
reopens. These land in a file your shell evaluates, so the quoting matters
more than it looks.
Completions
Section titled “Completions”packages: - name: kubectl from: apt completions: generate: ["kubectl", "completion", "{{ shell.name }}"]generate is argv, run at apply time after the package is installed, and
its stdout is written to your shell’s completions directory.
| Shell | Path | Wiring |
|---|---|---|
| zsh | {rc_dir}/completions/_{name} |
added to fpath |
| bash | {rc_dir}/completions/{name}.bash |
sourced |
| fish | ~/.config/fish/completions/{name}.fish |
native |
Drift coverage is partial, and says so. The item is addressed on the
command, so editing generate: re-runs it, and a package upgrade re-runs it
too. Whether re-running would now produce different output cannot be known
without running it, which plan does not do. doctor will report a
hand-edited completions file, but not a merely stale one.