File tree 4 files changed +10
-2
lines changed
4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ _hx() {
16
16
COMPREPLY=($( compgen -W " $languages " -- $2 ) )
17
17
;;
18
18
* )
19
- COMPREPLY=($( compgen -fd -W " -h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config" -- $2 ) )
19
+ COMPREPLY=($( compgen -fd -W " -h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config --log " -- $2 ) )
20
20
;;
21
21
esac
22
22
} && complete -F _hx hx
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ set edit:completion:arg-completer[hx] = {|@args|
36
36
edit:complete-filename $args [ -1] | each { | v| put $v [ stem] }
37
37
return
38
38
}
39
+ # When we have --log, we need a file
40
+ if ( has-values "log" $args [ -2]) {
41
+ edit:complete-filename $args [ -1] | each { | v| put $v [ stem] }
42
+ return
43
+ }
39
44
}
40
45
edit:complete-filename $args [ -1] | each { | v| put $v [ stem]}
41
46
$candidate "--help" "(Prints help information)"
@@ -46,4 +51,5 @@ set edit:completion:arg-completer[hx] = {|@args|
46
51
$candidate "--vsplit" "(Splits all given files vertically)"
47
52
$candidate "--hsplit" "(Splits all given files horizontally)"
48
53
$candidate "--config" "(Specifies a file to use for configuration)"
49
- }
54
+ $candidate "--log" "(Specifies a file to write log data into)"
55
+ }
Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ complete -c hx -s V -l version -d "Prints version information"
12
12
complete -c hx -l vsplit -d " Splits all given files vertically into different windows"
13
13
complete -c hx -l hsplit -d " Splits all given files horizontally into different windows"
14
14
complete -c hx -s c -l config -d " Specifies a file to use for completion"
15
+ complete -c hx -s c -l log -d " Specifies a file to write log data into"
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ _hx() {
18
18
" --hsplit[Splits all given files horizontally into different windows]" \
19
19
" -c[Specifies a file to use for configuration]" \
20
20
" --config[Specifies a file to use for configuration]" \
21
+ " --log[Specifies a file to write log data into]" \
21
22
" *:file:_files"
22
23
23
24
case " $state " in
You can’t perform that action at this time.
0 commit comments