mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-16 17:18:30 +01:00
Remove -k
This commit is contained in:
parent
e505a9ad05
commit
5b17550eb1
7 changed files with 1 additions and 17 deletions
|
@ -19,7 +19,7 @@ _watchexec() {
|
|||
|
||||
case "${cmd}" in
|
||||
watchexec)
|
||||
opts="-w -c -o -r -s -k -d -p -n -E -1 -N -q -e -f -j -i -v -h -V --watch --clear --on-busy-update --restart --signal --kill --stop-signal --stop-timeout --map-signal --debounce --stdin-quit --no-vcs-ignore --no-project-ignore --no-global-ignore --no-default-ignore --no-discover-ignore --ignore-nothing --postpone --delay-run --poll --shell --no-environment --emit-events-to --only-emit-events --env --no-process-group --notify --color --timings --quiet --bell --project-origin --workdir --exts --filter --filter-file --filter-prog --ignore --ignore-file --fs-events --no-meta --print-events --verbose --log-file --manual --completions --help --version [COMMAND]..."
|
||||
opts="-w -c -o -r -s -d -p -n -E -1 -N -q -e -f -j -i -v -h -V --watch --clear --on-busy-update --restart --signal --stop-signal --stop-timeout --map-signal --debounce --stdin-quit --no-vcs-ignore --no-project-ignore --no-global-ignore --no-default-ignore --no-discover-ignore --ignore-nothing --postpone --delay-run --poll --shell --no-environment --emit-events-to --only-emit-events --env --no-process-group --notify --color --timings --quiet --bell --project-origin --workdir --exts --filter --filter-file --filter-prog --ignore --ignore-file --fs-events --no-meta --print-events --verbose --log-file --manual --completions --help --version [COMMAND]..."
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
|
|
|
@ -55,8 +55,6 @@ set edit:completion:arg-completer[watchexec] = {|@words|
|
|||
cand --completions 'Generate a shell completions script'
|
||||
cand -r 'Restart the process if it''s still running'
|
||||
cand --restart 'Restart the process if it''s still running'
|
||||
cand -k 'Hidden legacy shorthand for ''--signal=kill'''
|
||||
cand --kill 'Hidden legacy shorthand for ''--signal=kill'''
|
||||
cand --stdin-quit 'Exit when stdin closes'
|
||||
cand --no-vcs-ignore 'Don''t load gitignores'
|
||||
cand --no-project-ignore 'Don''t load project-local ignores'
|
||||
|
|
|
@ -24,7 +24,6 @@ complete -c watchexec -l fs-events -d 'Filesystem events to filter to' -r -f -a
|
|||
complete -c watchexec -l log-file -d 'Write diagnostic logs to a file' -r -F
|
||||
complete -c watchexec -l completions -d 'Generate a shell completions script' -r -f -a "{bash '',elvish '',fish '',nu '',powershell '',zsh ''}"
|
||||
complete -c watchexec -s r -l restart -d 'Restart the process if it\'s still running'
|
||||
complete -c watchexec -s k -l kill -d 'Hidden legacy shorthand for \'--signal=kill\''
|
||||
complete -c watchexec -l stdin-quit -d 'Exit when stdin closes'
|
||||
complete -c watchexec -l no-vcs-ignore -d 'Don\'t load gitignores'
|
||||
complete -c watchexec -l no-project-ignore -d 'Don\'t load project-local ignores'
|
||||
|
|
|
@ -32,7 +32,6 @@ module completions {
|
|||
--on-busy-update(-o): string@"nu-complete watchexec on_busy_update" # What to do when receiving events while the command is running
|
||||
--restart(-r) # Restart the process if it's still running
|
||||
--signal(-s): string # Send a signal to the process when it's still running
|
||||
--kill(-k) # Hidden legacy shorthand for '--signal=kill'
|
||||
--stop-signal: string # Signal to send to stop the command
|
||||
--stop-timeout: string # Time to wait for the command to exit gracefully
|
||||
--map-signal: string # Translate signals from the OS to signals to send to the command
|
||||
|
|
|
@ -58,8 +58,6 @@ Register-ArgumentCompleter -Native -CommandName 'watchexec' -ScriptBlock {
|
|||
[CompletionResult]::new('--completions', 'completions', [CompletionResultType]::ParameterName, 'Generate a shell completions script')
|
||||
[CompletionResult]::new('-r', 'r', [CompletionResultType]::ParameterName, 'Restart the process if it''s still running')
|
||||
[CompletionResult]::new('--restart', 'restart', [CompletionResultType]::ParameterName, 'Restart the process if it''s still running')
|
||||
[CompletionResult]::new('-k', 'k', [CompletionResultType]::ParameterName, 'Hidden legacy shorthand for ''--signal=kill''')
|
||||
[CompletionResult]::new('--kill', 'kill', [CompletionResultType]::ParameterName, 'Hidden legacy shorthand for ''--signal=kill''')
|
||||
[CompletionResult]::new('--stdin-quit', 'stdin-quit', [CompletionResultType]::ParameterName, 'Exit when stdin closes')
|
||||
[CompletionResult]::new('--no-vcs-ignore', 'no-vcs-ignore', [CompletionResultType]::ParameterName, 'Don''t load gitignores')
|
||||
[CompletionResult]::new('--no-project-ignore', 'no-project-ignore', [CompletionResultType]::ParameterName, 'Don''t load project-local ignores')
|
||||
|
|
|
@ -52,8 +52,6 @@ _watchexec() {
|
|||
'(--manual)--completions=[Generate a shell completions script]:COMPLETIONS:(bash elvish fish nu powershell zsh)' \
|
||||
'(-o --on-busy-update)-r[Restart the process if it'\''s still running]' \
|
||||
'(-o --on-busy-update)--restart[Restart the process if it'\''s still running]' \
|
||||
'-k[Hidden legacy shorthand for '\''--signal=kill'\'']' \
|
||||
'--kill[Hidden legacy shorthand for '\''--signal=kill'\'']' \
|
||||
'--stdin-quit[Exit when stdin closes]' \
|
||||
'--no-vcs-ignore[Don'\''t load gitignores]' \
|
||||
'--no-project-ignore[Don'\''t load project-local ignores]' \
|
||||
|
|
|
@ -193,10 +193,6 @@ pub struct Args {
|
|||
)]
|
||||
pub signal: Option<Signal>,
|
||||
|
||||
/// Hidden legacy shorthand for '--signal=kill'.
|
||||
#[arg(short, long, hide = true)]
|
||||
pub kill: bool,
|
||||
|
||||
/// Signal to send to stop the command
|
||||
///
|
||||
/// This is used by 'restart' and 'signal' modes of '--on-busy-update' (unless '--signal' is
|
||||
|
@ -1172,10 +1168,6 @@ pub async fn get_args() -> Result<Args> {
|
|||
args.no_discover_ignore = true;
|
||||
}
|
||||
|
||||
if args.kill {
|
||||
args.signal = Some(Signal::ForceStop);
|
||||
}
|
||||
|
||||
if args.signal.is_some() {
|
||||
args.on_busy_update = OnBusyUpdate::Signal;
|
||||
} else if args.restart {
|
||||
|
|
Loading…
Reference in a new issue