diff --git a/.superpowers/sdd/2026-10-16-che-18-chezmoidata-reorganization/task-1-report.md b/.superpowers/sdd/2026-10-16-che-18-chezmoidata-reorganization/task-1-report.md new file mode 100644 index 00000000..f8c46526 --- /dev/null +++ b/.superpowers/sdd/2026-10-16-che-18-chezmoidata-reorganization/task-1-report.md @@ -0,0 +1,36 @@ +# CHE-18 Task 1 implementation report + +## Summary + +Reorganized `.chezmoidata` to the approved layout, updated documentation references, and added layout assertions to the render test. The package-manager data was partitioned by retaining each manager's complete source section and table/array content. `.chezmoiscripts` remains flat. + +## TDD evidence + +- **RED:** After adding assertions for the new layout and correcting the Ubuntu fixture's personal feature, `./tests/chezmoi-render-scripts.sh` failed with `new data path is missing: directories.toml`. +- After the migration, the render suite exposed a separate pre-existing expectation mismatch: the macOS imperative-tools render does contain `herdr plugin install`. The enabled Herdr records are present in source data and the template renders all enabled records without an OS filter. Per supervisor ruling, corrected the test to assert the rendered Herdr commands are present; no data/template behavior was changed for this issue. +- **GREEN:** With that test-only assertion correction, the full render suite passed: `chezmoi script render tests passed`. + +## Changes + +- Renamed/moved data files to the approved paths: `directories.toml`, `packages/github-binaries.toml`, `packages/languages.toml`, `cli-tool-setup.toml`, `ssh-hosts.toml`, `apps/cask-app-names.toml`, and `apps/macos-external-apps.toml`. +- Split the former package-system file into `packages/system/{apt,homebrew,mas,pacman}.toml`. +- Left `accounts.toml`, `onepassword.toml`, and `shell_env.toml` unchanged. +- Updated `tests/chezmoi-render-scripts.sh` with positive new-path/negative old-path assertions, Ubuntu `personal=true`, and the corrected Herdr output expectation. +- Updated the four requested documentation files. + +## Validation + +Commands run: + +1. `./tests/chezmoi-render-scripts.sh` before migration — failed as intended on missing `directories.toml`. +2. `chezmoi -S chezmoi data | jq -S . > /tmp/che18-current.json` and `jq -S . .superpowers/sdd/2026-10-16-che-18-chezmoidata-reorganization/base-data.json > /tmp/che18-base.json`, followed by `diff -u /tmp/che18-base.json /tmp/che18-current.json` — passed with no output; normalized merged data is identical to the capture. +3. `./tests/chezmoi-render-scripts.sh` — passed (`chezmoi script render tests passed`). +4. `rg` search over docs/source/tests for old `.toml` paths — no stale references; remaining matches are correct new paths containing old-name substrings. +5. `find chezmoi/.chezmoiscripts -mindepth 1 -maxdepth 1 -type d -print` — no directories; scripts remain flat. +6. `git diff --check` — passed. + +## Self-review / residual risks + +- The render test's previous macOS assertion contradicted the existing enabled imperative-tool data and the unconditional template loop. Its expectation now matches actual unchanged rendering; this is test-only and avoids an unapproved behavior change. +- No observed changes to merged data or arrays. The four manager sections were preserved as whole TOML sections. Commit hooks normalized trailing whitespace and corrected the spelling in two inactive package-name example comments to satisfy the repository typo check; neither affects data values. +- No other known residual risks. diff --git a/chezmoi/.chezmoidata/diff-name-apps.toml b/chezmoi/.chezmoidata/apps/cask-app-names.toml similarity index 100% rename from chezmoi/.chezmoidata/diff-name-apps.toml rename to chezmoi/.chezmoidata/apps/cask-app-names.toml diff --git a/chezmoi/.chezmoidata/macos-external-apps.toml b/chezmoi/.chezmoidata/apps/macos-external-apps.toml similarity index 98% rename from chezmoi/.chezmoidata/macos-external-apps.toml rename to chezmoi/.chezmoidata/apps/macos-external-apps.toml index dd95629b..7b9debc5 100644 --- a/chezmoi/.chezmoidata/macos-external-apps.toml +++ b/chezmoi/.chezmoidata/apps/macos-external-apps.toml @@ -17,7 +17,7 @@ # download_url = "https://tunaformac.com/download/latest" # type = "dmg" # - # # blur external + # # blur external # [[macos_external_app]] # app_name = "monocle" # download_url = "https://files.heyiam.dk/updates/Monocle-3-0-3.dmg" diff --git a/chezmoi/.chezmoidata/imperative-cli-tools.toml b/chezmoi/.chezmoidata/cli-tool-setup.toml similarity index 100% rename from chezmoi/.chezmoidata/imperative-cli-tools.toml rename to chezmoi/.chezmoidata/cli-tool-setup.toml diff --git a/chezmoi/.chezmoidata/constants.toml b/chezmoi/.chezmoidata/directories.toml similarity index 100% rename from chezmoi/.chezmoidata/constants.toml rename to chezmoi/.chezmoidata/directories.toml diff --git a/chezmoi/.chezmoidata/binaries.toml b/chezmoi/.chezmoidata/packages/github-binaries.toml similarity index 100% rename from chezmoi/.chezmoidata/binaries.toml rename to chezmoi/.chezmoidata/packages/github-binaries.toml diff --git a/chezmoi/.chezmoidata/packages-language.toml b/chezmoi/.chezmoidata/packages/languages.toml similarity index 100% rename from chezmoi/.chezmoidata/packages-language.toml rename to chezmoi/.chezmoidata/packages/languages.toml diff --git a/chezmoi/.chezmoidata/packages/system/apt.toml b/chezmoi/.chezmoidata/packages/system/apt.toml new file mode 100644 index 00000000..bf097a63 --- /dev/null +++ b/chezmoi/.chezmoidata/packages/system/apt.toml @@ -0,0 +1,67 @@ +[packages] + [packages.apt] + to_remove = [] + + [packages.apt.common] + packages = [ + # System Essentials + "apt-transport-https", + "curl", + "dnsutils", + "logrotate", + "nano", + "needrestart", + "net-tools", + "openssh-server", + "p7zip-full", + "sudo", + "tzdata", + "unzip", + "wget", + "xz-utils", + "zsh", + + # CLI Utilities + "bat", # cat with syntax highlighting and Git integration + "figlet", + "eza", + "lolcat", + "mc", # Midnight Commander + "ncdu", # NCurses Disk Usage + + # Git & Version Control + "git", + "git-extras", + + # Security + "gnupg", + "gpg", + ] + + [packages.apt.development] + packages = [ + # Essential build dependencies for VPS development + "build-essential", + "pkg-config", + "libssl-dev", + "fd-find", + "fzf", + "jq", + "ripgrep", + "sd", + "yq", + ] + + [packages.apt.homelab] + packages = ["iperf"] + + [packages.apt.personal] + packages = [ + # Development conveniences + "fd-find", + "fzf", + "jq", + "ripgrep", + "sd", + "yq", + ] diff --git a/chezmoi/.chezmoidata/packages-system.toml b/chezmoi/.chezmoidata/packages/system/homebrew.toml similarity index 68% rename from chezmoi/.chezmoidata/packages-system.toml rename to chezmoi/.chezmoidata/packages/system/homebrew.toml index fb87e6aa..92580641 100644 --- a/chezmoi/.chezmoidata/packages-system.toml +++ b/chezmoi/.chezmoidata/packages/system/homebrew.toml @@ -159,7 +159,7 @@ # "git-lfs", "glab", # GitLab CLI "lazygit", - # "serie", # cosmetic showing git graph + # "series", # cosmetic showing git graph # "withgraphite/tap/graphite", "worktrunk", @@ -447,7 +447,7 @@ "asciinema", # record your terminal "croc", # File transfer "eget", # Easily install prebuilt binaries from GitHub. - # "gitlogue", # replay your git + # "gitlogue", # replay your git "taproom", # TUI for search homebrew package "mole", # https://github.com/tw93/Mole "presenterm", # Presentation in CLI @@ -480,257 +480,3 @@ "tailspin", ] taps = [] - - [packages.mas] - [packages.mas.common] - apps = [] - - [packages.mas.development] - apps = [] - - [packages.mas.homelab] - apps = [] - - [packages.mas.personal] - apps = [ - # Utility - "1355679052", # Dropover - "6451349778", # Rapidmg - "6474854386", # Launchpallete - "6698876601", # Folder preview - "6532621020", # IP address in menubar - # "6476907452", # Applight (app launcher) - # "1502839586", # Hand mirror - # "1551462255", # Mouseboost - # "497799835", # Velja - # "6444667067", # Hyperduck - # "1604176982", # Onething - # "6743316600", # Subscription Day - #"6746757189", # Corner Time - - # Productivity - # "6739802604", # Folo - "1609960918", # Jomo - "966085870", # Ticktick - # "1666327168", # Spaced - # "6739781207", # Pieoneer - - # Paid / Optional - # "6471482080", # Cursor Teleporter by Apptorium - # "6748582349", # Spatial Dock - - # Entertainment - # "1606145041", # Sleeve - ] - - # APT package manager - - [packages.apt] - to_remove = [] - - [packages.apt.common] - packages = [ - # System Essentials - "apt-transport-https", - "curl", - "dnsutils", - "logrotate", - "nano", - "needrestart", - "net-tools", - "openssh-server", - "p7zip-full", - "sudo", - "tzdata", - "unzip", - "wget", - "xz-utils", - "zsh", - - # CLI Utilities - "bat", # cat with syntax highlighting and Git integration - "figlet", - "eza", - "lolcat", - "mc", # Midnight Commander - "ncdu", # NCurses Disk Usage - - # Git & Version Control - "git", - "git-extras", - - # Security - "gnupg", - "gpg", - ] - - [packages.apt.development] - packages = [ - # Essential build dependencies for VPS development - "build-essential", - "pkg-config", - "libssl-dev", - "fd-find", - "fzf", - "jq", - "ripgrep", - "sd", - "yq", - ] - - [packages.apt.homelab] - packages = ["iperf"] - - [packages.apt.personal] - packages = [ - # Development conveniences - "fd-find", - "fzf", - "jq", - "ripgrep", - "sd", - "yq", - ] - - [packages.pacman] - to_remove = [] - - [packages.pacman.common] - packages = [ - # System Essentials - "1password-cli", - "base-devel", # Equivalent to apt-transport-https and build essentials - "curl", - "logrotate", - "nano", - "net-tools", - "openssh", # Equivalent to openssh-server - "polkit-gnome", # For 1password prompt available - "sudo", - "tzdata", - "unzip", - "wget", - "xz", - "zsh", - - # CLI Utilities - "bat", # cat with syntax highlighting and Git integration - "figlet", - "lolcat", - "mc", # Midnight Commander - "ncdu", # NCurses Disk Usage - - # Git & Version Control - "git", - "git-extras", - - # Security - "gnome-keyring", # For 1password two factor auth - "gnupg", - - # Optional - # "bind-tools", # Equivalent to dnsutils - # "p7zip", # Equivalent to p7zip-full - ] - - [packages.pacman.development] - packages = [ - # Essential build dependencies for VPS development - "openssl", - "pkgconf", - ] - - [packages.pacman.homelab] - packages = ["iperf"] - - [packages.pacman.personal] - packages = [ - # Browser - "brave-bin", - # "google-chrome", - "zen-browser-bin", - - # Utility - "asciinema", # record your terminal - "superfile", # file manager in terminal - - # Media - "spotatui-bin", # Terminal music player - - # Development Tools - "opencode-bin", - "fd", - "fzf", - "jq", - "ripgrep", - "sd", - "skim", # Alternative to fzf fuzzy-finder - "yq", # YAML processor - "appimagelauncher", # for integrating .AppImage - "difftastic", # diff tools - "codespell", # Fix common misspellings in source code and text files - "dpkg", - "entr", # dependency for tmux-autoreload - "eza", - "glow", # Render markdown in CLI - "gum", # Fuzzy finder - "less", - "pastel", # converter color in terminal - "pet-bin", - "pueue", # Task runner and scheduler - "tectonic", - "thefuck", # Fix typos - "tlrc", # TLDR client, alternative tealdeer - "vivid", # Color generator for LS_COLORS env variable - "bottom", - "gitleaks", - "jujutsu", # jujutsu version control - "jjui-bin", # jujutsu tui - "git-delta", # Pager for git - "github-cli", # Github CLI - "glab", # GitLab CLI - "lazygit", - # "serie", - "git-graph", - "fish", - "ghostty", - "sesh-bin", # tmux session manager - "starship", - "tmux", - "tmuxp", # tmux session manager - "helix", # Alternative neovim - "neovim", - "cloudflare-warp-bin", - "docker", - "docker-compose", - "lazydocker", - "tailscale", - "httpie", # HTTP client - "hurl", # runs HTTP requests defined in a simple plain text format. - "usbutils", # check fingerprint info - "fprintd", # fingerprint - "fuse2", # apidog dependency - "localsend", - "lsof", # opencode-bin dependency - "ticktick", - "yubico-piv-tool", - "redis", # Redis CLI - "nix", - "zlib", # for building python - "biome", # JS/TS linter, formatter - "eslint", # JS/TS linter - "prettier", # JS/TS formatter - "ruff", # Python linter - "shellcheck", # bash, sh linter - "shfmt", # bash, sh formatter - "nixfmt", # Nix formatter - "stylua", # Lua formatter - "markdownlint-cli2", # Linter for markdown file - "taplo-cli", # TOML formatter - "yamlfmt", # YAML formatter - "yamllint", # YAML linter - - # Text Editors & IDEs - "datagrip", - "datagrip-jre", # runtime for datagrip can work - ] diff --git a/chezmoi/.chezmoidata/packages/system/mas.toml b/chezmoi/.chezmoidata/packages/system/mas.toml new file mode 100644 index 00000000..00d5c65f --- /dev/null +++ b/chezmoi/.chezmoidata/packages/system/mas.toml @@ -0,0 +1,44 @@ +[packages] + [packages.mas] + [packages.mas.common] + apps = [] + + [packages.mas.development] + apps = [] + + [packages.mas.homelab] + apps = [] + + [packages.mas.personal] + apps = [ + # Utility + "1355679052", # Dropover + "6451349778", # Rapidmg + "6474854386", # Launchpallete + "6698876601", # Folder preview + "6532621020", # IP address in menubar + # "6476907452", # Applight (app launcher) + # "1502839586", # Hand mirror + # "1551462255", # Mouseboost + # "497799835", # Velja + # "6444667067", # Hyperduck + # "1604176982", # Onething + # "6743316600", # Subscription Day + #"6746757189", # Corner Time + + # Productivity + # "6739802604", # Folo + "1609960918", # Jomo + "966085870", # Ticktick + # "1666327168", # Spaced + # "6739781207", # Pieoneer + + # Paid / Optional + # "6471482080", # Cursor Teleporter by Apptorium + # "6748582349", # Spatial Dock + + # Entertainment + # "1606145041", # Sleeve + ] + + # APT package manager diff --git a/chezmoi/.chezmoidata/packages/system/pacman.toml b/chezmoi/.chezmoidata/packages/system/pacman.toml new file mode 100644 index 00000000..1232c78a --- /dev/null +++ b/chezmoi/.chezmoidata/packages/system/pacman.toml @@ -0,0 +1,143 @@ +[packages] + [packages.pacman] + to_remove = [] + + [packages.pacman.common] + packages = [ + # System Essentials + "1password-cli", + "base-devel", # Equivalent to apt-transport-https and build essentials + "curl", + "logrotate", + "nano", + "net-tools", + "openssh", # Equivalent to openssh-server + "polkit-gnome", # For 1password prompt available + "sudo", + "tzdata", + "unzip", + "wget", + "xz", + "zsh", + + # CLI Utilities + "bat", # cat with syntax highlighting and Git integration + "figlet", + "lolcat", + "mc", # Midnight Commander + "ncdu", # NCurses Disk Usage + + # Git & Version Control + "git", + "git-extras", + + # Security + "gnome-keyring", # For 1password two factor auth + "gnupg", + + # Optional + # "bind-tools", # Equivalent to dnsutils + # "p7zip", # Equivalent to p7zip-full + ] + + [packages.pacman.development] + packages = [ + # Essential build dependencies for VPS development + "openssl", + "pkgconf", + ] + + [packages.pacman.homelab] + packages = ["iperf"] + + [packages.pacman.personal] + packages = [ + # Browser + "brave-bin", + # "google-chrome", + "zen-browser-bin", + + # Utility + "asciinema", # record your terminal + "superfile", # file manager in terminal + + # Media + "spotatui-bin", # Terminal music player + + # Development Tools + "opencode-bin", + "fd", + "fzf", + "jq", + "ripgrep", + "sd", + "skim", # Alternative to fzf fuzzy-finder + "yq", # YAML processor + "appimagelauncher", # for integrating .AppImage + "difftastic", # diff tools + "codespell", # Fix common misspellings in source code and text files + "dpkg", + "entr", # dependency for tmux-autoreload + "eza", + "glow", # Render markdown in CLI + "gum", # Fuzzy finder + "less", + "pastel", # converter color in terminal + "pet-bin", + "pueue", # Task runner and scheduler + "tectonic", + "thefuck", # Fix typos + "tlrc", # TLDR client, alternative tealdeer + "vivid", # Color generator for LS_COLORS env variable + "bottom", + "gitleaks", + "jujutsu", # jujutsu version control + "jjui-bin", # jujutsu tui + "git-delta", # Pager for git + "github-cli", # Github CLI + "glab", # GitLab CLI + "lazygit", + # "series", + "git-graph", + "fish", + "ghostty", + "sesh-bin", # tmux session manager + "starship", + "tmux", + "tmuxp", # tmux session manager + "helix", # Alternative neovim + "neovim", + "cloudflare-warp-bin", + "docker", + "docker-compose", + "lazydocker", + "tailscale", + "httpie", # HTTP client + "hurl", # runs HTTP requests defined in a simple plain text format. + "usbutils", # check fingerprint info + "fprintd", # fingerprint + "fuse2", # apidog dependency + "localsend", + "lsof", # opencode-bin dependency + "ticktick", + "yubico-piv-tool", + "redis", # Redis CLI + "nix", + "zlib", # for building python + "biome", # JS/TS linter, formatter + "eslint", # JS/TS linter + "prettier", # JS/TS formatter + "ruff", # Python linter + "shellcheck", # bash, sh linter + "shfmt", # bash, sh formatter + "nixfmt", # Nix formatter + "stylua", # Lua formatter + "markdownlint-cli2", # Linter for markdown file + "taplo-cli", # TOML formatter + "yamlfmt", # YAML formatter + "yamllint", # YAML linter + + # Text Editors & IDEs + "datagrip", + "datagrip-jre", # runtime for datagrip can work + ] diff --git a/chezmoi/.chezmoidata/remote_servers.toml b/chezmoi/.chezmoidata/ssh-hosts.toml similarity index 100% rename from chezmoi/.chezmoidata/remote_servers.toml rename to chezmoi/.chezmoidata/ssh-hosts.toml diff --git a/chezmoi/dot_config/fish/completions/sbx.fish b/chezmoi/dot_config/fish/completions/sbx.fish new file mode 100644 index 00000000..8f29d012 --- /dev/null +++ b/chezmoi/dot_config/fish/completions/sbx.fish @@ -0,0 +1,235 @@ +# fish completion for sbx -*- shell-script -*- + +function __sbx_debug + set -l file "$BASH_COMP_DEBUG_FILE" + if test -n "$file" + echo "$argv" >> $file + end +end + +function __sbx_perform_completion + __sbx_debug "Starting __sbx_perform_completion" + + # Extract all args except the last one + set -l args (commandline -opc) + # Extract the last arg and escape it in case it is a space + set -l lastArg (string escape -- (commandline -ct)) + + __sbx_debug "args: $args" + __sbx_debug "last arg: $lastArg" + + # Disable ActiveHelp which is not supported for fish shell + set -l requestComp "SBX_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" + + __sbx_debug "Calling $requestComp" + set -l results (eval $requestComp 2> /dev/null) + + # Some programs may output extra empty lines after the directive. + # Let's ignore them or else it will break completion. + # Ref: https://github.com/spf13/cobra/issues/1279 + for line in $results[-1..1] + if test (string trim -- $line) = "" + # Found an empty line, remove it + set results $results[1..-2] + else + # Found non-empty line, we have our proper output + break + end + end + + set -l comps $results[1..-2] + set -l directiveLine $results[-1] + + # For Fish, when completing a flag with an = (e.g., -n=) + # completions must be prefixed with the flag + set -l flagPrefix (string match -r -- '-.*=' "$lastArg") + + __sbx_debug "Comps: $comps" + __sbx_debug "DirectiveLine: $directiveLine" + __sbx_debug "flagPrefix: $flagPrefix" + + for comp in $comps + printf "%s%s\n" "$flagPrefix" "$comp" + end + + printf "%s\n" "$directiveLine" +end + +# this function limits calls to __sbx_perform_completion, by caching the result behind $__sbx_perform_completion_once_result +function __sbx_perform_completion_once + __sbx_debug "Starting __sbx_perform_completion_once" + + if test -n "$__sbx_perform_completion_once_result" + __sbx_debug "Seems like a valid result already exists, skipping __sbx_perform_completion" + return 0 + end + + set --global __sbx_perform_completion_once_result (__sbx_perform_completion) + if test -z "$__sbx_perform_completion_once_result" + __sbx_debug "No completions, probably due to a failure" + return 1 + end + + __sbx_debug "Performed completions and set __sbx_perform_completion_once_result" + return 0 +end + +# this function is used to clear the $__sbx_perform_completion_once_result variable after completions are run +function __sbx_clear_perform_completion_once_result + __sbx_debug "" + __sbx_debug "========= clearing previously set __sbx_perform_completion_once_result variable ==========" + set --erase __sbx_perform_completion_once_result + __sbx_debug "Successfully erased the variable __sbx_perform_completion_once_result" +end + +function __sbx_requires_order_preservation + __sbx_debug "" + __sbx_debug "========= checking if order preservation is required ==========" + + __sbx_perform_completion_once + if test -z "$__sbx_perform_completion_once_result" + __sbx_debug "Error determining if order preservation is required" + return 1 + end + + set -l directive (string sub --start 2 $__sbx_perform_completion_once_result[-1]) + __sbx_debug "Directive is: $directive" + + set -l shellCompDirectiveKeepOrder 32 + set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) + __sbx_debug "Keeporder is: $keeporder" + + if test $keeporder -ne 0 + __sbx_debug "This does require order preservation" + return 0 + end + + __sbx_debug "This doesn't require order preservation" + return 1 +end + + +# This function does two things: +# - Obtain the completions and store them in the global __sbx_comp_results +# - Return false if file completion should be performed +function __sbx_prepare_completions + __sbx_debug "" + __sbx_debug "========= starting completion logic ==========" + + # Start fresh + set --erase __sbx_comp_results + + __sbx_perform_completion_once + __sbx_debug "Completion results: $__sbx_perform_completion_once_result" + + if test -z "$__sbx_perform_completion_once_result" + __sbx_debug "No completion, probably due to a failure" + # Might as well do file completion, in case it helps + return 1 + end + + set -l directive (string sub --start 2 $__sbx_perform_completion_once_result[-1]) + set --global __sbx_comp_results $__sbx_perform_completion_once_result[1..-2] + + __sbx_debug "Completions are: $__sbx_comp_results" + __sbx_debug "Directive is: $directive" + + set -l shellCompDirectiveError 1 + set -l shellCompDirectiveNoSpace 2 + set -l shellCompDirectiveNoFileComp 4 + set -l shellCompDirectiveFilterFileExt 8 + set -l shellCompDirectiveFilterDirs 16 + + if test -z "$directive" + set directive 0 + end + + set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) + if test $compErr -eq 1 + __sbx_debug "Received error directive: aborting." + # Might as well do file completion, in case it helps + return 1 + end + + set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) + set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) + if test $filefilter -eq 1; or test $dirfilter -eq 1 + __sbx_debug "File extension filtering or directory filtering not supported" + # Do full file completion instead + return 1 + end + + set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) + set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) + + __sbx_debug "nospace: $nospace, nofiles: $nofiles" + + # If we want to prevent a space, or if file completion is NOT disabled, + # we need to count the number of valid completions. + # To do so, we will filter on prefix as the completions we have received + # may not already be filtered so as to allow fish to match on different + # criteria than the prefix. + if test $nospace -ne 0; or test $nofiles -eq 0 + set -l prefix (commandline -t | string escape --style=regex) + __sbx_debug "prefix: $prefix" + + set -l completions (string match -r -- "^$prefix.*" $__sbx_comp_results) + set --global __sbx_comp_results $completions + __sbx_debug "Filtered completions are: $__sbx_comp_results" + + # Important not to quote the variable for count to work + set -l numComps (count $__sbx_comp_results) + __sbx_debug "numComps: $numComps" + + if test $numComps -eq 1; and test $nospace -ne 0 + # We must first split on \t to get rid of the descriptions to be + # able to check what the actual completion will be. + # We don't need descriptions anyway since there is only a single + # real completion which the shell will expand immediately. + set -l split (string split --max 1 \t $__sbx_comp_results[1]) + + # Fish won't add a space if the completion ends with any + # of the following characters: @=/:., + set -l lastChar (string sub -s -1 -- $split) + if not string match -r -q "[@=/:.,]" -- "$lastChar" + # In other cases, to support the "nospace" directive we trick the shell + # by outputting an extra, longer completion. + __sbx_debug "Adding second completion to perform nospace directive" + set --global __sbx_comp_results $split[1] $split[1]. + __sbx_debug "Completions are now: $__sbx_comp_results" + end + end + + if test $numComps -eq 0; and test $nofiles -eq 0 + # To be consistent with bash and zsh, we only trigger file + # completion when there are no other completions + __sbx_debug "Requesting file completion" + return 1 + end + end + + return 0 +end + +# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves +# so we can properly delete any completions provided by another script. +# Only do this if the program can be found, or else fish may print some errors; besides, +# the existing completions will only be loaded if the program can be found. +if type -q "sbx" + # The space after the program name is essential to trigger completion for the program + # and not completion of the program name itself. + # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. + complete --do-complete "sbx " > /dev/null 2>&1 +end + +# Remove any pre-existing completions for the program since we will be handling all of them. +complete -c sbx -e + +# this will get called after the two calls below and clear the $__sbx_perform_completion_once_result global +complete -c sbx -n '__sbx_clear_perform_completion_once_result' +# The call to __sbx_prepare_completions will setup __sbx_comp_results +# which provides the program's completion choices. +# If this doesn't require order preservation, we don't use the -k flag +complete -c sbx -n 'not __sbx_requires_order_preservation && __sbx_prepare_completions' -f -a '$__sbx_comp_results' +# otherwise we use the -k flag +complete -k -c sbx -n '__sbx_requires_order_preservation && __sbx_prepare_completions' -f -a '$__sbx_comp_results' diff --git a/chezmoi/dot_config/rift/config.toml b/chezmoi/dot_config/rift/config.toml index 159e0ea7..57b2cd45 100644 --- a/chezmoi/dot_config/rift/config.toml +++ b/chezmoi/dot_config/rift/config.toml @@ -453,7 +453,5 @@ "open -a \"/Applications/Ghostty.app/\"", ] } - "Alt + Shift + D" = "debug" # prints layout tree - "Alt + Ctrl + Q" = "save_and_exit" "Alt + Ctrl + S" = "serialize" diff --git a/chezmoi/dot_config/zsh/completions/_sbx b/chezmoi/dot_config/zsh/completions/_sbx new file mode 100644 index 00000000..bef5717d --- /dev/null +++ b/chezmoi/dot_config/zsh/completions/_sbx @@ -0,0 +1,212 @@ +#compdef sbx +compdef _sbx sbx + +# zsh completion for sbx -*- shell-script -*- + +__sbx_debug() +{ + local file="$BASH_COMP_DEBUG_FILE" + if [[ -n ${file} ]]; then + echo "$*" >> "${file}" + fi +} + +_sbx() +{ + local shellCompDirectiveError=1 + local shellCompDirectiveNoSpace=2 + local shellCompDirectiveNoFileComp=4 + local shellCompDirectiveFilterFileExt=8 + local shellCompDirectiveFilterDirs=16 + local shellCompDirectiveKeepOrder=32 + + local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder + local -a completions + + __sbx_debug "\n========= starting completion logic ==========" + __sbx_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" + + # The user could have moved the cursor backwards on the command-line. + # We need to trigger completion from the $CURRENT location, so we need + # to truncate the command-line ($words) up to the $CURRENT location. + # (We cannot use $CURSOR as its value does not work when a command is an alias.) + words=("${=words[1,CURRENT]}") + __sbx_debug "Truncated words[*]: ${words[*]}," + + lastParam=${words[-1]} + lastChar=${lastParam[-1]} + __sbx_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" + + # For zsh, when completing a flag with an = (e.g., sbx -n=) + # completions must be prefixed with the flag + setopt local_options BASH_REMATCH + if [[ "${lastParam}" =~ '-.*=' ]]; then + # We are dealing with a flag with an = + flagPrefix="-P ${BASH_REMATCH}" + fi + + # Prepare the command to obtain completions + requestComp="${words[1]} __complete ${words[2,-1]}" + if [ "${lastChar}" = "" ]; then + # If the last parameter is complete (there is a space following it) + # We add an extra empty parameter so we can indicate this to the go completion code. + __sbx_debug "Adding extra empty parameter" + requestComp="${requestComp} \"\"" + fi + + __sbx_debug "About to call: eval ${requestComp}" + + # Use eval to handle any environment variables and such + out=$(eval ${requestComp} 2>/dev/null) + __sbx_debug "completion output: ${out}" + + # Extract the directive integer following a : from the last line + local lastLine + while IFS='\n' read -r line; do + lastLine=${line} + done < <(printf "%s\n" "${out[@]}") + __sbx_debug "last line: ${lastLine}" + + if [ "${lastLine[1]}" = : ]; then + directive=${lastLine[2,-1]} + # Remove the directive including the : and the newline + local suffix + (( suffix=${#lastLine}+2)) + out=${out[1,-$suffix]} + else + # There is no directive specified. Leave $out as is. + __sbx_debug "No directive found. Setting do default" + directive=0 + fi + + __sbx_debug "directive: ${directive}" + __sbx_debug "completions: ${out}" + __sbx_debug "flagPrefix: ${flagPrefix}" + + if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then + __sbx_debug "Completion received error. Ignoring completions." + return + fi + + local activeHelpMarker="_activeHelp_ " + local endIndex=${#activeHelpMarker} + local startIndex=$((${#activeHelpMarker}+1)) + local hasActiveHelp=0 + while IFS='\n' read -r comp; do + # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker) + if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then + __sbx_debug "ActiveHelp found: $comp" + comp="${comp[$startIndex,-1]}" + if [ -n "$comp" ]; then + compadd -x "${comp}" + __sbx_debug "ActiveHelp will need delimiter" + hasActiveHelp=1 + fi + + continue + fi + + if [ -n "$comp" ]; then + # If requested, completions are returned with a description. + # The description is preceded by a TAB character. + # For zsh's _describe, we need to use a : instead of a TAB. + # We first need to escape any : as part of the completion itself. + comp=${comp//:/\\:} + + local tab="$(printf '\t')" + comp=${comp//$tab/:} + + __sbx_debug "Adding completion: ${comp}" + completions+=${comp} + lastComp=$comp + fi + done < <(printf "%s\n" "${out[@]}") + + # Add a delimiter after the activeHelp statements, but only if: + # - there are completions following the activeHelp statements, or + # - file completion will be performed (so there will be choices after the activeHelp) + if [ $hasActiveHelp -eq 1 ]; then + if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then + __sbx_debug "Adding activeHelp delimiter" + compadd -x "--" + hasActiveHelp=0 + fi + fi + + if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then + __sbx_debug "Activating nospace." + noSpace="-S ''" + fi + + if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then + __sbx_debug "Activating keep order." + keepOrder="-V" + fi + + if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then + # File extension filtering + local filteringCmd + filteringCmd='_files' + for filter in ${completions[@]}; do + if [ ${filter[1]} != '*' ]; then + # zsh requires a glob pattern to do file filtering + filter="\*.$filter" + fi + filteringCmd+=" -g $filter" + done + filteringCmd+=" ${flagPrefix}" + + __sbx_debug "File filtering command: $filteringCmd" + _arguments '*:filename:'"$filteringCmd" + elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then + # File completion for directories only + local subdir + subdir="${completions[1]}" + if [ -n "$subdir" ]; then + __sbx_debug "Listing directories in $subdir" + pushd "${subdir}" >/dev/null 2>&1 + else + __sbx_debug "Listing directories in ." + fi + + local result + _arguments '*:dirname:_files -/'" ${flagPrefix}" + result=$? + if [ -n "$subdir" ]; then + popd >/dev/null 2>&1 + fi + return $result + else + __sbx_debug "Calling _describe" + if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then + __sbx_debug "_describe found some completions" + + # Return the success of having called _describe + return 0 + else + __sbx_debug "_describe did not find completions." + __sbx_debug "Checking if we should do file completion." + if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then + __sbx_debug "deactivating file completion" + + # We must return an error code here to let zsh know that there were no + # completions found by _describe; this is what will trigger other + # matching algorithms to attempt to find completions. + # For example zsh can match letters in the middle of words. + return 1 + else + # Perform file completion + __sbx_debug "Activating file completion" + + # We must return the result of this command, so it must be the + # last command, or else we must store its result to return it. + _arguments '*:filename:_files'" ${flagPrefix}" + fi + fi + fi +} + +# don't run the completion function when being source-ed or eval-ed +if [ "$funcstack[1]" = "_sbx" ]; then + _sbx +fi diff --git a/chezmoi/encrypted_dot_sbxenv.yaml.age b/chezmoi/encrypted_dot_sbxenv.yaml.age index 62f18536..1e48778c 100644 --- a/chezmoi/encrypted_dot_sbxenv.yaml.age +++ b/chezmoi/encrypted_dot_sbxenv.yaml.age @@ -1,15 +1,15 @@ -----BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAveGwxTDkya3ZxcHFtYUFv -RFlrU2lSRUZoNFRyV1NwL3VubGJxY2ZTcW0wCndQWFhvRmJVdGhFSmtoTm1hRGVt -ckY3MGVXTUFSODZhczhaVUpXeEFUNGsKLS0tIGpSQlNwOGlIUU96SEdRVmVWbmk0 -V1hIVTFpVC9rU2pidEFUVCtLRTBrWDQKb3ik4C2dDUbg4zQvz68Yv+83XC46yV2b -7GsUc+jwsWZwoem7B6eTjrC07Zn6NDcFmHxW+nHKa/ujIV3Kp0FsPdhXm0zABJQL -bYl/4DwnbjptOOgL0IpxWssifeQEc229LOawXzV2JkoqCKWlBxvF/Y6sa8blBEmh -J4mtbC9ey8s/Dt4+dERaNiF98RThTC9P9VuJFx7rMapsm909BOFZ9H3y2ol5mk3c -mC+lYmq8KTQnZyET/kB61PfmNLML+5CY5awViPYajp/+6Hhiav94BDIWQ5Qawb2u -IoLQjg9rhYai6sYdOHqH5z7bruykkBwQHA6qJQ31guhHNnAMtFbDDw9abJ6fNFdb -vqOm/brGRcGrcmpWEPkcNg+4nPki3VzcYQtWHPFDPqrSgM+o9J4jnQu2EQSeT4LW -9KIu3KNaTHTAFZqozFLq/c/eUpc6yA46sx846xJ/rLfk0f4kzQLGztWlleDP5/CL -P4D6AkxzXfHr+p9NgtiVhN7fi2duBcgiKAGmThwGXqg8jNwpcxFXwBwhtKt8Oedd -PakQv4cnu5I5Lr/Q/kiZa5P2dJJTkcA7Y4+WwpuD4rjLVg== +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzNys5cUZBYVdNSG8xSWxG +QjdMd2VBdzJ3RmhNRmN5dStYVXh2UVVVeWgwCkFZTHE3UGtobXUwSEpSSmh2bVlx +YXo5NnFFc240TUhZWWdnZnhydnlkQk0KLS0tIG8yTzl5R0hybVltaW9Fa0FEK1lu +bm5wbmxEK0tFVmhnQkpxbWNNWEUxbW8K34umTyqY/6C9PgmtgOG2yv/ME8Ycn6Hi +y2kEpwES+hX/Sm+LyN9rS19HIQo/26roz4c3DYkCUazPYWtCbE6XbURZSktsINZi +G19U46AWIRtGmvRWqD8NIO/5zWBcehbfRxIr/qnC4cjHq0tdg/mPy/G3Q3xC7IZ9 +m/FlW8/0t7ijtDkPH701DAtsEPkaNzvg7cL4y+6XJYbvqtu9unTQDGkQp2I/pK4H +0P6bN2aPlyfCuE8QxmKMN0dbYu/UC/vBKVdjN5gsbsElLvU0Ked6fdcJPuQkoetB +wIZRfarH/11h4S8eMV6rcivMpJiFZWk85+lDSqVdl+mFuLd6aPjWNJ5jTNAkJBJK +tl1RM2aakbaSrxFcRMNUAjXOyYi5wAXr4jSUE1niT5VXbRrZjvaQNs7xU89qEDzJ +ZzNy9eirh9unYTvsMO3YrtJ8WpQDjMT0grYO3oAcyBUo8fJO+71XwFfD7eYNCGK/ +vwpg4ospsWUZjhh1KWXHJvIB0S0kWY5hE1Bhm4Ergca61QEF8bE0s4iiaH7HPkV1 +FKS2Ug== -----END AGE ENCRYPTED FILE----- diff --git a/docs/01-shell-scripting-chezmoi.md b/docs/01-shell-scripting-chezmoi.md index 0843d5c1..46c61bc9 100644 --- a/docs/01-shell-scripting-chezmoi.md +++ b/docs/01-shell-scripting-chezmoi.md @@ -59,15 +59,15 @@ being installed as files themselves. | File | Purpose | | --- | --- | | `accounts.toml` | Identity profiles containing Git author and GitHub account settings. | -| `binaries.toml` | Metadata for standalone binaries downloaded from GitHub releases. | -| `constants.toml` | Shared directory constants such as repository, SSH-key, and user-bin paths. | -| `diff-name-apps.toml` | Homebrew cask-to-application-name mappings used when checking existing macOS apps. | -| `imperative-cli-tools.toml` | Checks and commands for CLI plugins or extensions that need imperative installation. | -| `macos-external-apps.toml` | macOS application download records consumed by the external-app template. | +| `cli-tool-setup.toml` | Checks and commands for CLI plugins or extensions that need imperative installation. | +| `directories.toml` | Shared directory constants such as repository, SSH-key, and user-bin paths. | +| `apps/cask-app-names.toml` | Homebrew cask-to-application-name mappings used when checking existing macOS apps. | +| `apps/macos-external-apps.toml` | macOS application download records consumed by the external-app template. | | `onepassword.toml` | 1Password item references and document values used by secret-aware templates. | -| `packages-language.toml` | Python, Node, Cargo, and runtime package declarations. | -| `packages-system.toml` | Homebrew, Mac App Store, APT, and Pacman/`paru` package declarations. | -| `remote_servers.toml` | Remote host, SSH, key-generation, and 1Password item settings. | +| `packages/github-binaries.toml` | Metadata for standalone binaries downloaded from GitHub releases. | +| `packages/languages.toml` | Python, Node, Cargo, and runtime package declarations. | +| `packages/system/{apt,homebrew,mas,pacman}.toml` | System package declarations separated by package manager. | +| `ssh-hosts.toml` | Remote host, SSH, key-generation, and 1Password item settings. | | `shell_env.toml` | XDG paths, Homebrew paths, common environment variables, and PATH entries. | The generated machine configuration from `.chezmoi.toml.tmpl` adds values such diff --git a/docs/02-packages-installation-flow.md b/docs/02-packages-installation-flow.md index 7f7cfaa8..356de80d 100644 --- a/docs/02-packages-installation-flow.md +++ b/docs/02-packages-installation-flow.md @@ -20,7 +20,9 @@ different package manager implicitly. ## Package definitions Package declarations live in -[`.chezmoidata/packages-system.toml`](../chezmoi/.chezmoidata/packages-system.toml). +the manager-specific files under +[`.chezmoidata/packages/system/`](../chezmoi/.chezmoidata/packages/system/): +`homebrew.toml`, `mas.toml`, `apt.toml`, and `pacman.toml`. Each supported package manager has these feature groups where applicable: - `common`: always installed; @@ -147,7 +149,8 @@ For each package, it: ## Applying package changes -After changing [`packages-system.toml`](../chezmoi/.chezmoidata/packages-system.toml), +After changing a manager-specific file under +[`packages/system/`](../chezmoi/.chezmoidata/packages/system/), inspect the rendered result before applying it to a real machine: ```bash diff --git a/docs/04-remote-server-flow.md b/docs/04-remote-server-flow.md index 49707cf9..8db34627 100644 --- a/docs/04-remote-server-flow.md +++ b/docs/04-remote-server-flow.md @@ -60,7 +60,7 @@ After creating the item, manually fill in the following fields in 1Password: ### Step 3: Add Server Configuration Add your remote server configuration to -`./chezmoi/.chezmoidata/remote_servers.toml`. The file holds four tables +`./chezmoi/.chezmoidata/ssh-hosts.toml`. The file holds four tables — one per role — so workstation, development, deployment, and git-host entries stay separated: diff --git a/docs/06-cli-integrations.md b/docs/06-cli-integrations.md index 5136d28d..81ba7b48 100644 --- a/docs/06-cli-integrations.md +++ b/docs/06-cli-integrations.md @@ -134,7 +134,7 @@ ## Integration -- `chezmoi/.chezmoidata/packages-language.toml`: Declares the language runtimes +- `chezmoi/.chezmoidata/packages/languages.toml`: Declares the language runtimes and versions managed by Proto. - `chezmoi/.chezmoitemplates/scripts/language/runtimes.bash`: Installs Proto on demand and pins the configured runtimes globally. diff --git a/docs/superpowers/plans/2026-10-16-che-18-chezmoidata-reorganization.md b/docs/superpowers/plans/2026-10-16-che-18-chezmoidata-reorganization.md new file mode 100644 index 00000000..5cada5f3 --- /dev/null +++ b/docs/superpowers/plans/2026-10-16-che-18-chezmoidata-reorganization.md @@ -0,0 +1,53 @@ +# CHE-18 `.chezmoidata` Reorganization Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Reorganize `.chezmoidata` into the agreed subfolders and filenames while keeping rendered data and script behavior unchanged. + +**Architecture:** Keep the TOML tables and keys intact, moving each whole data table into its new file. Split the system package table at package-manager boundaries, then update repository references and test the rendered data and scripts. + +**Tech Stack:** TOML, chezmoi, Bash render test, `jq`. + +**Spec:** Linear issue [CHE-18](https://linear.app/dotfiles-workspace/issue/CHE-18/reorganize-chezmoidata-and-chezmoiscripts-into-subfolders). + +## Global Constraints + +- Keep template data keys/table names unchanged. +- Keep each array wholly in one TOML file; arrays are replaced, not concatenated. +- Keep `.chezmoiscripts/` flat; grouping is optional and no clear navigation gain was found. +- Preserve the current `chezmoi data` output and generated script behavior. +- Update references in the docs and tests when paths change. + +## Review Focus + +- Nested TOML files are still loaded recursively — pin with the new-path assertions and successful `chezmoi data` invocation. +- Package-manager arrays/tables survive the split — pin with the before/after normalized `chezmoi data` comparison and render-script test. +- No stale filenames remain in documentation or tests — pin with a repository search for the old paths. +- Existing `.chezmoiscripts` attributes and behavior stay intact — scripts remain unmoved; verify their paths are unchanged and render test passes. +- Account/secret data remains intact — these files keep their paths; verify the normalized data comparison. + +--- + +### Task 1: Reorganize chezmoi data and update references + +**Files:** +- Move/rename `chezmoi/.chezmoidata/constants.toml` to `directories.toml`. +- Move/rename `binaries.toml` to `packages/github-binaries.toml`. +- Move/rename `packages-language.toml` to `packages/languages.toml`. +- Move/rename `imperative-cli-tools.toml` to `cli-tool-setup.toml`. +- Move/rename `remote_servers.toml` to `ssh-hosts.toml`. +- Move `diff-name-apps.toml` to `apps/cask-app-names.toml` and `macos-external-apps.toml` to `apps/macos-external-apps.toml`. +- Split `packages-system.toml` into `packages/system/{apt,homebrew,mas,pacman}.toml`, preserving each manager's complete tables and arrays. +- Keep `accounts.toml`, `onepassword.toml`, and `shell_env.toml` unchanged. +- Modify `tests/chezmoi-render-scripts.sh`, `docs/01-shell-scripting-chezmoi.md`, `docs/02-packages-installation-flow.md`, `docs/04-remote-server-flow.md`, and `docs/06-cli-integrations.md`. + +**Interfaces:** +- Consumes: CHE-18's approved layout and the current TOML data tables. +- Produces: The same merged chezmoi data keys, loaded from the new paths. + +- [ ] **Step 1: Write the failing layout assertions** in `tests/chezmoi-render-scripts.sh` for the new paths and absence of the old paths; set the Ubuntu fixture's personal feature to `true` so its existing `cargo-binstall` assertion matches the data table it is meant to exercise; correct the existing Herdr assertion to match the enabled CLI entries rendered by the template. +- [ ] **Step 2: Run `./tests/chezmoi-render-scripts.sh` and verify it fails on a missing new path.** +- [ ] **Step 3: Move the files and split `packages-system.toml` by package manager**, without changing table names or array contents. +- [ ] **Step 4: Update the documentation paths and descriptions** to reflect the final layout. +- [ ] **Step 5: Verify behavior.** Compare normalized `chezmoi -S chezmoi data` output against the pre-migration capture; run `./tests/chezmoi-render-scripts.sh`; search for stale old paths. +- [ ] **Step 6: Commit the verified migration** as `refactor: reorganize chezmoi data`. diff --git a/tests/chezmoi-render-scripts.sh b/tests/chezmoi-render-scripts.sh index d18685c7..c08869bb 100755 --- a/tests/chezmoi-render-scripts.sh +++ b/tests/chezmoi-render-scripts.sh @@ -123,10 +123,20 @@ done base_data_file="$tmp_dir/base.json" chezmoi -S "$source_dir" data >"$base_data_file" -[[ -f "$source_dir/.chezmoidata/packages-system.toml" ]] || - fail "packages-system.toml is missing" -[[ -f "$source_dir/.chezmoidata/packages-language.toml" ]] || - fail "packages-language.toml is missing" +for data_path in \ + directories.toml packages/github-binaries.toml packages/languages.toml \ + cli-tool-setup.toml ssh-hosts.toml apps/cask-app-names.toml \ + apps/macos-external-apps.toml packages/system/apt.toml \ + packages/system/homebrew.toml packages/system/mas.toml packages/system/pacman.toml; do + [[ -f "$source_dir/.chezmoidata/$data_path" ]] || + fail "new data path is missing: $data_path" +done +for data_path in \ + constants.toml binaries.toml packages-language.toml imperative-cli-tools.toml \ + remote_servers.toml diff-name-apps.toml macos-external-apps.toml packages-system.toml; do + [[ ! -e "$source_dir/.chezmoidata/$data_path" ]] || + fail "legacy data path still exists: $data_path" +done [[ ! -e "$source_dir/.chezmoidata/packages.toml" ]] || fail "legacy packages.toml still exists" @@ -157,7 +167,7 @@ mac_data="$tmp_dir/mac.json" ubuntu_data="$tmp_dir/ubuntu.json" arch_data="$tmp_dir/arch.json" make_profile "$mac_data" darwin darwin arm64 true true false true -make_profile "$ubuntu_data" linux ubuntu amd64 true false false false +make_profile "$ubuntu_data" linux ubuntu amd64 true true false false make_profile "$arch_data" linux arch amd64 true true false true bootstrap_source="$source_dir/.chezmoiscripts/run_once_before_00-bootstrap.sh.tmpl" @@ -322,7 +332,7 @@ done imperative="$tmp_dir/mac-imperative-cli-tools.sh" assert_contains "$imperative" 'already satisfied' assert_contains "$imperative" 'is not installed' -assert_not_contains "$imperative" 'herdr plugin install' +assert_contains "$imperative" 'herdr plugin install' actual_scripts="$tmp_dir/actual-scripts.txt" expected_scripts="$tmp_dir/expected-scripts.txt"