This commit is contained in:
Ray Elliott 2026-10-27 13:32:52 +00:00
commit baa2d124b0
10 changed files with 14 additions and 372 deletions

View file

@ -1,63 +1,29 @@
# Shared shell profile
# Shared login profile
This repository owns the login environment and interactive commands intended
to be shared by Bourne-family shells.
"Shared" means shells capable of reading POSIX-style `sh`, such as `sh`, Bash,
Dash and—with appropriate compatibility—Zsh. It does not mean that the same
file can be sourced directly by shells with different languages, such as Fish
or Nushell.
This repository owns the portable login environment. It is deliberately quiet,
shell-agnostic and independent of interactive shell configuration.
## Responsibilities
- Install `~/.profile` as a symlink into this repository.
- Define XDG locations and general editor/browser environment variables.
- Construct PATH idempotently for language and user-level executable paths.
- Load environment setup that is portable at login, such as Cargo's `env` file.
- Provide common aliases and small interactive functions that are useful
across supported Bourne-family shells.
- Isolate Arch Linux commands from otherwise portable shell configuration.
- Construct `PATH` idempotently for language and user-level executables.
- Load portable login environment setup, such as Cargo's `env` file.
## Boundaries
The `profile` file must remain quiet, idempotent and safe for a POSIX shell to
source during login. It must not print an alias catalogue, configure a prompt,
perform interactive terminal operations or start background work.
The `profile` file must remain safe for a POSIX shell to source during login. It
must not print output, configure a prompt, define interactive conveniences,
perform terminal operations or start background work.
Interactive shells should source `interactive.sh` from their own RC file. The
login profile deliberately does not source it, because login profiles may also
run in non-interactive sessions.
Shell-specific prompt, history, completion and initialization belongs in the
corresponding shell repository, currently `bash`. User services and timers
belong in the separate `systemd` repository.
Aliases, interactive functions, reminders, command catalogues, completion,
history and prompt configuration belong to the relevant shell repository. User
services and timers belong in the separate `systemd` repository.
## Files
- `profile`: portable login environment and PATH construction.
- `interactive.sh`: POSIX loader and manually curated alias reminder.
- `aliases.sh`: common POSIX interactive aliases and helper functions.
- `commands.sh`: command-catalogue display and validation functions.
- `hosts.sh`: SSH destination listing function.
- `platform/arch.sh`: Arch Linux applications, GNU options and Pacman/systemd
integration, written with POSIX shell syntax.
- `commands.tsv`: curated command descriptions and reminder visibility.
- `commands.README.md`: format and maintenance instructions for `commands.tsv`.
- `memory.tsv`: selectively curated shell-memory questions and answers.
- `memory.README.md`: format, scope and daily-selection behavior for the memory
question bank.
- `profile`: portable login environment and `PATH` construction.
- `install.sh`: installs the `~/.profile` symlink.
## Alias portability
The shared interactive files use POSIX shell syntax. Bash-only compatibility
aliases—including names that are deliberately being retired—live in the Bash
repository's `aliases.bash` instead.
External commands remain platform-specific by design: aliases for Pacman,
systemd, GNU utilities and local applications target this Arch Linux setup.
Syntax portability does not imply operating-system portability.
The Arch `update` function runs the local `archnews_wrap` Pacman workflow and,
after a successful upgrade, requests a non-blocking refresh from the systemd
user service `package-status-refresh.service`.
Interactive Bash uses this environment through the conventional `~/.profile`
interface. This repository does not reference or load the Bash repository.