fix: setup and arty completion bugs

bin/setup:
- Fix Step 1 of 6 → Step 1 of 7
- exec zsh -l </dev/tty to avoid inheriting stale curl pipe on stdin
  (without /dev/tty the curl|sh pipe bytes re-run the script as zsh)
- Fall back to printing exec zsh hint when /dev/tty is unavailable
- Check completion file existence instead of trusting arty exit code

bin/arty:
- Fix cmd_completion returning exit 1 for zsh: last statement was
  [[ "$shell" == "bash" ]] which is false, changed to if/fi

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 16:26:13 +02:00
co-authored by Claude Sonnet 4.6
parent febcd99e35
commit 7f5991c1bd
2 changed files with 12 additions and 6 deletions
+3 -1
View File
@@ -1362,7 +1362,9 @@ cmd_completion() {
echo "$content" > "$dest"
log_success "$shell completion installed: $dest"
[[ "$shell" == "bash" ]] && log_info "Reload: source $dest"
if [[ "$shell" == "bash" ]]; then
log_info "Reload: source $dest"
fi
}
# USAGE AND HELP