Feature 57 (config and provisioning): modules declare config and provisions, their files rendered from templates; synced with main (issues of feature 57, 874)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
vim
|
||||
@@ -0,0 +1 @@
|
||||
${machine:account-home}/.local/bin
|
||||
@@ -0,0 +1 @@
|
||||
${machine:account-home}/scripts
|
||||
@@ -0,0 +1 @@
|
||||
${machine:account-home}/scripts/bin
|
||||
@@ -0,0 +1 @@
|
||||
vim
|
||||
@@ -0,0 +1 @@
|
||||
${machine:account-home}/.config
|
||||
@@ -0,0 +1,3 @@
|
||||
# Written by the mesh (module zsh, hq ADR 0268) from this machine's setting execute: serve or withhold.
|
||||
# Read by the zsh tools bundle when the runtime starts it; change the setting, not this.
|
||||
execute=${config:execute}
|
||||
@@ -0,0 +1,9 @@
|
||||
# The mesh's block (module zsh, novox/hq ADR 0203, ADR 0204): the account's environment, read by
|
||||
# every zsh — a login, a script, and node-login-shell's execute. Replaced at every push; everything
|
||||
# outside it is yours.
|
||||
# PATH keeps each directory once, wherever it was added: the session, a nested shell or a
|
||||
# sourced file. Without it every nested shell prepended the same entries again.
|
||||
typeset -U path PATH
|
||||
if [[ -r "${machine:account-home}/.config/mesh/environment.sh" ]]; then
|
||||
source "${machine:account-home}/.config/mesh/environment.sh"
|
||||
fi
|
||||
@@ -0,0 +1,60 @@
|
||||
# The mesh's block (module zsh, novox/hq ADR 0204): the defaults every machine shares, and the code
|
||||
# other modules contribute in three slots. It is replaced at every push. Everything below it is
|
||||
# yours, kept as you wrote it, and runs after it, so your lines win.
|
||||
${shell:zsh:first}
|
||||
# History, kept across sessions and shared between open shells. Without these zsh saves none:
|
||||
# SAVEHIST defaults to 0 (novox/hq to-be 41, found on review 2026-10-04).
|
||||
HISTFILE="$HOME/.zsh_history"
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
setopt EXTENDED_HISTORY SHARE_HISTORY HIST_IGNORE_DUPS HIST_IGNORE_SPACE HIST_REDUCE_BLANKS
|
||||
|
||||
# The completion system. Nothing initialised it, so only zsh's basic completion ran. Its cache
|
||||
# goes under ~/.cache rather than beside ~/.zshrc.
|
||||
[[ -d "$HOME/.cache/zsh" ]] || mkdir -p "$HOME/.cache/zsh"
|
||||
autoload -Uz compinit && compinit -d "$HOME/.cache/zsh/zcompdump"
|
||||
zstyle ':completion:*' menu select
|
||||
|
||||
# Terminal title: host, directory, git branch
|
||||
function set_terminal_title() {
|
||||
local git_branch=""
|
||||
if git rev-parse --is-inside-work-tree &>/dev/null; then
|
||||
git_branch=" ($(git branch --show-current 2>/dev/null))"
|
||||
fi
|
||||
print -Pn "\e]2;%m: %~${git_branch}\a"
|
||||
}
|
||||
precmd_functions+=(set_terminal_title)
|
||||
|
||||
# Keybindings
|
||||
bindkey "^[[H" beginning-of-line # Home
|
||||
bindkey "^[OH" beginning-of-line # Home
|
||||
bindkey "^A" beginning-of-line # Ctrl + A
|
||||
bindkey "^[[F" end-of-line # End
|
||||
bindkey "^[OF" end-of-line # End
|
||||
bindkey "^E" end-of-line # Ctrl + E
|
||||
bindkey "^[[3~" delete-char # Del
|
||||
|
||||
# Colour support of ls and friends
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r $HOME/.dircolors && eval "$(dircolors -b $HOME/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
alias ll='ls -alhF'
|
||||
alias la='ls -Ah'
|
||||
alias l='ls -CFh'
|
||||
|
||||
# A throwaway container, and what takes the space under a directory
|
||||
alias drun='docker run -it --rm'
|
||||
disksize() {
|
||||
du -h --max-depth=1 "${1:-.}" | sort -h
|
||||
}
|
||||
sudo-disksize() {
|
||||
sudo du -h --max-depth=1 "${1:-.}" | sort -h
|
||||
}
|
||||
|
||||
${shell:zsh:normal}${shell:zsh:last}
|
||||
Reference in New Issue
Block a user