Files
dotconfs/.config/zsh/rc.d/10-aliases.zsh
T
thomas.koppandClaude Opus 5 fad8b8f78c fix: set the role colour after .p10k.zsh, and add the config alias
The colour was in 05-prompt.zsh, before oh-my-zsh. That is right for ZSH_THEME
and wrong for everything else: ~/.p10k.zsh assigns
POWERLEVEL9K_CONTEXT_BACKGROUND itself and is sourced from 30-path.zsh, so the
role colour was overwritten before the first prompt was drawn. The isolated
test missed it because the throwaway HOME had no .p10k.zsh; on the real machine
the desktop came up with 0 instead of blue.

Theme before oh-my-zsh, colour after .p10k.zsh - two different constraints that
happen to pull in opposite directions.

The config alias was missing entirely. Without it the bare repository has no
front end, which makes the whole arrangement unusable. Guarded on ~/.cfg
existing so the alias does not appear on a machine that has not been set up.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 16:21:36 +02:00

38 lines
1.5 KiB
Bash

# Aliases shared by every machine.
#
# Each one that depends on a command is guarded by whether that command exists.
# Without the guard, "alias ls='lsd'" turns ls into a broken command on any
# machine where lsd is not installed - the Mac, for one - and breaking ls is
# the sort of thing that makes a shared dotfile repository feel like a mistake.
# The dotfiles repository itself. A bare repo in ~/.cfg with $HOME as its work
# tree, so "config" behaves like git for the configuration and the real git
# stays out of the way in ordinary projects.
#
# config status what has drifted
# config add .zshrc track a change
# config commit -m ... and push as usual
#
# status.showUntrackedFiles=no is set in the repo, otherwise every file in
# $HOME would show up as untracked.
[[ -d "$HOME/.cfg" ]] && alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
alias vi="nvim"
alias ducks="du -cksh * | sort -rn | head"
if (( $+commands[lsd] )); then
alias ls='lsd'
alias l='lsd -l'
alias la='lsd -a'
alias lla='lsd -la'
alias lt='lsd --tree'
fi
# Arch only. Present on beastix and shron, absent on the Mac.
(( $+commands[yay] )) && \
alias update='yay -Syu --devel --noconfirm --diffmenu=false --cleanmenu=false --editmenu=false --answerupgrade None'
# kitty's ssh wrapper, which carries the terminfo across. Falls back to nothing
# rather than shadowing ssh with something that is not there.
(( $+commands[kitten] )) && alias s="kitten ssh"