members get the same aliases as the owner
The set that just went into the owner's zshrc, mirrored into shell-skel/zshrc, so a
shell on this machine and a shell in a member's account behave alike rather than
diverging by who you happen to be.
Not a copy-paste. Three differences, each because this file has rules the owner's
appended block does not:
- `n` and `vim` are NOT repeated. The Editor block above already sets them, and
only when nvim is actually installed — better than the owner's unguarded pair.
- the eza family keeps its `else` branch rather than only being guarded. A member
with no eza still gets a coloured, grouped listing instead of bare `ls`, and
every alias in the family has a real fallback: lll, lh, ltr and l were added to
that branch too rather than silently existing only when eza does.
- lazydocker is guarded like its neighbours duf and lazygit, per this file's
stated rule that nothing is required beyond zsh itself.
eza needs no separate install for members: they share the host, and machine-setup
puts it in the core package list.
KNOWN, same shape as append_once: seedShellConfig only rewrites .zshrc while it is
still byte-for-byte the template, so a member provisioned before this keeps the old
one. No members exist right now, so nothing to migrate.
Verified: zsh -n, and the fallback branch resolving all ten aliases with eza absent.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,20 +72,49 @@ elif command -v vim >/dev/null 2>&1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Aliases ──
|
# ── Aliases ──
|
||||||
|
#
|
||||||
|
# The same set the owner's machine gets, so a shell here and a shell there behave
|
||||||
|
# alike. `n`, `vim`, EDITOR and friends are NOT repeated — the Editor block above
|
||||||
|
# already sets them, and only when nvim is actually installed.
|
||||||
|
#
|
||||||
|
# The eza family keeps its `else` branch rather than only being guarded: these
|
||||||
|
# replace `ls`, and a member whose machine has no eza should still get a coloured
|
||||||
|
# listing rather than the bare one. Every other optional tool is guarded, per the
|
||||||
|
# note at the top of this file — nothing here is required beyond zsh itself.
|
||||||
if command -v eza >/dev/null 2>&1; then
|
if command -v eza >/dev/null 2>&1; then
|
||||||
alias ls='eza --group-directories-first'
|
alias ls='eza --icons'
|
||||||
alias ll='eza -l --group-directories-first --git'
|
alias la='eza --icons -la'
|
||||||
alias la='eza -la --group-directories-first --git'
|
alias ll='eza --icons -l'
|
||||||
alias lt='eza --tree --level=2'
|
alias lll='eza --icons -lA'
|
||||||
|
alias lh='eza --icons -lhA'
|
||||||
|
alias ltr='eza --icons -ltr'
|
||||||
|
alias l='eza --icons -la'
|
||||||
|
alias lt='eza --icons --tree --level=2'
|
||||||
else
|
else
|
||||||
alias ls='ls --color=auto --group-directories-first'
|
alias ls='ls --color=auto --group-directories-first'
|
||||||
alias ll='ls -lh'
|
|
||||||
alias la='ls -lah'
|
alias la='ls -lah'
|
||||||
|
alias ll='ls -lh'
|
||||||
|
alias lll='ls -lAh'
|
||||||
|
alias lh='ls -lAh'
|
||||||
|
alias ltr='ls -ltrh'
|
||||||
|
alias l='ls -lah'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
|
alias less='less -R'
|
||||||
|
alias diff='diff --color=auto'
|
||||||
|
alias cp='cp -iv'
|
||||||
|
alias mv='mv -iv'
|
||||||
|
alias rm='rm -i'
|
||||||
|
alias mkdir='mkdir -p'
|
||||||
|
alias which='which -a'
|
||||||
|
alias history='fc -l 1'
|
||||||
|
|
||||||
alias ..='cd ..'
|
alias ..='cd ..'
|
||||||
alias ...='cd ../..'
|
alias ...='cd ../..'
|
||||||
alias sz='source "$HOME/.zshrc"'
|
alias sz='source "$HOME/.zshrc"'
|
||||||
|
alias httpserver='python3 -m http.server 8888'
|
||||||
|
command -v lazydocker >/dev/null 2>&1 && alias ld='lazydocker'
|
||||||
command -v duf >/dev/null 2>&1 && alias duf='duf --only local'
|
command -v duf >/dev/null 2>&1 && alias duf='duf --only local'
|
||||||
command -v lazygit >/dev/null 2>&1 && alias lg='lazygit'
|
command -v lazygit >/dev/null 2>&1 && alias lg='lazygit'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user