Skip to content

Commit 6aa2bfd

Browse files
authored
Merge pull request #326 from carapace-sh/fix/capture-zsh-cleanup
Fix zsh capture script exit code and redundant compinit
2 parents 70a0817 + 46aa0df commit 6aa2bfd

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • third_party/github.com/Valodim/zsh-capture-completion

third_party/github.com/Valodim/zsh-capture-completion/capture.zsh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ setopt rcquotes
2222
PROMPT=
2323
2424
# load completion system
25+
# carapace-bridge: use dedicated dump path and source user .zshrc for fpath changes
2526
oldfpath="$fpath"
26-
autoload -U compinit && compinit
27-
compinit -d "${CARAPACE_BRIDGE_CONFIG_HOME:-$HOME/.config}/carapace/bridge/zsh/.zcompdump_capture"
28-
source "${CARAPACE_BRIDGE_CONFIG_HOME:-$HOME/.config}/carapace/bridge/zsh/.zshrc"
27+
autoload -U compinit && compinit -d "${CARAPACE_BRIDGE_CONFIG_HOME:-$HOME/.config}/carapace/bridge/zsh/.zcompdump_capture"
28+
source "${CARAPACE_BRIDGE_CONFIG_HOME:-$HOME/.config}/carapace/bridge/zsh/.zshrc"
2929
[[ "$oldfpath" != "$fpath" ]] && compinit # second call to adopt any changes to fpath
3030
3131
@@ -138,4 +138,5 @@ while zpty -r z; do :; done | while IFS= read -r line; do
138138
(( tog )) && echo -E - $line
139139
done
140140

141-
return 2
141+
# carapace-bridge: was `return 2` upstream, which always exited non-zero and broke ActionExecCommand
142+
return 0

0 commit comments

Comments
 (0)