Commit Graph

9 Commits

Author SHA1 Message Date
daniil-berg 7166d9196a fix(shell): bind arrows directly for bash history search
The macro form `"\e[A": "\C-x\C-p\C-e"` ran history-search-backward then
end-of-line to mimic zsh's cursor-at-end. But history-search-* takes its
prefix from start-of-line to point, and `\C-e` moves point to the end, so
the next Up searched for the whole recalled line, found nothing, and left
Up/Down dead after one press. Bind arrows straight to the search functions;
pure readline has no history-search-end widget, so cursor lands at the
prefix boundary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 15:07:12 +02:00
daniil-berg 61de00137c shell: jump cursor to line end on bash history search
history-search-* leaves the cursor at the prefix boundary, not the end,
unlike zsh's history-search-end widget. Bind the search functions to
throwaway keys and map the arrows to a macro that runs the search then
end-of-line, so prefix recall lands the cursor at EOL like zsh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 12:10:51 +02:00
daniil-berg ad5a6c98ea shell: centralize history config and create history dir
Move HISTFILE/HISTSIZE/SAVEHIST/HISTFILESIZE/HISTCONTROL into the shared
shell/exports as env vars; each shell ignores the other's name-specific
ones. Dedup that can't be an env var stays per-shell: HISTCONTROL=ignoreboth
for bash, setopt hist_ignore_all_dups/hist_ignore_space for zsh.

Also mkdir -p the HISTFILE parent in shell/interactive, so a fresh host
doesn't silently drop history when ~/.cache/shell is absent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 11:49:55 +02:00
daniil-berg 634f4950f0 Add README 2026-06-29 11:27:50 +02:00
daniil-berg 5002a409f9 shell: bash readline prefix history search via XDG inputrc
Add $INPUTRC pointing at ~/.config/readline/inputrc and ship that file
with history-search Up/Down bindings (cursor to end), mirroring zsh's
history-beginning-search-end. zsh ignores readline, so this is bash-side
only. Includes /etc/inputrc to keep distro defaults.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 11:26:58 +02:00
daniil-berg 9262c9795a unify zsh+bash shell config; fix zsh startup
Support either shell as the login shell via stow selection (merges the
bashed branch in). shell/ holds shared POSIX env + interactive config;
each shell loads its own rc natively.

- zsh: add .zshenv (sets ZDOTDIR+env early), rename rc -> .zshrc, add
  login-only .zprofile (pyenv --path)
- bash: add ~/.bash_profile + ~/.bashrc stubs, .config/bash/{rc,prompt}
- shell: profile is POSIX env-only (no zsh-rc source); path rewritten
  POSIX + idempotent (flat ~/.local/bin, no subdir recursion); new
  interactive sources aliases/functions + pyenv shims
- drop dead shell/.zprofile symlink; move ZDOTDIR out of exports

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 17:47:48 +02:00
daniil-berg a6a3d3a759 better zsh file setup 2022-02-17 10:35:01 +01:00
daniil-berg f526d17524 pyenv stuff 2022-02-17 10:31:59 +01:00
daniil-berg 1280d2360d basic structure; zsh default; no desktop assumed 2021-11-14 11:40:27 +01:00