Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
fixup edge cases in bash completion script
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 committed Nov 20, 2023
1 parent 2599875 commit 34094a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/internal/cliApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,7 @@ const handleBuiltInOption = <A>(
self.command,
config,
compgen
).pipe(
Effect.flatMap((completions) =>
Effect.forEach(completions, (word) => Console.log(word), { discard: true })
)
)
).pipe(Effect.flatMap(Effect.forEach((word) => Console.log(word), { discard: true })))
}))
}
case "ShowWizard": {
Expand Down
6 changes: 3 additions & 3 deletions src/internal/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ const createBashCompletionScript = (
|_${rootCommand}_effect_cli_completions() {
| local CMDLINE
| local IFS=$'\\n'
| CMDLINE=(--shell-type bash --shell-completion-index $COMP_CWORD)
| CMDLINE=(--shell-type bash --shell-completion-index "\${COMP_CWORD}")
|
| INDEX=0
| for arg in \${COMP_WORDS[@]}; do
| export COMP_WORD_$INDEX=\${arg}
| for arg in "\${COMP_WORDS[@]}"; do
| export COMP_WORD_$INDEX="\${arg}"
| (( INDEX++ ))
| done
|
Expand Down

0 comments on commit 34094a0

Please sign in to comment.