Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
eb2d5fc
fix(init): strip hash suffix when unloading project aliases in force-…
sassman Apr 22, 2026
af7dab3
fix(hook): restore shadowed profile/global aliases on project unload
sassman Apr 22, 2026
ed82ee1
feat: scaffold precedence module with public types
sassman Apr 22, 2026
dbb0188
feat: layer merge with project > profile > global
sassman Apr 22, 2026
1dc12d9
feat: content hashing for aliases and subcommand programs
sassman Apr 22, 2026
20fd21e
feat: parse shell state from _AM_ALIASES / _AM_SUBCOMMANDS
sassman Apr 22, 2026
91a9f3f
feat: diff algorithm for regular aliases
sassman Apr 22, 2026
40867d2
feat: subcommand precedence and program-level wrappers
sassman Apr 22, 2026
a75d9b0
refactor: use subcommand::group_by_program directly
sassman Apr 22, 2026
aff99e0
feat: introspected shell state input
sassman Apr 22, 2026
33040a9
feat: render_diff translates diff to shell code
sassman Apr 22, 2026
e30f70a
feat: add 'am sync' command backed by Precedence Engine
sassman Apr 22, 2026
4bc2ad7
feat: trust gating, messaging, and _AM_PROJECT_PATH bookkeeping for sync
sassman Apr 22, 2026
8301e9f
feat: delegate init alias emission to Precedence Engine
sassman Apr 22, 2026
0c2ed28
feat: rewrite init --force to strip hashes and union env + introspection
sassman Apr 22, 2026
43d743e
feat: shell wrappers and cd hooks invoke 'am sync'
sassman Apr 22, 2026
8224e90
refactor: remove 'am hook', 'am reload', hook.rs, legacy env vars
sassman Apr 22, 2026
268fd56
test: regenerate snapshots for Precedence Engine output
sassman Apr 22, 2026
577a05c
chore: fix fmt and clippy lints
sassman Apr 22, 2026
6989c56
fix: prefix profile activation messages with 'am:'
sassman Apr 22, 2026
9865486
fix: emit full alias listing on fresh cd into a trusted project
sassman Apr 22, 2026
5230686
fix: unify profile activation output with shadow-by-project breakdown
sassman Apr 22, 2026
6300110
fix: use 'loaded'/'unloaded' instead of 'added'/'removed' in messages
sassman Apr 22, 2026
075cb0d
fix: include subcommand keys in profile activation message
sassman Apr 22, 2026
f104ef4
docs: update for am sync and new message format
sassman Apr 22, 2026
88f6fdc
fix: clear fish completion wraps before redefining aliases
sassman Apr 22, 2026
84bd8a7
fix: emit fish aliases as plain functions without --wraps
sassman Apr 22, 2026
eb1561a
fix: restore fish completion inheritance without --wraps stacking
sassman Apr 22, 2026
d4ddb97
refactor: wrap SubcommandSet in a newtype with minimal API surface
sassman Apr 23, 2026
4030e07
refactor: make group_by_program a method on SubcommandSet
sassman Apr 23, 2026
994ff00
refactor: make render a method on PrecedenceDiff
sassman Apr 23, 2026
0844781
fix: include alias names in sync incremental message
sassman Apr 23, 2026
59cb1d0
refactor: central format_change_summary helper + drop dead render_unl…
sassman Apr 23, 2026
e4d8d62
refactor: move sync change summary onto PrecedenceDiff
sassman Apr 23, 2026
2ba7374
refactor: wrap env-var entry format in AliasWithHash newtype
sassman Apr 23, 2026
147ffd0
refactor: split precedence.rs into a folder module
sassman Apr 23, 2026
5b9262c
refactor: share format_change_summary between diff.change_summary and…
sassman Apr 23, 2026
c30bc9c
fix: drop rustdoc intra-doc links to private submodules
sassman Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 27 additions & 61 deletions completions/bash/am.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ _am() {
am,help)
cmd="am__subcmd__help"
;;
am,hook)
cmd="am__subcmd__hook"
;;
am,import)
cmd="am__subcmd__import"
;;
Expand All @@ -40,9 +37,6 @@ _am() {
am,profile)
cmd="am__subcmd__profile"
;;
am,reload)
cmd="am__subcmd__reload"
;;
am,remove)
cmd="am__subcmd__remove"
;;
Expand All @@ -55,6 +49,9 @@ _am() {
am,status)
cmd="am__subcmd__status"
;;
am,sync)
cmd="am__subcmd__sync"
;;
am,trust)
cmd="am__subcmd__trust"
;;
Expand All @@ -76,9 +73,6 @@ _am() {
am__subcmd__help,help)
cmd="am__subcmd__help__subcmd__help"
;;
am__subcmd__help,hook)
cmd="am__subcmd__help__subcmd__hook"
;;
am__subcmd__help,import)
cmd="am__subcmd__help__subcmd__import"
;;
Expand All @@ -91,9 +85,6 @@ _am() {
am__subcmd__help,profile)
cmd="am__subcmd__help__subcmd__profile"
;;
am__subcmd__help,reload)
cmd="am__subcmd__help__subcmd__reload"
;;
am__subcmd__help,remove)
cmd="am__subcmd__help__subcmd__remove"
;;
Expand All @@ -106,6 +97,9 @@ _am() {
am__subcmd__help,status)
cmd="am__subcmd__help__subcmd__status"
;;
am__subcmd__help,sync)
cmd="am__subcmd__help__subcmd__sync"
;;
am__subcmd__help,trust)
cmd="am__subcmd__help__subcmd__trust"
;;
Expand Down Expand Up @@ -167,7 +161,7 @@ _am() {

case "${cmd}" in
am)
opts="-h -V --help --version add remove ls status profile init setup use tui export import share trust untrust hook reload help"
opts="-h -V --help --version add remove ls status profile init setup use tui export import share trust untrust sync help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down Expand Up @@ -229,7 +223,7 @@ _am() {
return 0
;;
am__subcmd__help)
opts="add remove ls status profile init setup use tui export import share trust untrust hook reload help"
opts="add remove ls status profile init setup use tui export import share trust untrust sync help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down Expand Up @@ -284,20 +278,6 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__help__subcmd__hook)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__help__subcmd__import)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
Expand Down Expand Up @@ -410,7 +390,7 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__help__subcmd__reload)
am__subcmd__help__subcmd__remove)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
Expand All @@ -424,7 +404,7 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__help__subcmd__remove)
am__subcmd__help__subcmd__setup)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
Expand All @@ -438,7 +418,7 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__help__subcmd__setup)
am__subcmd__help__subcmd__share)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
Expand All @@ -452,7 +432,7 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__help__subcmd__share)
am__subcmd__help__subcmd__status)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
Expand All @@ -466,7 +446,7 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__help__subcmd__status)
am__subcmd__help__subcmd__sync)
opts=""
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
Expand Down Expand Up @@ -536,20 +516,6 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__hook)
opts="-q -h -V --quiet --help --version bash brush fish powershell zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__import)
opts="-l -g -p -b -y -h -V --local --global --profile --all --base64 --yes --trust --help --version <SOURCE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
Expand Down Expand Up @@ -762,20 +728,6 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__reload)
opts="-h -V --help --version bash brush fish powershell zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__remove)
opts="-p -l -g -h -V --profile --local --global --sub --help --version <NAME>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
Expand Down Expand Up @@ -852,6 +804,20 @@ _am() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__sync)
opts="-q -h -V --quiet --help --version bash brush fish powershell zsh"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
am__subcmd__trust)
opts="-h -V --help --version"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
Expand Down
44 changes: 20 additions & 24 deletions completions/fish/am.fish
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ complete -c am -n "__fish_am_needs_command" -f -a "import" -d 'Import aliases fr
complete -c am -n "__fish_am_needs_command" -f -a "share" -d 'Generate a share command for posting aliases to a pastebin service'
complete -c am -n "__fish_am_needs_command" -f -a "trust" -d 'Review and trust the project .aliases file in the current directory'
complete -c am -n "__fish_am_needs_command" -f -a "untrust" -d 'Remove trust for the project .aliases file in the current directory'
complete -c am -n "__fish_am_needs_command" -f -a "hook" -d 'Internal: called by the cd hook to load/unload project aliases'
complete -c am -n "__fish_am_needs_command" -f -a "reload" -d 'Internal: called by the am wrapper to reload profile aliases after switching'
complete -c am -n "__fish_am_needs_command" -f -a "sync" -d 'Internal: compute and emit the minimal shell ops to sync the shell with the effective merged alias state (global + profile + project)'
complete -c am -n "__fish_am_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c am -n "__fish_am_using_subcommand add" -s p -l profile -d 'Profile to add the alias to (defaults to active profile)' -r
complete -c am -n "__fish_am_using_subcommand add" -l sub -d 'Define a subcommand alias (repeatable: --sub short long)' -r
Expand Down Expand Up @@ -125,28 +124,25 @@ complete -c am -n "__fish_am_using_subcommand trust" -s V -l version -d 'Print v
complete -c am -n "__fish_am_using_subcommand untrust" -s f -l forget -d 'Forget the path entirely (remove from security tracking instead of marking untrusted)'
complete -c am -n "__fish_am_using_subcommand untrust" -s h -l help -d 'Print help'
complete -c am -n "__fish_am_using_subcommand untrust" -s V -l version -d 'Print version'
complete -c am -n "__fish_am_using_subcommand hook" -s q -l quiet -d 'Suppress info and warning messages (still unloads/loads aliases)'
complete -c am -n "__fish_am_using_subcommand hook" -s h -l help -d 'Print help'
complete -c am -n "__fish_am_using_subcommand hook" -s V -l version -d 'Print version'
complete -c am -n "__fish_am_using_subcommand reload" -s h -l help -d 'Print help'
complete -c am -n "__fish_am_using_subcommand reload" -s V -l version -d 'Print version'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "add" -d 'Add a new alias'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "remove" -d 'Remove an alias'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "ls" -d 'List all profiles and project aliases'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "status" -d 'Check if the shell is set up correctly'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "profile" -d 'Manage profiles (defaults to listing when no subcommand given)'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "init" -d 'Print shell init code'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "setup" -d 'Guided setup — adds amoxide to your shell profile'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "use" -d 'Shortcut for `am profile use` — toggle one or more profiles'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "tui" -d 'Launch the interactive TUI for managing aliases and profiles'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "export" -d 'Export aliases to stdout as TOML'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "import" -d 'Import aliases from a URL or file'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "share" -d 'Generate a share command for posting aliases to a pastebin service'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "trust" -d 'Review and trust the project .aliases file in the current directory'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "untrust" -d 'Remove trust for the project .aliases file in the current directory'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "hook" -d 'Internal: called by the cd hook to load/unload project aliases'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "reload" -d 'Internal: called by the am wrapper to reload profile aliases after switching'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust hook reload help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c am -n "__fish_am_using_subcommand sync" -s q -l quiet -d 'Suppress info and warning messages (still unloads/loads aliases)'
complete -c am -n "__fish_am_using_subcommand sync" -s h -l help -d 'Print help'
complete -c am -n "__fish_am_using_subcommand sync" -s V -l version -d 'Print version'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "add" -d 'Add a new alias'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "remove" -d 'Remove an alias'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "ls" -d 'List all profiles and project aliases'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "status" -d 'Check if the shell is set up correctly'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "profile" -d 'Manage profiles (defaults to listing when no subcommand given)'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "init" -d 'Print shell init code'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "setup" -d 'Guided setup — adds amoxide to your shell profile'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "use" -d 'Shortcut for `am profile use` — toggle one or more profiles'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "tui" -d 'Launch the interactive TUI for managing aliases and profiles'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "export" -d 'Export aliases to stdout as TOML'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "import" -d 'Import aliases from a URL or file'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "share" -d 'Generate a share command for posting aliases to a pastebin service'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "trust" -d 'Review and trust the project .aliases file in the current directory'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "untrust" -d 'Remove trust for the project .aliases file in the current directory'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "sync" -d 'Internal: compute and emit the minimal shell ops to sync the shell with the effective merged alias state (global + profile + project)'
complete -c am -n "__fish_am_using_subcommand help; and not __fish_seen_subcommand_from add remove ls status profile init setup use tui export import share trust untrust sync help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c am -n "__fish_am_using_subcommand help; and __fish_seen_subcommand_from profile" -f -a "add" -d 'Add a new profile'
complete -c am -n "__fish_am_using_subcommand help; and __fish_seen_subcommand_from profile" -f -a "use" -d 'Toggle one or more profiles as active/inactive, optionally at a specific priority'
complete -c am -n "__fish_am_using_subcommand help; and __fish_seen_subcommand_from profile" -f -a "remove" -d 'Remove a profile'
Expand Down
Loading
Loading