aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTobias Hunger2022-09-20 07:11:30 +0000
committerGitHub2022-09-20 07:11:30 +0000
commit130793dfd06306d1f9d25c150c2dc456cda3f9ed (patch)
tree843854ea3bf08c251d440fca7c80303f5150b9b5 /contrib
parent8988c1ecc757bb4d1c2372d8b8a78bae6a1fd85e (diff)
Add command line parameter to specify log file (#3807)
* Add command line parameter to specify log file I had the logs of my debug helix mixed in with the logs from the production helix. Add a `--log` command line argument to redirect any logs to other files, making my debugging easier :-) * Update completion files with `--log` argument
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/hx.bash2
-rw-r--r--contrib/completion/hx.elv8
-rw-r--r--contrib/completion/hx.fish1
-rw-r--r--contrib/completion/hx.zsh1
4 files changed, 10 insertions, 2 deletions
diff --git a/contrib/completion/hx.bash b/contrib/completion/hx.bash
index 8a2d9777..89f3283c 100644
--- a/contrib/completion/hx.bash
+++ b/contrib/completion/hx.bash
@@ -16,7 +16,7 @@ _hx() {
COMPREPLY=($(compgen -W "$languages" -- $2))
;;
*)
- COMPREPLY=($(compgen -fd -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config" -- $2))
+ COMPREPLY=($(compgen -fd -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config --log" -- $2))
;;
esac
} && complete -F _hx hx
diff --git a/contrib/completion/hx.elv b/contrib/completion/hx.elv
index d3d227bc..42c88585 100644
--- a/contrib/completion/hx.elv
+++ b/contrib/completion/hx.elv
@@ -36,6 +36,11 @@ set edit:completion:arg-completer[hx] = {|@args|
edit:complete-filename $args[-1] | each { |v| put $v[stem] }
return
}
+ # When we have --log, we need a file
+ if (has-values "log" $args[-2]) {
+ edit:complete-filename $args[-1] | each { |v| put $v[stem] }
+ return
+ }
}
edit:complete-filename $args[-1] | each { |v| put $v[stem]}
$candidate "--help" "(Prints help information)"
@@ -46,4 +51,5 @@ set edit:completion:arg-completer[hx] = {|@args|
$candidate "--vsplit" "(Splits all given files vertically)"
$candidate "--hsplit" "(Splits all given files horizontally)"
$candidate "--config" "(Specifies a file to use for configuration)"
-} \ No newline at end of file
+ $candidate "--log" "(Specifies a file to write log data into)"
+}
diff --git a/contrib/completion/hx.fish b/contrib/completion/hx.fish
index 65f248d4..71c74ab0 100644
--- a/contrib/completion/hx.fish
+++ b/contrib/completion/hx.fish
@@ -12,3 +12,4 @@ complete -c hx -s V -l version -d "Prints version information"
complete -c hx -l vsplit -d "Splits all given files vertically into different windows"
complete -c hx -l hsplit -d "Splits all given files horizontally into different windows"
complete -c hx -s c -l config -d "Specifies a file to use for completion"
+complete -c hx -s c -l log -d "Specifies a file to write log data into"
diff --git a/contrib/completion/hx.zsh b/contrib/completion/hx.zsh
index e3375656..aaad6f84 100644
--- a/contrib/completion/hx.zsh
+++ b/contrib/completion/hx.zsh
@@ -18,6 +18,7 @@ _hx() {
"--hsplit[Splits all given files horizontally into different windows]" \
"-c[Specifies a file to use for configuration]" \
"--config[Specifies a file to use for configuration]" \
+ "--log[Specifies a file to write log data into]" \
"*:file:_files"
case "$state" in