File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -437,16 +437,17 @@ export default class BashServer {
437
437
character : Math . max ( params . position . character - 1 , 0 ) ,
438
438
} ,
439
439
} )
440
+
440
441
this . logRequest ( { request : 'onCompletion' , params, word } )
441
442
442
- if ( word && word . startsWith ( '#' ) ) {
443
+ if ( word ? .startsWith ( '#' ) ) {
443
444
// Inside a comment block
444
445
return [ ]
445
446
}
446
- if ( word && word === '{' ) {
447
+
448
+ if ( word === '{' ) {
447
449
// We should not complete when it is not prefixed by a $.
448
- // This case needs to be here
449
- // because { is a completionProvider triggerCharacter.
450
+ // This case needs to be here as "{" is a completionProvider triggerCharacter.
450
451
return [ ]
451
452
}
452
453
@@ -463,7 +464,7 @@ export default class BashServer {
463
464
}
464
465
465
466
let options : string [ ] = [ ]
466
- if ( word && word . startsWith ( '-' ) ) {
467
+ if ( word ? .startsWith ( '-' ) ) {
467
468
const commandName = this . analyzer . commandNameAtPoint (
468
469
params . textDocument . uri ,
469
470
params . position . line ,
You can’t perform that action at this time.
0 commit comments