Skip to content

Commit 2e5befc

Browse files
committed
Remove ability to "run all" commands
Too buggy, and not useful enough
1 parent 6043bf4 commit 2e5befc

2 files changed

Lines changed: 2 additions & 32 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $ hdi
1616
▸ Run
1717
npm run dev
1818
19-
↑↓ navigate ⏎ execute c copy a run all q quit
19+
↑↓ navigate ⏎ execute c copy q quit
2020
```
2121

2222
Arrow keys to navigate, Enter to execute, `q` to quit.
@@ -81,7 +81,6 @@ Example: `hdi --raw | pbcopy` to copy commands to clipboard.
8181
| `` `` / `k` `j` | Navigate commands |
8282
| `Enter` | Execute highlighted command |
8383
| `c` | Copy highlighted command to clipboard |
84-
| `a` | Run all commands sequentially |
8584
| `q` / `Esc` | Quit |
8685

8786
## How it works

hdi

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# ↑/↓ k/j Navigate commands
1717
# Enter Execute the highlighted command
1818
# c Copy highlighted command to clipboard
19-
# a Execute all commands sequentially
2019
# q / Esc Quit
2120
#
2221
# Aliases: "install" = "setup" = "i", "run" = "start" = "r", "test" = "t"
@@ -419,7 +418,7 @@ draw_picker() {
419418
if [[ -n "$FLASH_MSG" ]]; then
420419
printf "\n%s %s%s\n" "$DIM" "$FLASH_MSG" "$RESET"
421420
else
422-
printf "\n%s ↑↓ navigate ⏎ execute c copy a run all q quit%s\n" "$DIM" "$RESET"
421+
printf "\n%s ↑↓ navigate ⏎ execute c copy q quit%s\n" "$DIM" "$RESET"
423422
fi
424423
(( count += 2 )) # blank line + footer line
425424

@@ -558,34 +557,6 @@ run_interactive() {
558557
# Draw fresh (PICKER_LINES is 0 so it won't try to erase)
559558
;;
560559

561-
a)
562-
clear_picker
563-
printf '%s' "$SHOW_CURSOR"
564-
stty "$SAVED_TTY" 2>/dev/null
565-
566-
printf "%s%s[hdi] %s — running all commands%s\n\n" "$BOLD" "$YELLOW" "$PROJECT_NAME" "$RESET"
567-
568-
local any_failed=false
569-
for ci in "${CMD_INDICES[@]}"; do
570-
local cmd="${LINE_CMDS[$ci]}"
571-
printf "%s%s❯ %s%s\n" "$BOLD" "$GREEN" "$cmd" "$RESET"
572-
eval "$cmd"
573-
local rc=$?
574-
if (( rc != 0 )); then
575-
printf "%s%s✗ Failed (exit %d) — stopping%s\n\n" "$BOLD" "$YELLOW" "$rc" "$RESET"
576-
any_failed=true
577-
break
578-
fi
579-
echo ""
580-
done
581-
582-
if ! $any_failed; then
583-
printf "%s%s✓ All commands completed%s\n" "$DIM" "$GREEN" "$RESET"
584-
fi
585-
PICKER_LINES=0
586-
return
587-
;;
588-
589560
c)
590561
local cmd="${LINE_CMDS[$selected]}"
591562
if command -v pbcopy >/dev/null 2>&1; then

0 commit comments

Comments
 (0)