|
100 | 100 | # ===================================== |
101 | 101 | # Autocomplete |
102 | 102 |
|
103 | | -# Visual Studio Code Terminal Shell Integration |
104 | | -# https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation |
105 | | -if [ "${TERM_PROGRAM-}" = 'vscode' ] && command -v code >/dev/null 2>&1; then |
106 | | - . "$(code --locate-shell-integration-path "$ACTIVE_POSIX_SHELL")" |
107 | | -fi |
108 | | - |
109 | 103 | if [ "$ACTIVE_POSIX_SHELL" = 'bash' ]; then |
110 | 104 | # enable completions |
111 | 105 | # trunk-ignore(shellcheck/SC3044) |
112 | 106 | shopt -s progcomp |
113 | | - |
114 | | - # load completions |
115 | | - if command -v carapace >/dev/null 2>&1; then |
116 | | - # carapace |
117 | | - # https://carapace-sh.github.io/carapace-bin/setup.html#bash |
118 | | - eval "$(carapace _carapace bash)" |
119 | | - elif command -v is >/dev/null 2>&1; then |
120 | | - # inshellisense |
121 | | - # https://github.com/microsoft/inshellisense#shell-plugin |
122 | | - eval "$(is init bash)" |
123 | | - fi |
124 | | - |
125 | 107 | elif [ "$ACTIVE_POSIX_SHELL" = 'zsh' ]; then |
126 | 108 | # enable completions |
127 | 109 | autoload -Uz compinit # -U load, -z zsh-style |
128 | 110 | compinit |
129 | | - |
130 | | - # load completions |
131 | | - if command -v carapace >/dev/null 2>&1; then |
132 | | - # carapace |
133 | | - # https://carapace-sh.github.io/carapace-bin/setup.html#zsh |
134 | | - # trunk-ignore(shellcheck/SC3003) |
135 | | - zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' |
136 | | - eval "$(carapace _carapace zsh)" |
137 | | - elif command -v is >/dev/null 2>&1; then |
138 | | - # inshellisense |
139 | | - # https://github.com/microsoft/inshellisense#shell-plugin |
140 | | - eval "$(is init zsh)" |
141 | | - fi |
142 | 111 | fi |
143 | 112 |
|
144 | 113 | # ===================================== |
145 | | -# Terminals |
| 114 | +# Integrations |
| 115 | + |
| 116 | +# Visual Studio Code Terminal Shell Integration |
| 117 | +# https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation |
| 118 | +if [ "${TERM_PROGRAM-}" = 'vscode' ] && command -v code >/dev/null 2>&1; then |
| 119 | + . "$(code --locate-shell-integration-path "$ACTIVE_POSIX_SHELL")" |
| 120 | +fi |
146 | 121 |
|
147 | 122 | # Ghostty, it is here, because the title is better here, could be an issue with `oz` |
148 | 123 | # https://ghostty.org/docs/features/shell-integration |
|
0 commit comments