Skip to content

Commit 983d6f0

Browse files
committed
Add missing semicolons to BASH to prevent it breaking with eval
The eval method of sourcing hooks strips out newline characters, so all commands need to be terminated with a semicolon. eval $([program] _completion --generate-hook)
1 parent 4a821c7 commit 983d6f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/HookFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ function %%function_name%% {
4646
4747
local cur mail_check_backup;
4848
49-
mail_check_backup=$MAILCHECK
50-
MAILCHECK=-1
49+
mail_check_backup=$MAILCHECK;
50+
MAILCHECK=-1;
5151
5252
_get_comp_words_by_ref -n : cur;
5353
@@ -67,7 +67,7 @@ function %%function_name%% {
6767
6868
__ltrim_colon_completions "$cur";
6969
70-
MAILCHECK=mail_check_backup
70+
MAILCHECK=mail_check_backup;
7171
};
7272
7373
if [ "$(type -t _get_comp_words_by_ref)" == "function" ]; then

0 commit comments

Comments
 (0)