diff --git a/.agents/skills/add_installer/SKILL.md b/.agents/skills/add_installer/SKILL.md index 885d9b8..0e2e029 100644 --- a/.agents/skills/add_installer/SKILL.md +++ b/.agents/skills/add_installer/SKILL.md @@ -178,7 +178,7 @@ These are pre-loaded by `bootstrap.sh` — no need to source them manually in in | Function | Description | |---|---| -| `get_shell_configs` | Space-separated list of existing RC files (`~/.bashrc`, `~/.zshrc`) | +| `get_shell_configs` | Space-separated list of existing RC files (`~/.bashrc`) | | `inject_block ` | Idempotently inject a named block into a config file (removes old block first) | | `remove_block ` | Remove a named block from a config file | | `add_alias_if_missing ` | Add an alias line if not already present | diff --git a/VERSION b/VERSION index 6d7de6e..21e8796 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.2 +1.0.3 diff --git a/bootstrap.sh b/bootstrap.sh index 38add20..7b3a666 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -81,7 +81,6 @@ fi install_bootstrap() { local target_files=() [ -f "$HOME/.bashrc" ] && target_files+=("$HOME/.bashrc") - [ -f "$HOME/.zshrc" ] && target_files+=("$HOME/.zshrc") local routes_dir="$HOME/.config/bootstrap" mkdir -p "$routes_dir" @@ -208,11 +207,7 @@ if [ "$is_sourced" = false ]; then echo log_success "Bootstrap CLI installed successfully!" log_info "To start using the 'b' command in this terminal session, run:" - if [ -f "$HOME/.zshrc" ]; then - echo " source ~/.zshrc" - else - echo " source ~/.bashrc" - fi + echo " source ~/.bashrc" else # Sourced mode (e.g., when sourced by installers or manually by user) # Load the b function in the current shell context diff --git a/installers/install_bat.sh b/installers/install_bat.sh index a69f726..0f8f831 100644 --- a/installers/install_bat.sh +++ b/installers/install_bat.sh @@ -149,7 +149,7 @@ main() { echo log_success "Bat installation and configuration complete." - log_info "Please close and reopen your terminal or run: source ~/.bashrc (or source ~/.zshrc) to apply changes." + log_info "Please close and reopen your terminal or run: source ~/.bashrc to apply changes." } main "$@" diff --git a/installers/install_node.sh b/installers/install_node.sh index 6b53b98..4a92371 100644 --- a/installers/install_node.sh +++ b/installers/install_node.sh @@ -149,7 +149,7 @@ main() { log_info "Installed NVM version: $(nvm --version 2>/dev/null || cat "$HOME/.nvm/package.json" | grep '"version":' | head -n1 | sed -E 's/.*"version": "([^"]+)".*/\1/' || echo "unknown")" else log_success "Installation complete." - log_info "Please close and reopen your terminal or run: source ~/.bashrc (or source ~/.zshrc) to verify." + log_info "Please close and reopen your terminal or run: source ~/.bashrc to verify." fi } diff --git a/installers/install_pnpm.sh b/installers/install_pnpm.sh index 104a78c..0f2992e 100644 --- a/installers/install_pnpm.sh +++ b/installers/install_pnpm.sh @@ -238,7 +238,7 @@ main() { log_info "Installed pnpm version: $(pnpm --version 2>/dev/null || echo 'unknown')" else log_success "Installation complete." - log_info "Please close and reopen your terminal or run: source ~/.bashrc (or source ~/.zshrc) to verify." + log_info "Please close and reopen your terminal or run: source ~/.bashrc to verify." fi } diff --git a/installers/install_starship.sh b/installers/install_starship.sh index 1158193..cda8829 100644 --- a/installers/install_starship.sh +++ b/installers/install_starship.sh @@ -102,32 +102,23 @@ configure_shell() { # Add ~/.local/bin to PATH for the current process export PATH="$HOME/.local/bin:$PATH" - IFS=' ' read -ra target_files <<< "$(get_shell_configs)" - - for config_file in "${target_files[@]}"; do - local shell_name="bash" - if [[ "$config_file" == *".zshrc" ]]; then - shell_name="zsh" - fi - + local config_file="$HOME/.bashrc" + if [ -f "$config_file" ]; then # Ensure ~/.local/bin is in PATH for this file if not already present - if [ -f "$config_file" ] && ! grep -q '\.local/bin' "$config_file" 2>/dev/null; then + if ! grep -q '\.local/bin' "$config_file" 2>/dev/null; then log_info "Adding ~/.local/bin to PATH in $config_file..." local path_content='export PATH="$HOME/.local/bin:$PATH"' inject_block "$config_file" "local-bin path" "$path_content" fi log_info "Adding starship initialization to $config_file..." - local content - content="eval \"\$(starship init $shell_name)\"" + local content='eval "$(starship init bash)"' inject_block "$config_file" "starship init" "$content" - # Source if modified (only for bashrc) - if [ "$config_file" = "$HOME/.bashrc" ]; then - . "$config_file" 2>/dev/null || true - fi - done + # Source to apply changes in the current context + . "$config_file" 2>/dev/null || true + fi } main() { diff --git a/installers/install_zoxide.sh b/installers/install_zoxide.sh index 7c111c9..3a8ff1b 100755 --- a/installers/install_zoxide.sh +++ b/installers/install_zoxide.sh @@ -66,14 +66,8 @@ configure_shell() { IFS=' ' read -ra target_files <<< "$(get_shell_configs)" for config_file in "${target_files[@]}"; do - local shell_name="bash" - if [[ "$config_file" == *".zshrc" ]]; then - shell_name="zsh" - fi - log_info "Adding zoxide initialization to $config_file..." - local content - content="eval \"\$(zoxide init --cmd cd $shell_name)\"" + local content="eval \"\$(zoxide init --cmd cd bash)\"" inject_block "$config_file" "zoxide init" "$content" diff --git a/lib/shell_config.sh b/lib/shell_config.sh index 888adee..e3a4876 100644 --- a/lib/shell_config.sh +++ b/lib/shell_config.sh @@ -16,7 +16,6 @@ fi get_shell_configs() { local target_files=() [ -f "$HOME/.bashrc" ] && target_files+=("$HOME/.bashrc") - [ -f "$HOME/.zshrc" ] && target_files+=("$HOME/.zshrc") echo "${target_files[@]}" }