Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1fc9819

Browse files
author
alexanderwoehler
committed
fix(snippets): add missing "then" to existence checks
1 parent 81125b8 commit 1fc9819

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎server/src/snippets.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,20 @@ export const SNIPPETS: BashCompletionItem[] = [
153153
{
154154
label: 'if-defined',
155155
documentation: 'if with variable existence check',
156-
insertText: ['if [[ -n "${${1:variable}+x}" ]]', '\t${2:command ...}', 'fi'].join(
157-
'\n',
158-
),
156+
insertText: [
157+
'if [[ -n "${${1:variable}+x}" ]]; then',
158+
'\t${2:command ...}',
159+
'fi',
160+
].join('\n'),
159161
},
160162
{
161163
label: 'if-not-defined',
162164
documentation: 'if with variable existence check',
163-
insertText: ['if [[ -z "${${1:variable}+x}" ]]', '\t${2:command ...}', 'fi'].join(
164-
'\n',
165-
),
165+
insertText: [
166+
'if [[ -z "${${1:variable}+x}" ]]; then',
167+
'\t${2:command ...}',
168+
'fi',
169+
].join('\n'),
166170
},
167171
{
168172
label: 'while',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /