Skip to content

Commit

Permalink
autocomplete: only invoke code if code exists
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Sep 7, 2023
1 parent 203daa2 commit e4df2da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sources/autocomplete.fish
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ end

# Visual Studio Code Terminal Shell Integration
# https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation
if test "$AUTOCOMPLETE_VSCODE" != 'no' -a "$TERM_PROGRAM" = "vscode"
if test "$AUTOCOMPLETE_VSCODE" != 'no' -a "$TERM_PROGRAM" = 'vscode' && command-exists code
. (code --locate-shell-integration-path fish)
end
2 changes: 1 addition & 1 deletion sources/autocomplete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ fi

# Visual Studio Code Terminal Shell Integration
# https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation
if test "${AUTOCOMPLETE_VSCODE-}" != 'no' -a "$TERM_PROGRAM" = "vscode"; then
if test "${AUTOCOMPLETE_VSCODE-}" != 'no' -a "$TERM_PROGRAM" = 'vscode' && command-exists code; then
. "$(code --locate-shell-integration-path "$ACTIVE_POSIX_SHELL")"
fi

0 comments on commit e4df2da

Please sign in to comment.