Skip to content

Refactor container-shell#1516

Draft
kachick wants to merge 7 commits into
mainfrom
container-shell-bash
Draft

Refactor container-shell#1516
kachick wants to merge 7 commits into
mainfrom
container-shell-bash

Conversation

@kachick

@kachick kachick commented Mar 23, 2026

Copy link
Copy Markdown
Owner
  • Fix ps error in bash when PPID is 0
  • Modularize bash-to-zsh switcher logic
  • Fix misleading comment in bash-zsh-switcher package
  • Remove redundant comments in bash-zsh-switcher package
  • Fix lint errors and improve linter file collection
  • Use array for conditional login option in bash-zsh-switcher
  • Use highly compatible conditional expansion for login option
  • Restore comments and structure bash-zsh-switcher as a function

kachick added 7 commits March 23, 2026 21:01
- Extract logic to pkgs/local/bash-zsh-switcher
- Use replaceVars to inject Nix paths into the shell script
- Simplify home-manager/bash.nix by reading the generated script
- This improves maintainability and allows for easier testing/shellchecking

Assisted-by: Gemini CLI <gemini-cli@google.com>
- Fix SC2086 in bash-zsh-switcher.bash (quote $LOGIN_OPTION)
- Improve internal/fileutils/walker.go to exclude directories from bash/nix file lists
- Apply treefmt formatting

Assisted-by: Gemini CLI <gemini-cli@google.com>
This replaces bash arrays with ${VAR+"$VAR"} to ensure compatibility
with older Bash versions (like 3.2 on Darwin) and satisfies shellcheck.

Assisted-by: Gemini CLI <gemini-cli@google.com>
- Restore optimization and cross-platform compatibility comments
- Wrap logic in a function and call it explicitly in bash.nix
- Clean up the function after execution with unset -f
- This maintains high visibility and portability

Assisted-by: Gemini CLI <gemini-cli@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant