Upgrading wayu
User-visible behavior changes per release. A release names the "Unreleased"
section after its version and publishes it as the GitHub release's
"⚠ Upgrade notes"; CHANGELOG.md also lists the breaking commits'
BREAKING CHANGE: footers. 4.4.3 and 4.4.4 shipped behavior changes as patch
releases, so they are listed here too.
8.0.0#
Failure campaign and candidate acceptance#
- CI now runs a risk-mapped failure campaign, actual ENOSPC on an isolated Linux filesystem, fresh source installs and 20 repeated sessions per shell on macOS and Linux. Reports retain the candidate binary hash and results.
- The manual Bash/fresh-shell validation scripts now exit nonzero when a check fails; previously their final failure message could leave exit 0.
- See Validation for acceptance gates and explicit limits. Automated runs do not claim multi-day human use or independent crypto review.
Clipboard helpers and subprocess input#
plugin getnow reports clipboard-copy failure when the clipboard helper closes its input early, instead of potentially terminating wayu on SIGPIPE. Each clipboard helper is limited to five seconds.- Subprocess stdin is streamed while capturing output, so a large input or stalled reader cannot block deadline/cancellation checks. An incomplete input transfer is reported as a command failure, even if the child exits 0.
Subprocess deadlines and relative symlink writes#
- Commands run with a deadline now remain bounded after closing stdout and stderr. Previously a child that closed both streams and kept running could make wayu wait indefinitely, including during external-alias discovery.
- Captured command diagnostics now respect the exact 64 KiB limit even when a read crosses the boundary; excess output is drained and discarded.
- Atomic writes through a relative symlink in the current directory now resolve its relative target in that directory, preserving the symlink. No configuration or data migration is needed.
Portable PATH entries and release evidence#
- New:
path add <path> --portablestores home-relative directories as$HOME/.... Default adds still freeze absolute paths. Existing data needs no migration; the flag writes the already-supported entry representation. - Release CI now includes startup budgets and real previous-release binary upgrades across zsh/bash/fish on macOS and Linux. Pinned upstream coexistence smoke tests run in CI; comparative benchmarks run weekly or on demand and retain raw samples and tool/source metadata.
Reconstruct plugin checkouts on a new machine#
- New:
wayu plugin restore [--dry-run]reads a copiedplugins.json, restores missing checkouts at the recorded commits, and saves paths under this machine's data dir (backup first, then verification). Pins, disabled state and other plugin settings are preserved; existing checkouts and local edits are kept. No data-format change is required. plugin addnow exits66and nameswayu plugin restorewhen a plugin is registered but its checkout is missing. Previously it exited0and reported the plugin as already installed.
Prebuilt binaries for Intel Macs and Linux on arm64#
- Releases now ship
wayu-macos-amd64(macOS 15 or later on Intel) andwayu-linux-arm64next towayu-macos-arm64andwayu-linux-amd64, each with a.sha256and a build provenance attestation.brew install wayupicks the right one; it no longer refuses those two platforms. - New install script, for the same platforms without Homebrew:
curl -fsSL https://wayu.dvrd.io/install.sh | sh(checks the SHA-256 and, with a logged-ingh, the attestation; installs to~/.local/bin).
Multi-machine secrets (experimental, opt-in)#
- New:
wayu secrets identity,wayu secrets recipient list|add|rm|rename,wayu secrets adopt --yes,wayu secrets recovery add|rm|unlock. They let several machines read the same syncedsecrets.jsonwithout copying a key: each machine has its own age identity and the data key is wrapped to each. Marked experimental (see docs/STABILITY.md): they print a one-time notice the first time. - Nothing changes until you opt in. The first
recipient add(orrecovery add) rewritessecrets.jsonto version 2 (backup first, verified, one-time notice). wayu 7.0 cannot read version 2 (it exits78and, from this release on, names the upgrade): upgrade wayu on every machine that syncs the file before you run it. wayu doctorwarns whensecret.key/identity.keysits in a git work tree without being ignored, and about sync-conflict copies ofsecrets.json(secrets.sync-conflict-*.json,secrets 2.json).- A new machine never trusts a data key by itself: after
recipient add(which prints the key's fingerprint) and a sync, runwayu secrets adopt --yesthere and compare the fingerprint it prints. Until then it exits78naming that command (at shell start: onesecrets not loadedline). - A machine that has read version 2 keeps what it verified with its cached
key (in the same keychain item or
secret.key; wayu 7.0 cannot read that item). From then on a version 1secrets.json(downgrade) or one under a key it replaced (rollback) exits78naming the fix, and a rotation that lists a machine it saw removed is not adopted automatically. recipient add/recovery addno longer name this machine after an empty or IP-address hostname: they exit64asking for--name.
secrets.json from a newer wayu: "upgrade wayu", not "malformed"#
- A
secrets.jsonwhose"version"is higher than this wayu reads (a store a newer wayu wrote, e.g. on another machine syncing the data dir) now fails withsecrets.json version N was written by a newer wayu …: upgrade wayu on this machineinstead of a generic "unsupported version" or "unknown field" error. The exit code is unchanged (78) and the file is never touched.
7.0.0#
Leftover [paths] / [aliases] / [env] in wayu.toml are reported by build#
wayu buildwarns (stderr) for each of these tables still inwayu.toml: wayu does not read them (wayu path|alias|const addmanage those entries). Before, onlytoml validateanddoctorsaid so, and a hand edit there was silently ignored.- The prompt hook's rebuild (after a hand edit of
wayu.toml/entries.json) no longer discards its stderr: its warnings and errors show in the terminal once, at that prompt. A clean rebuild prints nothing.
completions generate: no setup instructions#
wayu completions generateno longer prints fpath /source/ symlink steps for.zshrcand friends: wayu's init already loads its completions dir in zsh, bash and fish. It prints one line (open a new shell).
doctor: unregistered plugin folders#
wayu doctorwarns about folders under<data>/pluginsthat noplugins.jsonentry points at: only registered plugins load, so such a checkout is silently ignored otherwise (see "Generated shell code and startup"). Register it (wayu plugin add) or delete it.
Aliases may use command names#
alias add cd z,alias add cat batand other aliases named like a command (cd,pwd,echo,test,true,falsewere refused) are accepted. Shell grammar words and declaration builtins (local,export,typeset,return, ...) are still refused.
macOS 15 or later#
- Release binaries require macOS 15 (Sequoia) or later; the Homebrew formula says so. README lists the tested platforms and shell versions.
Generated shell code and startup#
core.<ext>: the Secrets section runs after the PATH apply, and its cache-misswayu secrets cachecall (like the prompt hook'swayu build) uses wayu's absolute path, also when wayu was run by bare name fromPATH(was a barewayu, not found in shells with a minimal PATH: cron, GUI apps, ssh commands). Runwayu buildonce to regenerate.- The prompt hook's
wayu build(after a hand edit ofwayu.toml/entries.json) no longer compiles stale scripts while the prompt waits: it startswayu script buildin the background (a Swift script froze the prompt for ~10 s). wayu buildregeneratesplugins.<ext>fromplugins.jsonfor every set-up shell (a hand edit, e.g. disabling a plugin, had no effect until awayu plugincommand ran), and exits78naming the file whenplugins.jsonis invalid (was silent, exit 0); the plugin loaders are then kept as they were.plugins.<ext>no longer has a# Last updatedline.- core.zsh no longer sources
plugins/zsh-autosuggestions/plugins/zsh-syntax-highlightingon its own when their checkouts exist: only plugins enabled inplugins.jsonload (wayu plugin disablehad no effect on those two). A checkout not registered inplugins.jsonis no longer loaded: register it withwayu plugin add. - Plugin
*.zshsources are compiled to.zwcnext to them (zsh loads the digest instead of parsing the source each start): plugin checkouts get.zwcfiles (untracked in their git checkouts). - bash: a
[tools]wordzsh/--zshinargsbecomesbash/--bashin core.bash, as fish already did (args = "init zsh"putzoxide init zshinto core.bash; bash 3.2 failed on its output). In core.zsh,bash/--bashlikewise becomezsh/--zsh. [tools]entries are emitted inwayu.tomlfile order (were sorted by name), so a tool can rely on one listed above it.- bash: the
[tools]evalcache helper no longer aborts a shell running withset -ewhen a tool is missing, fails or its cache can't be written (a failing tool now returns 0), and on bash 3.2 finds tools by walkingPATHin the shell instead of one$(type -P …)fork per tool. - core.bash: the
functions/*.bashandcompletions/*.bash(-completion)loops glob withfailgloboff and globbing on (restored before the files are sourced):shopt -s failglobprinted "no match" on every start andset -fskipped the files. The loop variable is_wayu_f(core.bash left a globalfbehind). - Live PATH sync: when the prompt hook's
wayu buildfails (a malformed hand save ofwayu.toml/entries.json), open shells retry after the next save of either file instead of never again; the hook records the failure in<data>/path_sync.<ext>.regen-failed. - zsh:
zsh -l -c …andzsh -l -i -c …(IDEs reading the login env, ssh commands) get wayu's PATH order back before the command runs; the restore after macOSpath_helperonly happened at the first prompt, which these never draw. core.zsh sets a self-removingTRAPDEBUGfor such runs only, and not when aTRAPDEBUGis already defined. [prompt]/[prompt.*]are read with the TOML parser like the rest ofwayu.toml(were matched line by line): comments are ignored (a# success_symbol = …line was applied), keys count only in their own table (asuccess_symbolin any[prompt.*]table was used), values of the wrong type keep the default (context_aware = "false"turned it off;toggle_enabled = true # not falseread as false), and dotted keys,[prompt.contexts.<name>]tables and multi-line strings work.- Native prompt: a
%in the git branch, the local IP, a context's tool version or the shell name is shown as is (it was expanded as a prompt escape: a branchfeat%nshowed the user name), in the prompt and the async right prompt. - Native prompt (vi mode):
R(replace) andr(replace one character, while it waits for the key) showvimcmd_replace_symbolin the replace color; they showed the insert / normal symbol. - Native prompt (
async_rprompt): the background worker starts only in a git work tree or in a context with a version command (rust, nodejs, …); elsewhere the right prompt and$versionare cleared without forking. The USR1 handler no longer forks (read+zf_rminstead of$(<f)+rm): a render outside a repo forks 0 times (was 2), inside a repo once (the worker). Runwayu buildonce to regenerate. wayu export --checkcomparesturbo.<ext>with whatexport --turbowould write now, instead of its mtime with wayu.toml / entries.json: it now reports stale after a change toconfig.<ext>, a hand edit of the turbo file or a wayu upgrade that changes the generated code, and no longer after a save of wayu.toml that changed nothing.- fish:
[prompt] enabled = truenow generates a native prompt in core.fish (fish_prompt, andfish_right_promptwithasync_rprompt): it replaces afish_promptfrom~/.config/fish/functions/(one defined later in config.fish or a plugin still wins);vi_mode = trueswitches tofish_vi_key_bindingsand emptiesfish_mode_prompt. See config-reference "Prompt in fish". A fish setup with[prompt] enabledthat relied on fish ignoring it should remove the table. - fish:
wayu export(--turbo,--eval,--check) works for fish (it exited64):turbo.fishis core.fish followed bytools.fish/extra.fish(same as sourcing init.fish) and is kept current by every regeneration;--evalprints fish code forwayu export --eval | source. wayu build profiletimes core and its phase breakdown in an interactive shell that reads only core (zsh:ZDOTDIR= a private temp dir; bash:--rcfile), not-c: compinit, the native prompt and the plugins are now included, so the numbers are higher (and real). The first scenario is labeledcore.<ext> (interactive, no user rc).
wayu's own completions: position-independent, value completion#
- The zsh, bash and fish completions for wayu parse the command line: a
global flag before the command (
wayu --dry-run alias rm <TAB>) or between command and action no longer breaks them, command flags complete after the action too, and--ends the flags. They complete the values of--shell,--source,--lang,--category/-cand--template,backuptypes and backup numbers,template applyandplugin addnames,secrets runsecret names and the command after--. bash: the action position offers actions only (flags on-<TAB>); fish: the script is one__wayu_completefunction (was onecompleteline per word). Runwayu completions generateto rewrite the scripts.
Encrypted secrets hardening#
secrets.jsonis read strictly: unknown fields, text after the object, names that are not shell variable names, non-string values andrun_onlynames missing fromvalues(or listed twice) are errors (exit 78 naming the file) instead of being ignored. wayu never writes such a file; only a hand edit is affected.- The master key in the macOS keychain / Secret Service is stored per data
dir: account
wayu-<id>(keychain servicewayu-master-key; Secret Serviceservice wayu), where<id>is the 16-hex idwayu doctorprints. The old shared item (accountwayu/account master) is moved automatically: the first wayu command that needs the key (a new shell,const get,doctor) copies it towayu-<id>when it decrypts this data dir'ssecrets.json, and prints a one-line notice once. The old item is kept (another data dir may still use it); the notice names the command that deletes it (security delete-generic-password -a wayu -s wayu-master-key/secret-tool clear service wayu account master). - Secrets session cache: with neither
XDG_RUNTIME_DIRnorTMPDIRset it lives in<data>/run/wayu-<uid>/(was/tmp/wayu-<uid>/).core.<ext>sources it only from a dir you own that is not a symlink (otherwise from<data>/run/wayu-<uid>/) and never through a symlinked cache file;wayu secrets cachereplaces such a link instead of writing through it. Regenerate core (wayu build) to get the new loader. wayu backup restore entries(and TUI undo) also restoressecrets.jsonas it was when that backup was taken (a copy is now kept with every entries.json backup inbackup/secrets/); before, only entries.json was restored and secret markers and values could drift apart.secrets rekeydrops those copies.wayu const get NAMEexits65with an error when entries.json marks NAME secret but secrets.json has no value for it (printed an empty line and exited0).wayu doctorreports that as an error (secrets pairing, exit78) and a secrets.json value without a secret entry in entries.json as a warning.- TUI constants view: encrypted constants are listed as
******** (secret)/******** (secret, run-only)(were rows with an empty value), also afterv; the TUI never decrypts them.eon one shows a hint to change it withwayu const add NAME --secretinstead of opening the form;dremoves it likewayu const rm(the entries.json entry and the secrets.json value together). A malformedsecrets.jsonduring a TUI add/delete is shown as an error instead of ending the TUI. wayu reload/wayu watchalso watchessecrets.json(also before the first secret creates it): a change, e.g. by a sync, drops the secrets session cache and regenerates the init files. Any watched file that appears or is removed while the watcher runs now counts as a change (was ignored).
One status icon per line#
path add/path removeprint✓ Added to PATH: <dir>/✓ Removed from PATH: <name>(no extra✅).plugin check/plugin updateput the indent before the line's icon and drop the second one (✓ Up to date,ℹ Update available: a → b,⚠ Failed to check remote …). Scripts matching the old text with the emoji need updating.
zsh startup: interactive-only parts skipped in non-interactive shells; compinit guard#
- Non-interactive zsh (
zsh -c, scripts; wayu loaded from.zshenv) no longer loads plugins (plugins.zsh,plugins/config.zsh) or sets up zsh-defer;zsh-deferis a no-op there (nothing ever drained its queue outside a prompt). Constants, secrets, PATH,functions/,[tools],tools.zsh,extra.zshand aliases still load.zsh -c truewith a typical setup: ~20 ms → ~8 ms. - After wayu's
compinit, a latercompinitcall (an installer'sautoload -Uz compinit && compinitin.zshrc) no longer redoes the completion setup: it only registers the completions offpathdirs added since, ignoring its flags; the same registration runs at the first prompt.[settings] compinit_guard = falserestores zsh's owncompinit. .zcompdumpis also rebuilt when anyfpathdir (or its mtime) changed, so completions installed into brew's/the system'sfpathdirs show up in the next shell (were only picked up after wayu's own completions changed).- zsh-defer runs queued commands once the prompt is drawn and the line
editor is idle (a
zle -Fhandler), one per idle moment, with errors shown (they were run from a precmd hook, before the prompt was drawn, with stderr discarded). wayu no longer definesTRAPUSR1for it; with the native prompt's async data, aTRAPUSR1function defined before wayu is kept and called first. - Native prompt:
PROMPTis$'\n''${_WAYU_PS1}', rendered in the shell (precmd, and before the vi-mode / toggle / asynczle reset-prompt) instead of two$(...)subshells per render._wayu_prompt_fulland_wayu_prompt_transientsetREPLYinstead of printing;{localip}is looked up once per prompt. - Re-sourcing
init.zsh/init.bashin a shell skips plugins already loaded in it (plugins.<ext>guards each plugin) and doesn't add wayu's completions dir tofpathagain or reruncompinit. - New opt-in
[settings]keys (zsh):defer_plugins(load plugins after the first prompt) andlazy_compinit(compinit on the first completion). - New opt-in
[settings] autosuggest = true(zsh): history suggestions (falling back to aPATHcommand name for a first word history doesn't match) built intocore.zsh(one redraw hook, 13 accept widgets wrapped instead of every widget), styled byautosuggest_style(default"fg=8"), accepted with →/End/^F/^Y(autosuggestions_accept_keys). While it is on, the zsh-autosuggestions plugin is not loaded andwayu doctorwarns if it is still enabled. Off by default: nothing changes unless you set it. - New opt-in
[settings] highlight = true(zsh): syntax highlighting built intocore.zsh(one redraw hook, no widget wrapped, nothing forks; zsh's own lexer; a keystroke at the end of the line re-highlights only the last words). Styles use zsh-syntax-highlighting's names and defaults, changed withhighlight_styles = { command = "fg=blue", ... }(or a[settings.highlight_styles]table). While it is on, the zsh-syntax-highlighting and fast-syntax-highlighting plugins are not loaded andwayu doctorwarns if one is still enabled. Off by default. - Built-in highlighting, checked against fast-syntax-highlighting
(
tests/highlight_diff): brackets are colored by depth (new stylesbracket-level-1..3,bracket-errorfor unmatched ones,cursor-matchingbracketfor the pair of the one under the cursor), history expansions (!!,!$, ...:history-expansion),inaftercaseandalwaysare reserved words, assignments aftertypeset/local/export/readonlyareassign,command -v NAMEhighlights NAME as a command, nothing is a glob afternoglob,=cmdis a command, a quoted command name is colored as the command,{fd}in{fd}>fileisnamed-fd(default none; wasredirection) and the descriptor in2>&1isnumeric-fd(default none). Fixed:'...'followed by more text in the same word was colored to the end of the word,&!lost the rest of the line,$[...]was a glob,for x (...)/for ((...)),function name { ... }, case(pattern),name=(...)inside$(...), and a stale result after deleting part of a heredoc operator. Lines entered at a continuation prompt are now highlighted with the current line, and an edit in the middle of a long line no longer re-highlights it all (500 characters: ~4 ms → ~0.9 ms per keystroke). To keep the old look, set the new styles to"none"in[settings] highlight_styles.
wayu optimize: installer lines in your startup files move into wayu#
- New
wayu optimize [--check] [--dry-run] [--yes](seedocs/cli.md): lines after the one that loads wayu (source <(tool completion zsh),eval "$(tool init zsh)",fpath=(dir $fpath), a secondcompinit,export PATH=dir:$PATH,alias,export NAME=value) are moved into wayu and removed from the file (backed up first;wayu backup restore .zshrc --yesundoes it). It needs--yeslike other commands that rewrite files; without it (or with--dry-run) it shows the diff. entries.jsonhas two new optional sections,fpath(zsh completion dirs, put onfpathbeforecompinit) andgenerators(cached_wayu_evalcachecalls, emitted in that shell's core only, interactive shells only for zsh/bash). Newwayu completions fpath [list|add|rm].- Generated
core.<ext>has a new prompt hook,_wayu_rc_check: when a startup file is newer than<data>/rc_check.stampit runswayu optimize --notifyonce and printswayu: ~/.zshrc changed: N lines can be optimized (wayu optimize)on stderr (once per change; the first prompt after upgrading checks once).[settings] auto_optimize = truemoves the lines instead. wayu doctorhas a new "startup files" check (warning, with an estimated cost per shell start; generator commands are not run, they are listed as "runs a command every start"), anddoctor --fix --yesrunswayu optimize.wayu backup restoreaccepts a shell startup file (.zshrc,.bashrc,~/.config/zsh/.zshrc, or its path).wayu config scanreads the current shell's rc file ($ZDOTDIR/.zshrcwhen ZDOTDIR is set;.bashrc/.bash_profilefor bash,config.fishfor fish) instead of always~/.zshrc, so--fixwrites the blocks to the matchingextra.<ext>; it detects# >>> … # <<<installer blocks (conda) as one block, and no longer takes a backup ofextra.<ext>when it has nothing to add.
Hooks: run outside the lock, with a timeout, output shown#
- Hooks no longer run under wayu's config lock (pre-hooks before it is taken,
post-hooks after it is released), so a hook may run
wayu(apath addorplugin addhook callingwayu buildhung forever). - Every hook is killed after 30 s (with its child processes; the CLI prints a
warning naming it).
timeout = <seconds>inhooks.confchanges it. - CLI hooks now share wayu's stdout and stderr (their output was discarded);
stdin is
/dev/null. Redirect inside the hook to keep it quiet. pre/post_alias_removeandpre/post_constant_removenow get the removed alias command / constant value as{value}(was empty; still empty for an encrypted secret).- A hook command's quotes are removed only when one quoted string wraps the
whole command:
post_path_add = "/bin/echo" {path} "done"is kept as written (it lost its first and last quote, and every write exited 78). wayu function addwith no$EDITOR/$VISUALand no terminal prints the new file's path and exits 0, likescript new(it ranviand exited 1).
Entry names and values#
- Alias names follow one rule everywhere (
alias add, the TUI, templates,entries.json): printable ASCII except whitespace, quotes, shell metacharacters, glob characters,=,/and^, not starting with-...,g.stand1xare now accepted;.and the words in "Aliases may use command names" above are still refused. const addrefuses protected names with exit 65:PATH,path,FPATH,fpath,HOME,IFS,SHELL,USER,LOGNAME,PWD,OLDPWD,ZDOTDIR,SHLVL,_and everyWAYU_*name (also with--secret).wayu doctorreports stored ones as an error (exit 78); remove them withwayu const rm NAME.- A value with a NUL byte or invalid UTF-8 (alias command, constant value, PATH dir) is one data error, exit 65 (was two messages and exit 74).
entries.jsonis read strictly: anything after the document, a trailing comma, a duplicate key,"version": "1", an unknown field, a missingvalue, arun_onlywithoutsecret, an invalid alias / constant name or PATH key, or a NUL character now makes every command exit 78 naming the file (these were read silently, unknown fields dropped on the next write, a NUL written raw intocore.<ext>). Fix the file by hand orwayu backup restore entries --yes.
Directories and the lock#
- A relative
WAYU_CONFIG_DIRorWAYU_DATA_DIRmakes every command exit 78 (it was used as-is, relative to each process's working directory). Use an absolute path. - The config lock is always
<data>/.wayu.lock: the first writing command creates the data dir if it is missing (it used to lock in the config dir, or not at all, before the data dir existed, and concurrent first writes lost entries). A leftover~/.config/wayu/.wayu.lockcan be deleted.
PATH entries must be directories#
wayu path addof an existing path that is not a directory (/etc/hosts) exits 65 (it was stored). A missing path still exits 66.wayu template apply/init --templateadd only PATH dirs that exist and are directories (others are listed as kept out: "not on this machine"); they were added whether or not they existed.
wayu watch stop / status check the watcher's lock#
- A running watcher holds a lock on
<data>/watcher.lock.watch stopandwatch statusreport "not running" (and removewatcher.pid) when no process holds it, instead of trusting the PID inwatcher.pid: a PID file left by a dead watcher no longer gets an unrelated process (one that reused the PID) killed.watch startrefuses while the lock is held.
wayu doctor checks#
- The turbo export check looks for
turbo.<ext>of the current shell (turbo.bashfor bash): a bash setup sourcingturbo.bashwas reported as "sources turbo.zsh but it is not generated" (error, exit 78). - The plugins check parses
plugins.jsonwith the same strict reader aswayu plugin list: a malformed file, an invalid value or a dependency cycle is an error (exit 78; it was "✓ N plugin(s) installed", exit 0). The cycle explanation goes to stderr, sodoctor --jsonstays valid JSON. - The shell configuration check sees startup lines that load wayu through
builtin source,command source/command .orzsh-defer source(they were "wayu not sourced", exit 78). - With no startup file at all, the shell configuration warning names the
file to create and the
sourceline to put in it (it said "run 'wayu init'", which never creates one). wayu initprints its "Created N config file(s)" summary after the last file and counts all of them (it said 3 after five "Created" lines). The TUI settings view has a "Data dir" row.
search and secret display#
wayu searchmatches names only (PATH entries: key or directory): alias commands are no longer searched (a token inside one was findable, like constant values before 6.0.0).--jsonfieldis alwaysname, and an encrypted constant has"secret": true(text:********).wayu searchmatches a PATH entry by its key as well as its directory (one result per entry, showing the directory).const list --json: an encrypted constant'ssourceiswayu (secret)/wayu (secret, inactive), as in the text view (waswayu/wayu (inactive)).
CLI flags and arguments#
- The hidden
wayu completions list --generate/-gspelling is gone (exit 64;wayu completions --generatenever worked): usewayu completions generate. - Flags and words that meant nothing exit 64 instead of being ignored:
--full/-f/--sourceoutsidepath|alias|const list(and--tui),--test/--snapshotwithout-c=,doctor --profilewith--jsonor--fix, twoexportmodes (export --eval --check), and an extra word after an action that takes none (path list x,secrets lock x,toml validate x,plugin list x, ...). -c=<component>is the developer component flag only before a command word:wayu plugin search -c=devno longer runs the component tester (it exits 64 as an unknown option; use--category dev/-c dev).
Backups, plugins, scripts and functions#
- Backups of files in a subdirectory of the config/data dir (functions,
scripts) are named after their path relative to that dir:
@functions%init.zsh.backup.<stamp>, shown asfunctions/init.zshbybackup list(was the bare file name, sofunctions/init.zshshared — and pruned — the history ofinit.zsh, andfunctions/extra.zshthat ofextra.zsh). Existing backups of such files keep their old name and group. plugins.jsonbackups are pruned to the newest 5 like every other file's (everyplugincommand added one, never removed). Aplugincommand whose backup fails now writes nothing and exits with an error (was a warning).plugins.jsonwith an entry without a name, two entries with the same name, or auseglob containing/("../../etc/*") is invalid: every command that reads it exits 78 naming the entry. Fix the entry by hand.plugin update --allcounts only plugins whose checkout moved as "updated" and reports the rest as "N already up to date" (all fetched plugins were counted as updated).- TUI plugins view (Installed tab):
uupdates the selected plugin (Esc cancels),dremoves it after a confirmation (was a hint to use the CLI). wayu script: a source in any language can declare its build command in a header comment (// wayu: build = cc -O2 -o {out} {src}); swift'sswiftc -Ois now a preset of the same mechanism. The build hash covers the build command too, so every swift script is rebuilt once.- Two script sources with the same name (
foo.sh,foo.rb) are an error: neither is built (script buildexits 1, they used to replace each other'sbin/fooon every build),script edit|build|rm fooexit 65 and doctor reports an error. Delete or rename one. - A script whose shebang line ends in CR (CRLF line endings) is not linked
(
script buildexits 1 explaining it) and doctor reports an error;script importconverts such a file to LF (it was imported and failed withbad interpreter). script rm NAME --yesremoves abin/NAMEentry that has no script (was exit 65); doctor reports those entries as a separate, fixable check ("script bin entries", was part of "scripts") anddoctor --fix --yesremoves them.- Shebangs
#!/usr/bin/env -u VAR python/-P dir/-C dir/--unset=VARare read correctly (the option's argument was taken as the interpreter);#!/usr/bin/env -S uv run --script(PEP 723) is a python script.
Security hardening (audit)#
Files and directories:
- wayu's config and data dirs (and
functions/,scripts/,bin/,backup/,run/) are created0700whatever the umask;wayu inittightens existing ones (they hold startup code, andbin/is onPATH).wayu doctorreports a group/other-writable wayu dir as an error (exit 78, new "directory permissions" check);doctor --fix --yestightens it. config extendcreatesextra.<ext>0600; new function files are0600.<data>/backupmust be a real directory you own: a symlink there is refused (commands that back up first fail with an I/O error); symlinks inside it are not listed or restored, and asecrets.jsoncopy is restored only when it is a regular file.script newexits 65 when the path is a symlink;script importskips one;function addexits 73 on a dangling symlink.
Secrets:
- The keystore tools are never looked up in
PATH: macOS uses/usr/bin/security;secret-toolis taken from/usr/bin,/usr/local/bin,/binor/run/current-system/sw/bin(not found:backend = "auto"falls back tofile,"secret-service"errors). The master key is no longer passed on a command line. secrets.jsonwith a duplicate key or nesting deeper than 64 is invalid (exit 78).- A session cache dir with group/other permission bits is not used (the
cache goes to
<data>/run/wayu-<uid>/). The loader incore.<ext>changed: runwayu buildonce. bash/fish startup with secrets runs onels -ldnto check the dir. secrets lockand every secret change delete the session cache in every dir wayu wrote one to (listed in<data>/run/cache-dirs).const add NAME VALUE --secret/--run-onlywarns on stderr that the value is visible inpsand shell history: omit VALUE (prompted) or pipe it on stdin.wayu optimizemasks secret-looking lines in its diff, and after moving a secret warns that the rc backup (used by undo) still holds it in plain text.
Generated shell code (run wayu build once):
- Native prompt: the pending-changes count runs git with
core.fsmonitoroff and skips submodule contents, and is not shown in a repo whose own config definesfilter.<x>.clean/.process(a cloned repo could run code from the prompt). Global/system filters (git-lfs) still count. - fish: aliases are functions that run their body through
eval(aliasstill lists them); an invalid body fails when used, not at startup. - Constants:
${X=v}/${X:=v}in a value stay literal (they assigned in the shell at startup); use${X:-v}. wayu export --evaloutput is only supported quoted:eval "$(wayu export --eval)".[tools]keys that are not valid command names are skipped with a warning for every kind.
Names and values:
- More protected constant names (exit 65):
PS0-PS4,PROMPT,prompt,PROMPT2-PROMPT4,RPROMPT,RPROMPT2,RPS1,RPS2,SPROMPT,PROMPT_EOL_MARK,PROMPT_COMMAND,BASH_ENV,ENV,fish_function_path,fish_complete_path. Stored ones are no longer exported;wayu doctorreports them;wayu const rm NAMEremoves them. - Alias names starting with
_wayuare refused (exit 65); a stored one is a config error (exit 78). fpathentries with glob characters (* ? [ ] ( ) < > | # ^ ~, except a leading~) are a config error (exit 78);completions fpath addrefuses them (exit 65) andoptimizeleaves such an rc line in place.wayu.tomlstrings with raw control characters (below 0x20 except tab, and DEL; multi-line strings may span lines) are invalid forvalidate,doctorandbackup restore: use escapes. Nesting deeper than 128 is a parse error.toml validate/keys/doctorprint control characters in key and table names as\xHH.plugins.json:installed_pathmust be directly inside<data>/plugins(else exit 78 naming the file); refs must be valid git ref names; control characters in names and nesting deeper than 64 are refused.hooks.conf: a placeholder inside"…"within'…'is invalid (exit 78): write it unquoted inside'…'or use"$WAYU_HOOK_NAME".
Output:
- Human-readable output shows control characters from your data escaped
instead of sending them to the terminal (a stored value could set the
title, clear the screen or write the clipboard):
path/alias/const list,plugin list/get/search,script list,searchanddoctorprint tab as\t, newline as\n, other C0 controls, DEL and invalid UTF-8 bytes as\xHH, C1 controls as\u00HH.const listused to dropESC[...sequences and turn newlines into spaces; it now shows them escaped like the other lists.--jsonandgetoutput are unchanged (exact values). The TUI shows them escaped in lists and as�elsewhere. - Developer component flags:
-c=<component>width=/height=outside 1-1000 exit 64.
Commands:
- Plugin git commands never run a checkout's
core.fsmonitoror hooks. script importof a file whosewayu: build =header is not a preset needs--allow-build(else exit 64, nothing imported);--dry-runand the summary show the command. Script build commands run in<data>/scripts.- Ctrl-C / SIGTERM / SIGHUP while wayu runs git, a compiler or a shell kills that process group, removes a partial plugin clone and exits 130 / 143 / 129.
wayu optimize/auto_optimizeread quotes inside$(...)and${...}; a comment,caseor heredoc inside$(...), or a'inside"${...}", keeps that line and everything after it in the rc file.wayu doctorno longer runs rc generator commands to time them (see above); the startup estimate covers compinit only.watch stopexits 1 without signalling whenwatcher.piddoes not name the process holding the watcher lock.- Release builds: the Odin toolchain download is checked against
.github/odin-release.sha256; release archives are reproducible and attested.
6.0.0#
- The default data dir is now
${XDG_DATA_HOME:-~/.local/share}/wayu(was: the config dir). It holdsinit.<ext>, the generated files,plugins.json,plugins/,completions/,backup/and the lock.WAYU_DATA_DIRstill overrides it, and no longer followsWAYU_CONFIG_DIR.wayu initcreates both dirs. - The rc line is now
source "${WAYU_DATA_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/wayu}/init.zsh"(init.bashlikewise; fish: see the README). Replace the oldsource "$HOME/.config/wayu/init.zsh"line;wayu initprints the new one. [paths],[aliases]and[env]are no longer read fromwayu.toml. They live in<data>/entries.json({"version":1,"paths":[{"key","dir"}],"aliases":[{"name","value"}],"env":[{"name","value"}]}), written only by wayu (wayu path|alias|const, the TUI, templates): atomic, owner-only (0600), pretty-printed, stable order. A malformedentries.jsonmakes every command that reads it exit78naming the file; a missing one is empty.- Nothing is converted. To upgrade: run
wayu init, re-add each entry withwayu path add <key>=<dir>,wayu alias add <name> <command>andwayu const add <NAME> <value>(in the old file order), delete the three tables fromwayu.toml, moveplugins.jsonandplugins/from~/.config/wayuto the data dir (or re-add the plugins), and update the rc line.wayu toml validate(exit65) andwayu doctor(exit78) report a leftover[paths]/[aliases]/[env]table with the command to use. wayu toml showprintswayu.tomlverbatim;--revealis gone (exit64).wayu backup: types aretoml(wayu.toml) andentries(entries.json;path,aliasandconstantsname it too). A restore of entries reverts all PATH entries, aliases and constants.wayu doctorhas anentriescheck (error whenentries.jsondoes not parse).plugin list --jsonconflicts:withis"entries.json"(was"wayu.toml") for a clash with your aliases / constants.- Messages:
path addprintsAdded to PATH: <dir>, a missing entry isPATH entry not found: <dir>,alias addprintsAlias added: <name>, dry runs printWould update entries.json (aliases)etc.
Notes further down this section that describe [paths], [aliases] or
[env] in wayu.toml (editing, reading, toml show masking) now apply to
the same entries in entries.json, or no longer apply.
Functions move to the data dir; new wayu script#
functions/now lives in the data dir ($WAYU_DATA_DIR/functions), not the config dir:wayu functionwrites there,core.<ext>sources only that dir, andwayu initcreates it there. Nothing is moved for you:mv ~/.config/wayu/functions/* "${WAYU_DATA_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/wayu}/functions/".- New
wayu script(scripts): standalone executables in any language (swift compiled withswiftc; python, ruby, node, bun, bash, zsh, fish, perl, lua, sh linked) in<data>/scripts/, run from<data>/bin/.wayu initcreates both dirs. Oncebin/holds a script,core.<ext>/path_sync.<ext>put it first among wayu's PATH entries (zsh, bash, fish), so a script can shadow a tool of the same name;wayu export --evalincludes it too. wayu buildandwayu reloadrebuild stale scripts;wayu doctorhas ascriptscheck (stale or broken scripts,bin/entries without a script). New exit code69(EXIT_UNAVAILABLE):script newwhen the language's interpreter or compiler is not on PATH.- wayu.toml accepts
[scripts] default_lang; an unknown language is atoml validateerror (exit65).
Encrypted secrets (const add --secret, wayu secrets, [secrets])#
wayu const add NAME [VALUE] --secretstores the value encrypted (ChaCha20-Poly1305) in<data>/secrets.json; the master key lives in the macOS keychain / Secret Service /<config>/secret.key([secrets] backend). Without VALUE it is read from stdin.const getdecrypts,const rmremoves,const listshows********with sourcewayu (secret); in--jsonsuch a row is{"constant", "secret": true, "source"}with novalue.- Converting a plain constant with
--secretdeletes the entries.json backups that still hold its plaintext value. - A
--secretat the end of aconst addline is now a flag, not part of the value (like--dry-run). To store the literal text, put--before the value.--secretanywhere else exits64. - A plain
const addof a name that is a secret exits65. - New
wayu secrets list|rekey|lock.[secrets]is a known wayu.toml table; an unknownbackendmakestoml validateexit65. - When secrets exist,
core.<ext>,turbo.<ext>andexport --evalget a Secrets section after the constants that sources a per-session cache in${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/wayu-<uid>/(runningwayu secrets cacheonce when it is stale). Nothing changes for configs without secrets. wayu doctorhas asecretscheck (aninforow when there are none); its message counts run-only secrets.- Run-only secrets:
wayu const add NAME [VALUE] --run-only(implies--secret) stores a secret that is never exported to shells (not in the session cache, core, turbo orexport --eval).const listshows it with sourcewayu (run-only),--jsonadds"run_only": true. Re-adding with--secret/--run-onlyswitches the mode. - New
wayu secrets run NAME... -- CMD [ARGS...]: execs CMD (PATH lookup, no shell) with those secrets added to the environment. Exit64without--/names/CMD,65for an unknown name,127/126when CMD is not found / not executable; otherwise CMD's own status. wayu secrets listprints a mode column (session/run-only) after each name.
wayu build eval removed; zsh PATH order restored after login#
wayu build evalis gone (exit 64). It rebuilt every generated file at each shell start, which nothing needs: every wayu write regenerates them and the prompt hook runswayu buildwhenwayu.tomlorentries.jsonwas edited by hand. Replaceeval "$(wayu build eval)"in rc files with thesourceline above (orinit.bash).eval "$(wayu export --eval)"(env/PATH/aliases only) is unchanged.- zsh: at the first prompt wayu puts its PATH entries' dirs back in front of the
dirs that were on PATH when it loaded or that macOS
path_helpermanages (/etc/paths,/etc/paths.d). Loading wayu from~/.zshenvtherefore keeps wayu's PATH precedence in login shells; dirs prepended in.zshrcstay ahead. - zsh native prompt:
PROMPT/RPROMPTare set again at the first prompt, so/etc/zshrc(macOS setsPS1) or.zshrccan't replace them when wayu is loaded from.zshenv. To manage the prompt yourself, set[prompt] enabled = false.
Removed: backward compatibility#
wayu now reads only the current formats: wayu.toml, entries.json, plugins.json, hooks.conf,
functions/<name>.<ext>, extra.<ext> and the files the current generator
writes. Configs left by older releases are not converted or tolerated any
more. Upgrade from the previous release only.
wayu migrate(legacy shell files → wayu.toml,--schema,--from/--to) andwayu toml convertare removed (exit64). Usewayu --shell <shell> initto set up another shell.wayu buildwithout awayu.tomlexits78.- The 3.x
[[paths]]/[[aliases]]/[[constants]]schema is no longer detected: no exit78with a migration hint, no backup-restore refusal.toml validaterejects it (exit65) anddoctorreports an error. path.<ext>,aliases.<ext>andconstants.<ext>are neither created bywayu initnor read:init.<ext>sources onlycore.<ext>(and prints awayu buildhint when it is missing),core.<ext>no longer sourcespath.<ext>,wayu watchno longer watches them, and the TUI/search readwayu.tomlonly.- Only an untouched
init.<ext>from the previous release is refreshed; an older one is treated as edited (kept, with a warning): move it aside and runwayu init. Leftoverlazy,loginandhelpers.<ext>files are no longer deleted. plugins.confis ignored (no migration toplugins.json). Enum values inplugins.jsonmust be names ("zsh","source"); numbers fail to load (exit78). The unusedentry_fileandprofilesfields are no longer written.- Backups are listed, restored and pruned only under the current name
(
<file>.backup.YYYY-MM-DD_HH-MM-SS.UUUUUU[-N]); older names are ignored. A backup dir left group/world-readable by an old release is no longer tightened (new backups are still0600in a0700dir). - Keys wayu never read are no longer parsed:
wayu_version,[settings]auto_backup/fuzzy_fallback/dry_run_default,[path]dedup/clean,[[plugins]],[profile.*],[prompt.username] style_user,[prompt.interactive] async_interval.toml validateprints a warning per unknown key or table, with its line, and still exits0; a known table in the wrong shape ([[paths]],paths = …) is an error (exit65).doctorwarns about unknown keys. - A top-level
shell = "…"in wayu.toml is not read; use[shell] type. functions/: zsh sources only*.zsh, bash only*.bash(fish already*.fish); files without that extension are no longer sourced. Functions under the old~/.local/share/wayu/functionsare no longer copied over.
Notes further down this section about wayu migrate, the [[paths]]
refusal, plugins.conf or the legacy shell files describe changes made
before these features were removed; they no longer apply.
Unknown actions, wayu toml#
wayu tomlwith no action validates wayu.toml (same astoml validate, as its help always said); it printed a fixed key list.wayu toml keyslists wayu.toml's real top-level keys and tables in file order; it printed a fixedshell path aliases constants plugins hooks. A file that doesn't parse exits65.- An action word a command doesn't have exits
64with that command's help fortoml,hooks,config,templateandfunctiontoo (they showed help or the hook list and exited0).doctorwith a non-flag argument exits64;doctor helpshows its help. --sourceother thanwayu|external|inactive|alland--shellother thanzsh|bash|fishexit64; they were silently accepted (an unknown--sourcelisted nothing, an unknown--shellkept the detected shell).plugin add help/plugin add --helpshow the add help instead of looking up a plugin namedhelp(exit65).alias/constusage errors and help name the real command (wayu alias add,wayu const add; alias saidwayu aliases, which is not a command), and no longer list argument-less forms such aswayu alias add(the CLI never prompts).
Alias names may contain -#
wayu alias add,toml validateand the TUI now accept a hyphen in an alias name after the first character (onlead-logs). zsh, bash and fish all accept these names and TOML writes them as bare keys. A leading-is still refused, as are hyphens in constant and function names. Configs thattoml validateused to reject for this reason now pass.
Hooks#
- A
{path}/{name}/{value}placeholder inside double quotes inhooks.confis now refused. The shell expanded the value before a nestedsh -c "..."/eval "..."re-parsed it, sopre_alias_add = sh -c "echo {value}"ran code from an alias value. Such a hook never runs: any wayu operation that would run hooks exits78before writing anything and names the offendinghooks.confline;wayu hooksmarks itINVALID. Write the placeholder unquoted (echo Adding {path}, wayu quotes the value), inside'...'for an inner shell (sh -c 'echo {path}'), or use"$WAYU_HOOK_PATH"/"$WAYU_HOOK_NAME"/"$WAYU_HOOK_VALUE"when you need double quotes. (This replaces the 4.4.x advice to use double quotes for direct substitution.)
Secret values in list views#
const list(text and--json, with and without--full) now shows secret-looking values (names with KEY, TOKEN, SECRET, PASS, API, AUTH, …, or token-shaped values) as********— bothwayu.toml[env]entries and external environment variables. Scripts that read values fromconst list --jsonmust add--reveal, or useconst get NAME(unchanged, prints the real value). The text table ends with a hint when something was masked.toml showmasks secret-looking[env]values the same way;toml show --revealprints the file verbatim.--revealis accepted only byconstandtoml; elsewhere it is an unknown option (exit64).- TUI constants view: values are masked by default;
vtoggles reveal (the footer showsv Reveal/v Hide) and resets when you leave the view. The/filter matches the masked text, so typing part of a secret no longer finds its row. The detail overlay (Enter) follows the same toggle.
Plugins (review fixes)#
plugin update|enable|disable|priority|get|rm NAMEmatch the exact plugin name (or display name) only, likeconst get. A miss prints nothing on stdout, lists up to 5 similar plugin names on stderr and exits65; it never acts on a fuzzy guess (plugin disable rigused to disableorigin) and never prompts.plugin rmof an unknown name now exits65too (it exited0"already removed" when nothing was similar).plugin updateno longer resets a checkout whose HEAD has commits that were never on the remote: when it cannot fast-forward, the update fails (exit74) instead of discarding those commits. Push/rebase them or reinstall the plugin.plugins.jsondependenciesentries must be valid plugin names (no newline,/, leading-, empty,./..); otherwise any command that reads it exits78. A newline in one used to inject shell code into the generatedplugins.<ext>.
build profile#
- The phase breakdown inlines
plugins.<ext>: it has a row per[tools]entry (tool <name> (evalcache),tool nvm (lazy),tool <name> (lazy)) and per plugin (plugin <name>) instead of oneTools/Pluginsrow; core sections keep their names. Rows with no code are left out. - bash: the breakdown now runs too when the shell has
$EPOCHREALTIME(bash 5+); with an older bash it prints a note instead.
Plugin conflicts#
- A function, alias or exported variable defined by two enabled plugins,
or by a plugin and your
wayu.toml([aliases]/[env]), is now reported:plugin addandplugin enableprint a warning (stderr) naming each one,plugin listends with a conflicts section (stderr),plugin list --jsonhas a"conflicts": [{"kind", "name", "with"}]array per plugin (withis a plugin name or"wayu.toml"), andwayu doctoradds aplugin conflictswarning (exit code unchanged). Several statements on one line (export X=1; alias gs=...) are all scanned; the ones after the first were ignored.
Plugins: installing and loading#
plugin add(and TUI install) refuses a repository with nothing to load for the plugin's shell(s): it exits65, removes the fresh clone and writes nothing (it used to report success while the loader sourced nothing). Name the entry file with the new repeatableplugin add <url> --use <file-or-glob>(matched at the repository root; stored asuseinplugins.json). Any other extra argument toplugin addis now an error (exit64).plugin add <url>records the shells the repository actually has files for (ZSH,BASH,BOTH,FISHorANY) instead of alwaysBOTH, so a fish-only plugin added by URL now loads in fish, and a zsh-only one is listed as zsh.- Generated
plugins.<ext>: only the FIRST existing root entry file is sourced (<name>.plugin.<ext>,<name>.<ext>,<name>-init.<ext>,init.<ext>,plugin.<ext>); plugins that ship both<name>.plugin.zshand<name>.zshwere loaded twice. New entry files:<name>.zsh-theme(zsh; e.g. powerlevel10k),<name>.plugin.sh/<name>.sh(zsh and bash; e.g. rupa/z), and a top-level*.zsh-themewhen there is no*.zsh. Takes effect the next time the loader is regenerated (anypluginchange,wayu init). - Registry: entries whose repository has no shell entry file were removed —
binary tools (
starship,zoxide,atuin,fzf,ripgrep,bat,eza,delta,direnv,mise,volta,rustup,oh-my-posh,asdf,pyenv,rbenv),autojump,fasd,git-extras,git-flow, pluszsh-history-enquirer(pointed at zsh-command-time) andzsh-dotenv(not a cloneable URL).plugin add <key>for them exits65; install the tool with your package manager and load it fromwayu.toml[tools](e.g.zoxide = { kind = "evalcache", args = "init zsh" }). Already-installed plugins are unaffected. pure-fishnow installs aspure-fish(it shared the namepurewith the zsh prompt). An existing fishpureinstall keeps its name.
Plugins: network git#
- Clone, fetch and
ls-remoterun without a terminal and with deadlines: ssh runs asssh -o BatchMode=yes -o ConnectTimeout=10(unless you setGIT_SSH_COMMAND,GIT_SSHorcore.sshCommand), so a host-key or passphrase prompt fails instead of hanging or garbling the TUI — load the key into ssh-agent / accept the host key first. https transfers below 1000 B/s for 30 s abort (GIT_HTTP_LOW_SPEED_LIMIT/_TIMEoverride). Each command is killed after 10 min (clone/fetch) or 60 s (plugin check);WAYU_GIT_TIMEOUT=<seconds>changes both. - A failed
plugin addclone now prints git's error.
Building from source#
./build_it installinstalls to$PREFIX/bin(default~/.local/bin, was/usr/local/bin), replaces the binary atomically (temp file + rename), refuses while Homebrew manages wayu (--forceto override), and warns when anotherwayushadows the installed one onPATH.
path#
path cleanresolves$VAR/${VAR}fromwayu.toml[env]first, then the environment (as the generated init does), and never removes an entry whose variable is set in neither.path dedupalso resolves[env]variables, so$TOOLS/binand its absolute form count as duplicates.path clean/path dedupexit78without changing anything when a dropped entry shares its key with a kept one (hand-edited duplicate key in[paths]); they used to delete both lines.pre_path_remove/post_path_removehooks get the entry's directory as{path}whenpath rmis given a key (they got the key).
[env] values (generated core.zsh / core.bash / core.fish)#
- Only named variables expand:
$NAME,${NAME}and${NAME...}/${#NAME}with a closing}(zsh/bash; e.g.${X:-default}). Every other$is now literal:$1,$$,$?, a trailing$,$%, an unclosed${(was a syntax error that dropped the whole core file) and zsh flags like${(e)...}(which evaluated the text, running commands). - zsh:
$NAMEis emitted as${NAME}, so$HOME:h…/$HOME[1]are no longer zsh modifiers/subscripts — zsh now gives the same value as bash. - fish:
${NAME}, a bare$or$$no longer make core.fish fail to parse (fish then loaded none of wayu's env, PATH or aliases).${NAME:-x}has no fish equivalent and is kept literal in fish. - zsh/bash:
${NAME<op>...}expands only with-=+?(each also with a leading:),#,%or/(e.g.${X:-d},${X#pre},${X/a/b});${#NAME}only without an operator. Everything else is now literal, e.g.${X@P}(bash ≥ 4.4 ran a$(...)stored in X),${X[Y]}/${X:Y}(bash evaluated Y arithmetically, running a$(...)hidden in Y's value),${X: -2},${X^}and zsh modifiers such as${HOME:h}(zsh aborted core.zsh on an unknown modifier). - fish:
$NAMEfollowed by a non-ASCII letter ($HOMEé) no longer reads as the longer variable nameHOMEé.
functions/#
- fish now sources
functions/*.fish(core.fish never loaded them). - zsh no longer sources
functions/*.bash/*.fish, bash no longer sourcesfunctions/*.zsh/*.fish(other shells' files fromwayu function addwere parse errors at every startup). Files without those extensions are still sourced by zsh and bash.
Completions (zsh)#
- core.zsh also rebuilds
.zcompdumpwhen the list of files in the completions dir changed, so a completion added in the same second as the dump is no longer missed. The list seen at the last rebuild is kept in${ZDOTDIR:-$HOME}/.zcompdump.wayu; the first shell after upgrading rebuilds the dump once.
Completions for wayu itself (zsh, bash, fish)#
- The first argument of
path|alias|const rm|get,plugin rm|get|enable|disable|priority|update,function add|edit|rmandcompletions rmcompletes existing entries (paths as written inwayu.toml, alias/constant/plugin/function/completion names). The scripts list them by running the hiddenwayu completions names <kind>($_WAYU_BIN, elsewayuonPATH) at TAB time. Re-runwayu completions generateto update installed scripts. - fish: action words are offered only right after the command
(
wayu alias rm <TAB>no longer offersadd,list, …); flags still complete anywhere.
migrate --schema#
- Values it can't convert exactly (multi-line
"""strings, arrays, inline tables) in the rewritten sections are listed aswayu.toml:N; nothing is written and it exits65. They used to be dropped silently (an alias with a"""command became""). A section header with a trailing comment ([aliases] # mine) is now recognised. - Waits for other wayu commands (config lock) before rewriting wayu.toml.
[[paths]]/[[aliases]]/[[constants]]fields the modern schema has no place for (legacydescription,export,secret, …) are listed on stderr aswayu.toml:Nwarnings; they used to vanish silently. The migration still runs (exit0).
doctor#
- A relative
[paths]entry (./node_modules/.bin) is no longer reported as missing or removed bydoctor --fix: it is counted with the entries that "use unset variables or relative paths (left alone)". doctor --fixexits78and changes nothing when a key it would drop is repeated in[paths](a = "/x"twice); it used to delete every line of that key, the kept entry included.- bash: new warning
bash PROMPT_COMMANDwhen a bash startup file replacesPROMPT_COMMANDafter the line that loads wayu (it dropped the_wayu_paths_synchook, so open shells missedwayu path add/rm). Shown only when such a line exists; exit status unchanged (warnings never exit78). shell configuration/Sync status: only a line that runssource,.orevalcounts as loading wayu; a line that just mentions the file (alias e='vim ~/.config/wayu/init.zsh') no longer passes.Sync statusnow compares the[paths]entries with the$PATHdoctor runs in: OK when all are present, INFO "N of M PATH entries not in this shell's $PATH" otherwise (it used to claim "All wayu entries are loaded" from the rc text alone).- A
[paths]entry using an environment variable whose value is relative ($FOO/binwithFOO=rel) counts as unresolved, never missing. backups: a missing backup directory (fresh install) is INFO "No backups yet", not a warning.- Dependencies: checks
gitplus the configured shell (zsh,bashorfish) instead of alwayszsh.
Backups#
wayu backup restorewaits for other wayu commands (config lock) instead of racing them; a concurrent edit can no longer overwrite the restore.Backup times are UTC and now say so:
backup listprints2026-11-07 14:35:37 UTC;backup list --jsontimestampis ISO-8601 (2026-11-07T14:35:37Z, was2026-11-07 14:35:37).backup listandbackup rm(no type) cover every file in the backup directory, not only wayu.toml: the rc filewayu initedits,init.zsh(--optimize),plugins.json, ... Each--jsongroup'sfileis the wayu file name or the rc path (~/.config/zsh/.zshrc).backup restorestill restores wayu.toml only; copy other backups back by hand.Backups of files outside wayu's directories are named after their path relative to
$HOMEwith/as%(.config%zsh%.zshrc.backup.*), so~/.zshrcand$ZDOTDIR/.zshrckeep separate histories (~/.zshrckeeps the old.zshrc.backup.*name).Backups were silently skipped when the config path contained
.backup.(HOME=/x/my.backup.d); only the file name is checked now.backup restoreprunes to the 5 newest backups after its pre-restore snapshot (never the backup it restored), so repeated restores no longer grow the directory.backup restore <type> N: N must be decimal digits;0x1/+1are treated as file names (exit65), not #1.wayu backup list|restore|rmwork whilewayu.tomlstill uses the obsolete[[paths]]schema (they exited78).backup restorerefuses awayu.tomlbackup that uses the obsolete[[paths]]/[[aliases]]/[[constants]]schema (exit74, file unchanged); restoring one made every other command exit78, including the undobackup restore <type> 1. Copy such a backup overwayu.tomlby hand and runwayu migrate --schema.
init.<ext> from wayu ≤ 3.9#
- An unmodified
init.zshwritten by wayu 3.9 or older is now recognised and updated to the current template (old file backed up), like newer ones. It used to be kept with a "has local edits" warning, so afterwayu migrateit still sourced the emptied legacy files and the shell got no PATH, aliases or constants.
TUI#
- Adding or deleting an entry while
wayu.tomluses the obsolete[[paths]]schema (e.g. replaced by an old wayu after the TUI started) is refused with "runwayu migrate --schema"; it used to append a[paths]table to the old-schema file. - The Backups view lists
wayu.tomlbackups and Settings counts them; both only looked at the pre-3.10path/aliases/constantsfiles, so they showed none. - Adding in the TUI follows
wayu path add/alias add/const add: PATH inputname=pathsets the[paths]key (it was stored as a path relative to the TUI's directory), and the path must resolve and exist (relative paths resolve against the directory wayu was started in); otherwise the form shows the CLI's reason. Adding an alias or constant that already exists asks "REPLACE …?" first. Notifications sayAdded/Updated/Already present, nothing changed(a duplicate PATH saidAdded). --dry-run: aDRY RUNbadge sits on the top border; previews read[dry-run] would add alias: x = "…"/[dry-run] would remove …(wereDry run: would …). Plugin enable/disable/install no longer writeplugins.jsonunder--dry-run(install recorded a plugin that was never cloned).- Keys:
r/ Ctrl+R / F5 reload every view; views also reload by themselves whenwayu.toml,plugins.json,hooks.confor the backup directory change on disk.eedits the selected entry (a PATH keeps its key and position; a renamed alias/constant replaces the old name; secret values must be revealed withvfirst).urestores the newestwayu.tomlbackup after a confirmation. Text fields edit at a cursor (←/→, Home/End, Ctrl+A/E/U/K/W, Delete) and show the end of long input. - Plugins: Enter shows details on both tabs (on Registry it used to install
at once);
iinstalls after a confirmation; on Installed, space toggles enabled,eenables,xdisables, andd(which disabled) only shows thewayu plugin rmcommand. - Backups view lists every backup group (
plugins.json, the rc file, init files…, newest first). Enter on awayu.tomlbackup restores it after a confirmation (likewayu backup restore);casks, then prunes every group to the newest 5 (it targeted pre-3.10 files and removed nothing). - Long operations show a progress frame and can be cancelled with Esc /
Ctrl+C: the alias view's
$SHELL -i -c alias(now given up after 3 s, listing no external aliases), plugin clones, and hooks (in the TUI a hook is stopped after 30 s). - Hooks view lists every hook event with its command; space disables a hook
by commenting its
hooks.confline as# disabled: <line>(and enables it again),truns it once with sample values and shows its output. - Settings view: Enter toggles dry-run or colors for the session (nothing is saved); also shows the editor and the backups kept per file.
- Below 40x12 the TUI shows "Terminal too small" instead of an empty layout. It quits when its terminal input is closed (EOF) instead of spinning.
wayu.toml parsing (one parser for every command)#
toml validate,doctor,backup restore,migrate --schema, the TUI,alias/const/path list, the shell generator and the in-place editor now share one TOML parser, so they agree on every file.- Now accepted as valid (were "Failed to parse" for
toml validate, the TUI and doctor): a UTF-8 BOM, arrays spanning several lines (e.g.[settings] autosuggestions_accept_keys), quoted keys (".." = "cd .."), dotted keys, floats and dates. - Now rejected by
toml validate/ doctor /backup restore: a key defined twice in one table, a table defined twice, integers with leading zeros. Other commands keep working on such a file as before. toml validateand doctor name the offending line:Failed to parse <file>: line 5: invalid value "ls" (strings must be quoted).- Quoted keys are decoded everywhere:
"q\"k" = …is the aliasq"kinalias list(was listed with its quotes) andalias rm ..finds".." = …(said "not found"). - TUI: [paths] are shown in file order (= PATH priority; were sorted by key),
and entries of a file with a syntax error are shown like
alias listshows them (the view was empty). - [paths]/[aliases]/[env]: arrays and inline tables are skipped (the raw
text, e.g.
["a"], used to be exported). Integers are read as their value (N = 1_000→1000). A key containing a dot written bare (g.st = …, which wayu itself wrote for such alias names) is still the nameg.st. - wayu writes keys that need it quoted (
"g.st" = "git status") and escapes control characters in values (\u001B), so everything it writes is valid TOML. migrate --schemalists (instead of copying verbatim) lines that are not valid TOML, such as an unquoted value.- An edit refused because a table holds a broken multi-line value now says
why (
wayu.toml line N: unterminated array (missing ']') in [env] …). [shell] typeis written lowercase ("zsh","bash","fish"; was"ZSH","Bash","Fish","Unknown") bywayu init,migrate --from X --to Yand any command that creates a missingwayu.toml.wayu config editon a missing file creates the same scaffold (it wrote[settings] shell = "zsh"plus commented examples), and so does legacywayu migrate(it started the file with a comment line and no[shell]).toml validatenow checks[shell] type(case-insensitive); it only saw a top-levelshell = …key before. A value other than zsh/bash/fish — including"Unknown", written when no shell was detected — fails withInvalid shell: unknown (must be zsh, bash, or fish).
WAYU_CONFIG_DIR / WAYU_DATA_DIR#
WAYU_DATA_DIRis honoured whenWAYU_CONFIG_DIRis also set (it was ignored: data always went to the config dir). Data dir =WAYU_DATA_DIR, else the config dir.init.zsh/init.bash/init.fishfind their files next to themselves instead of in~/.config/wayu, so the rc line works without exporting the overrides to the shell (it used to fail with "no such file" and load no PATH/aliases). The config dir falls back to the init file's dir when that holdswayu.toml. An unmodified init file is updated on the next regeneration (backup first).- When the dirs differ from the defaults,
core.<ext>exportsWAYU_CONFIG_DIR/WAYU_DATA_DIR, sowayucommands typed in that shell (and the path-sync backgroundwayu build) use the same dirs.
[tools] evalcache#
- The cache is regenerated when the tool's binary changes, not only when it
gets newer: zsh compares resolved path + size + mtime + inode, bash the
path, the exact mtime and the inode/resolved target. Cache files now start
with a
# wayu-evalcache:line; old caches are rebuilt once. bash also keeps a<cache>.binlink next to each cache file. - The tool is looked up in
PATHonly and run ascommand <tool>(a function or alias of that name is no longer called). - New
wayu build cleandeletes the cache (${XDG_CACHE_HOME:-~/.cache}/wayu/evalcache), for init output that depends on config or environment. argsis split into words like the shell does (quotes honoured) and each word is quoted in the generated call;$NAME/${NAME...}and a leading~/still expand,{a,b}no longer brace-expands. Args containing a newline,;&|<>(),$(...)/ backticks or glob characters (*?[) are refused:wayu buildexits78naming the tool, other regenerations skip the tool with a warning on stderr.
Prompt (zsh, [prompt] enabled = true)#
- Default modules have separators like starship:
{username}{dir}{git_branch}{character}with[$user](white bold) in,[$dir](cyan bold)andon [$branch](magenta bold). Customformat/ module formats are unchanged. - The user name shows only over SSH or as root unless
[prompt.username] show_always = true(the setting was ignored). - vi mode is opt-in: the prompt no longer switches the line editor to the
vi keymap or sets
KEYTIMEOUT. vi users: addvi_mode = trueunder[prompt]to getbindkey -v,KEYTIMEOUT=1(no longer exported to child processes) and the mode indicator ([prompt.interactive] vi_mode_indicator = falsekeeps the keymap without the indicator). Without vi mode the{character}module shows success/error by exit status. zle-line-init/zle-keymap-selectare chained: a widget already installed under that name (yours, a plugin's, another prompt's) is kept as_wayu_prev_<name>and runs first; it used to be replaced.- The git branch is read without running git (walks up to
.git, readsHEAD; worktrees/submodules and$GIT_DIRincluded; detached HEAD shows the first 7 characters of the commit id) — twogitprocesses per prompt are gone. The dirty count is still fetched asynchronously. - The prompt toggle is off by default; enable it with
[prompt.interactive] toggle_enabled = true. It is bound after the vi keymap is set up, inviins+vicmdwithvi_mode = true, else inemacs; it used to land in a keymap thatbindkey -vthen replaced, or steal emacs^P. - Prompt code runs
command git/awk/sed/ …, so user aliases or functions with those names no longer change or break it.
Generated init: one fast file (zsh/bash)#
core.<ext>is now the only generated fileinit.<ext>loads: what used to belazy.<ext>([tools] lazy loaders,tools.<ext>,extra.<ext>),login.<ext>(login-only tools, now insideif [[ -o login ]]/shopt -q login_shell) andhelpers.<ext>(evalcache, zsh-defer) is inlined, and the startup PATH apply no longer readspath_sync.<ext>(the prompt hook still does). wayu deletes oldlazy/login/helpers.<ext>files (and their.zwc) when it regenerates; anything that sourced them directly should sourceinit.<ext>instead. Load order is unchanged.- zsh:
compinitruns only in interactive shells (completion is a line-editor feature, and compinit was most of the cost of sourcing init in scripts andzsh -c); in other shells a no-opcompdefis defined if none exists, so plugins calling it stay quiet..zcompdumpis also zcompiled (.zcompdump.zwc, in the background) — compinit loads it ~40% faster. The compiled file is installed only if the dump did not change while compiling, so a shell rebuilding the dump at the same time can't leave a stale.zwcthat hides newly added completions. - zsh: the native prompt is set up in interactive shells only.
- bash: the PATH apply no longer uses here-strings (a temp file each in bash 3.2) and compares in the C locale; the separate dedup pass is gone (the apply already leaves PATH without duplicates).
- [tools] evalcache (zsh) finds the tool by walking
$pathinstead of${commands[...]}, which hashed every PATH directory (~2 ms). - Startup, 20 [paths] / 60 [aliases] / 20 [env] (
tests/benchmark/startup.sh, macOS, hyperfine):zsh -f -c 'source init.zsh'22.8 → 9.3 ms (empty zsh ~3.5 ms; turbo.zsh was 8.4 ms), interactive (zsh -fi, with compinit) 22.3 → 16.0 ms; bash 9.3 → ~5 ms (turbo.bash was 3.1 ms). wayu build/build evallistcore.<ext>andpath_sync.<ext>only.
wayu export#
turbo.<ext>now has exactlycore.<ext>'s content — every feature ([tools] loaders, prompt, login tools, live PATH sync, completions with compinit) at the same speed — and wayu rewrites it whenever it regenerates core (anypath/alias/constchange, TUI edit,wayu build), so it no longer goes stale. Sourcinginit.<ext>is equivalent; turbo stays for rc files that already use it.wayu export --turbooutput text changed.wayu export --evalexpands[paths]values in the shell (like core):[paths] b = "$FZG/bin"with[env] FZG = "~/g"now works (it was dropped), an entry whose variable is unset is skipped, and entries are checked with[ -d ]when eval'd (not when wayu runs). Duplicates are dropped. The PATH part is now a short loop instead of oneexport PATH=.wayu buildno longer prints the turbo export report whenturbo.<ext>exists (it is refreshed silently with core).
fish (core.fish)#
[tools]now load in fish. evalcache entries run<tool> <args> | source, cached under~/.cache/wayu/evalcache/fish__*(regenerated when the binary's path or mtime changes; needs fish 3.5+, older fish runs the tool uncached). Args are retargeted: a wordzshorbashbecomesfishand--zsh/--bashbecomes--fish, soargs = "init zsh"runs<tool> init fish.eager, deferred (after plugins) andlogin_only(status is-login) work as in zsh/bash. Alazyentry needs a fishinit_script(*.fish);nvm/condarecipes have no fish version and are skipped with a comment.functions/*.fishload (they did only on the legacy path).[paths]dirs move to the front of PATH in[paths]order, likefish_add_path -gpm: a dir already on PATH (e.g./usr/local/bin) now gets wayu's priority instead of keeping its old place. Dirs wayu did not add are never removed.- Live PATH sync:
wayu path add/rmand hand edits of[paths]reach open fish shells at the next prompt (afish_promptevent handler re-reads the newpath_sync.fishwhen the list changed), as in zsh/bash. - Re-sourcing
init.fishno longer adds the completions dir tofish_complete_pathagain. [aliases]are defined last (after plugins and tools), as in zsh/bash.init.fishsourcestools.fishbeforeextra.fish(was the reverse). An untouchedinit.fishis updated automatically.
zcompile#
- A background compile interrupted by a signal removes its temp digest, and
temp digests (
<file>.<pid>.tmp.zwc) older than a minute are swept before compiling; the compile also runs in its own session, so closing the terminal no longer kills it halfway (straycore.zsh.<pid>.tmp.zwcfiles were left in the data dir). - Generated zsh files are recompiled in the background after every change
(
wayu path/alias/const add, TUI, …), not only bywayu init/build, so the bytecode speedup no longer disappears after the first edit. wayu_compile(now defined in core.zsh) uses the data dir the file was generated for, and compiles core, plugins and turbo.wayu build profileworks when the data dir path contains spaces.
Colors#
- Output is plain (no ANSI escape codes) when stdout is not a terminal:
wayu path list | grep x,$(wayu ...), logs and CI get plain text. SetFORCE_COLOR=1(orCLICOLOR_FORCE=1) to keep colors in a pipe. Errors/warnings on stderr are colored only when stderr is a terminal. NO_COLOR=1and--no-colornow remove every escape code (tables, help, errors, doctor, backup list, …); some used to remain. They win overFORCE_COLOR.
Errors and warnings#
ERROR: …and⚠ …messages go to stderr (they were on stdout), so2>/dev/nullsilences them andwayu … --json | jqnever sees them.- A failed read of a file reports one error, not two (the extra
ERROR: Could not read …line is gone). - Before
wayu init,path list|get|rm|clean|dedupandpath addof an existing directory exit78with the "not initialized" message, likealias/const(they exited66with "File not found"). wayu export help/export listwork without a wayu config.
--json#
alias list --json,const list --jsonandplugin list --jsonprint an empty JSON list ({"aliases": []}, …) when there is nothing to list; they printedℹ No … found.plugin list --jsonescapes every string (a quote or backslash in a path broke the document).path list --json --source external(and--full) include the external$PATHentries the table shows ("source": "external"); they were dropped.search QUERY --jsonprints{"query": …, "results": [{"type", "name", "value", "match", "field", "score"}], "count": N}; it ignored--json.--jsonon a command/action without JSON output (path add,const get,hooks,toml show, …) exits64and names the commands that support it; it used to be ignored. Supported:path|alias|const| backup|plugin list,search,doctor(and anyhelp).
Commands and actions#
- Command names, action words, per-command flags and
--jsonsupport come from one table (also used by completions andwayu help). An action word a command doesn't have exits64with that command's help: e.g.alias check(silently did nothing, exit0),alias clean(exit1),backup clean|add|get,path enable. wayu helplists every command (it missedbuildandexport) and a COMMAND FLAGS section;--jsonand--no-colorare listed under FLAGS.- Completions offer each command's flags and
--jsonwhere supported, andexport check.
Tables and pickers#
- List tables written to a pipe or file (
wayu path list | cat) are no longer fitted to 80 columns: values are printed whole. An exportedCOLUMNSstill sets the width. - The interactive picker (TUI remove, completions) keeps every character of
a paste or fast typing (only the first one was used), ignores unknown
escape sequences instead of filtering on their bytes, and a lone
Esccancels likeCtrl+C.kill -INT/kill -QUITrestore the terminal.
TUI terminal handling#
- Keys:
Escfollowed by a key within 100ms is now Alt+key (what terminals send for Meta/Option chords) and does nothing; it used to be "Escape, then the key", so Alt+d in the filter cancelled it and opened a delete confirmation. A loneEsctherefore takes effect after 100ms (was 25ms), which also keeps arrow keys split by a slow ssh link from acting asEsc.ESCDELAY(milliseconds, as in ncurses) changes the window. - Paste: bracketed paste is enabled while the TUI runs. A paste goes into the focused text field (add form, filter) as text — newlines dropped, tabs as spaces — and is ignored anywhere else; pasted newlines and letters no longer submit forms or run actions. In terminals without bracketed paste, keys typed ahead of a delete confirmation or after a submitted form are discarded, so the rest of a pasted line can't answer the dialog.
Ctrl+Zsuspends the TUI (andkill -TSTPrestores the terminal before stopping);fgresumes and repaints.Ctrl+Zused to be ignored.- Colors: list text uses the terminal's default foreground instead of a
fixed light gray. On a light background —
WAYU_THEME=light, a lightCOLORFGBG, or the terminal's answer to an OSC 11 query at startup (WAYU_THEME=darkskips the query) — dividers, orange/amber, green and blue accents use darker variants. In 16-color terminals the accent is bright magenta (was red, like errors) and dividers gray (were black). The hidden cursor is parked on the selected row for screen readers. - Width: combining accents, emoji variation selectors (VS16) and ZWJ
sequences take no column of their own, and text-style symbols such as
➜ ✔ ★ ❤ ⛰count as one column (they counted two), using the same Unicode tables as terminals. Rows with such characters no longer shift or leave stray glyphs in the TUI, and CLI tables containing them line up differently. In the TUI a VS16 or ZWJ is dropped, so❤️is drawn as❤and a ZWJ family emoji as its separate emoji. - If the TUI dies (a crash or a fatal error in shared code), what it wrote
to stderr — the runtime's bounds-check location, the error before the
exit — is printed after the terminal is restored; it used to be wiped
with the alternate screen. An unreadable
wayu.tomlwhile adding or removing an entry is reported in the TUI instead of exiting with the terminal left raw.
Editor (function add/edit, config edit|extend, hooks edit)#
$EDITOR/$VISUALmay carry arguments (code --wait,subl -w): it runs assh -c '$EDITOR "$1"'. It used to be looked up as one program name and silently fail.- An editor that can't start or exits non-zero makes wayu exit
1withERROR: Editor '…' exited with status N(it exited0and printed "Reload your shell…");config editthen skips regenerating the init. - With neither variable set, every command opens
vi(functionandconfigusednvim).
Templates#
template applynever overwrites what you have: a[paths]directory already listed, an alias or[env]name already in wayu.toml, or a constant already set in the environment wayu runs in is kept and shown asKeeping …. (It used to replace e.g.EDITOR = "nvim"withcode --wait.) The summary reads "N added, M kept".--dry-run template apply …printsWould add …/Keeping …and "Nothing was written"; it used to print "… template applied!".- The
developertemplate no longer addscode = "code ."(it shadowed thecodebinary). wayu init --template <name>(or--template=<name>) works: init, then apply the template. An unknown name exits65and a missing one64, before anything is written; any other argument toinitexits64.
config scan --fix#
- Aborts (exit
74) whenextra.<ext>exists but can't be backed up or read; it used to write anyway. - Blocks already in
extra.<ext>are not appended again, so re-running it no longer duplicates PATH prepends and evals; with nothing new it prints "All N blocks are already in …" and writes nothing.
5.0.0#
doctor#
doctor --json(and--json doctor) prints JSON;--json --fixexits64.doctorexits78when any check reports an error (also with--json).doctor --fixrequires--yes(exit64otherwise);--dry-run --fixpreviews. It no longer symlinks./wayuinto/usr/local/binor generates turbo files, and never removes a[paths]entry that uses an unset variable.doctor --optimizeis removed (exit64); usewayu build/wayu export.- Startup detection covers
~/.zshenv,$ZDOTDIR,.zprofile,.zlogin,.bash_profile,.bash_login,.profile, fishconf.d/andeval "$(wayu build eval)".wayu initwrites$ZDOTDIR/.zshrcwhenZDOTDIRis set.
migrate#
- Legacy import parses shell quoting exactly (single/double quotes,
$'..', escapes,export A=1 B=2,typeset -x, fishset -gx/alias). Lines it can't convert exactly (functions, conditionals, multi-line values, command substitution, …) are listed withfile:line; then nothing is imported or archived and it exits65. Files are archived only after a full import. migrate --from X --to Yno longer translates generated files line by line: it requireswayu.toml(exit78otherwise), sets[shell] typeand regenerates the target shell's files fromwayu.toml.
Prompt (zsh)#
The native wayu prompt is now opt-in. It is generated only when
wayu.tomlhasenabled = trueunder[prompt]; without it wayu no longer setsPROMPT/RPROMPT,setopt promptsubst, the vi keymap (bindkey -v),KEYTIMEOUT=1, thezle-line-init/zle-keymap-selectwidgets or its git/async precmd hooks. To keep the previous prompt, add:[prompt] enabled = true[prompt]text (format, character symbols,[prompt.contexts]formats,rprompt_format) is literal:$(...), backticks,$VARand quotes are printed as typed instead of being executed or breakingcore.zsh. Prompt%escapes (%n,%~, …) and the module variables ($dir,$user,$branch,$version,{git_pending}, …) still work.toggle_keyand[settings] autosuggestions_accept_keysare emitted as single-quotedbindkeyarguments; a key containing'no longer breaks (or injects code into) the generated file.The async right prompt keeps its data in a private
mktemp -ddirectory (mode0700, removed when the shell exits) instead of${TMPDIR:-/tmp}/.wayu_async_<pid>.
Watcher#
wayu watchno longer grows in memory while idle, and removes itswatcher.pidwhen stopped with Ctrl+C /SIGTERM/SIGHUP.
Plugins#
plugin rmon a plugin dir that is a symlink removes only the link; the link target (e.g. your working copy) is never touched. A plugin dir that resolves outsideplugins/is not deleted (warning; the entry is still removed fromplugins.json).plugins.jsonis validated on load. Any command that reads it exits78naming the bad entry when aurlis not https://, ssh://,git@host:or file://, starts with-or contains whitespace/control characters; when aname,git.branch/tag/commit/pinned_reforinstalled_pathstarts with-(or has control characters); or whenshell,template,source_typeorgit.ref_typeholds an unknown value. Enum values are matched case-insensitively ("shell": "bash"used to load as zsh) andplugins.jsonnow stores them as names ("shell": "ZSH") instead of numbers; old files still load and older wayu versions read the new ones.- Plaintext
http://andgit://plugin URLs are refused (plugin addexits65).ssh://andfile://URLs are now accepted byplugin add. plugin add <name-or-url>@<commit>(7–40 hex digits) installs at that commit and pins it; pinned plugins are skipped byplugin update, andplugin checkfails if the checkout has moved off the pinned commit.plugin checkexits74and prints "N plugin(s) could not be checked" instead of "All plugins are up to date!" when any remote could not be read. It compares againstrefs/heads/<branch>exactly, so branches likerelease/mainor a tag namedmainno longer cause false "update available" reports.plugin updatefetches and fast-forwards; when upstream rewrote history (force-push) a clean checkout is reset to the remote branch. A checkout with local modifications, or a symlinked plugin dir, is never reset — the update fails with git's error message, which is now shown. Output shows theold → newcommit for each plugin.--dry-run plugin updateprints "Would update …" and no longer claims plugins were updated.
Generated shell code#
[aliases]are defined at the end ofcore.<ext>, after plugins, lazy tools,tools.<ext>andextra.<ext>. Functions in those files can no longer rely on wayu aliases being expanded inside their bodies; an alias named like a wrapper (npm,conda, alazyhook command) no longer breaks the tool loaders.- zsh init works under
NO_BARE_GLOB_QUAL,KSH_ARRAYSandNO_GLOB, and with aliases forls/rm/node/… defined before wayu is sourced. - The user-function loop variable
fis no longer left set in the shell.
nvm ([tools] nvm = { kind = "nvm" })#
- The default node is resolved like nvm does: aliases are followed
(
lts/iron,lts/*,v20.18.0with a leadingv), the highest matching install wins (20→ newest 20.x, not the lexicographically last), and a partial version matches whole components (20.1→ 20.1.x only). Defaults that previously put no node (or an older one) on PATH now pick a different version..nvmrc/.node-version(zsh) use the same rules.
Completions#
- zsh: when
~/.config/wayu/completionschanged after~/.zcompdumpwas written (e.g.wayu completions add), the dump (and its.zwc) is deleted and rebuilt withcompinit -u; otherwisecompinit -Cas before. - bash:
completions/*.bashis sourced too, sowayu completions generate(which writeswayu.bash) enables wayu's own bash completion. - wayu's own zsh/bash/fish completions cover every command (
doctor,template,hooks,reload,build,function, aliases likeconst,fn,watch) and are generated from one table.
init.<ext>#
init.<ext>is only updated when it is an unmodified copy of a template an earlier wayu wrote; the old file is backed up first. A file you edited is left alone and wayu prints a warning on stderr (once per edit when stderr is a terminal). To adopt the new template, move it aside and runwayu init.
Flags#
- Unknown options are an error:
wayu path add DIR --dryrun(typo) exits64and writes nothing instead of performing the add. Each command accepts the global flags plus its own (doctor --fix,plugin update --all,migrate --from/--to/--schema,export --eval/--turbo/--check, …). A value that starts with-goes after--(wayu path rm -- -odd); the first value word ofalias add/const add(const add OFFSET -5) and negative numbers (plugin priority foo -1) are still taken as values. - A global long flag at the very end of
alias add/const add(--dry-run,--yes,--json,--no-color) is now a flag, not part of the value:wayu alias add x y --dry-runpreviews instead of storingy --dry-run. To keep it in the value, put--before the value:wayu alias add hd -- helm install --dry-run. A trailing-n/-ystill belongs to the value (grep -n) but prints a warning on stderr.
Hooks#
- A
{path}/{name}/{value}placeholder inside single quotes inhooks.confis no longer substituted by wayu: it becomes"$WAYU_HOOK_PATH"(etc.) for an inner shell to expand. This closes a command injection throughsh -c '... {path}',ssh,eval. A plainecho 'Adding {path}'now logs the literal reference — use double quotes (echo "Adding {path}") for direct substitution.wayu hooksflags such placeholders. pre_*hooks run only when the operation will really write: not for invalid names, missing entries on remove, or duplicate path adds.
Backups#
- Every write now keeps only the newest 5 backups per file (previously only
path clean/deduppruned, so the backup dir grew without bound). - A command takes at most one backup per file (the state before it ran):
migrate,template apply,doctor --fixno longer leave one backup per entry. The TUI still backs up every change. wayu backup restore <type> [N|file] --yesrestores backup#Nfromwayu backup list(or that file). The snapshot taken before a restore is marked[pre-restore], and a restore withoutNskips those, so repeating it no longer flips between the last two states; undo a restore withwayu backup restore <type> 1 --yes.backup list --jsonentries gainindexandpre_restore.
export / build#
wayu export --eval,--checkand--turbonow do what the help says (they all used to regenerate the turbo file and print decorated output, soeval "$(wayu export --eval)"broke the shell).--checkexits78when the turbo file is missing or older thanwayu.toml.wayu export listshows the formats instead of writing the turbo file; an unknownexportmode orbuildtarget exits64.wayu exportrefuses fish (exit64): its output is sh syntax.wayu buildno longer refreshes a turbo file for fish.- Turbo/eval output does not include
[tools]lazy loaders, the prompt, login hooks or live PATH sync; the help now says so (it used to promise a drop-in faster replacement).wayu buildhelp no longer claims SIMD/threaded/GPU optimisation.
4.4.4#
Lookups and output#
wayu const|alias|path get NAMEmatches the exact name only (case-sensitive). A miss prints nothing on stdout, lists up to 5 similar names (never values) on stderr and exits65. The interactive fuzzy picker and theWAYU_FFF_AUTO_FALLBACK/WAYU_FFF_INTERACTIVEtoggles are gone.- Secret-looking values (names with KEY, TOKEN, SECRET, PASS, API, AUTH, …, or
token-shaped values) are shown as
********in--dry-run,search,export --dry-runand migrate dry-runs.const getandconst liststill print real values. --dry-runon alias/const/path changes shows only the keys that change (+/~/-), not the wholewayu.toml.
Files and permissions#
- Backups and generated files (
core,lazy,login,helpers) are0600, the backup dir0700; older backups are tightened on the next backup. A newwayu.tomlis created0600; an existing one keeps its mode. - All writes are atomic (temp file + rename) and serialized across processes
by
~/.config/wayu/.wayu.lock; concurrentwayucommands queue instead of losing entries. - A
wayu.tomltable holding an unterminated multi-line value makes edits fail with exit65and writes nothing.
PATH#
[paths]is never re-sorted: file order is PATH priority.path addappends (lowest wayu priority, still ahead of system dirs).- Entries containing
:or a newline are rejected (exit65); such hand-edited entries are skipped with a warning. - The
wayu()shell function is gone. Open shells pick up PATH changes — including hand edits of[paths]— at their next prompt via a prompt hook. [paths]values are expanded by the shell:$VAR/${VAR}work, an unset variable drops that entry, missing directories are skipped.[env]is now emitted before PATH so$GOPATH/binworks.- Removing an entry never strips a directory the system PATH also provides.
- The legacy
path.<ext>is no longer sourced once[paths]exists.
Generation#
- Plain
wayu buildregenerates every initialized shell's files (it used to run the turbo export; usewayu build turbofor that). Mutations also regenerate every initialized shell, not only$SHELL's. wayu config editregenerates after the editor exits.wayu build evalemits code for the shell that evaluates it (its parent process), not$SHELL; under an unknown shell it prints nothing; as root on a user-owned config (sudo zshsourcing your.zshenv) it writes nothing.
Distribution#
- Release binaries: macOS arm64 and Linux x86_64 only. Homebrew refuses other architectures with an architecture error.
4.4.3#
$(...)in[env]values is kept literal; it no longer executes at shell startup.-f,-n,-yafter an alias/constant value are kept as part of the value; use--to end flags explicitly.- Hook placeholders are passed env-quoted.
--dry-runwrites nothing anywhere (no regeneration, no hooks).backup restorerequires--yes.- Exit codes: data errors exit
65, I/O errors74. - Ctrl+Z no longer suspends the TUI.