mirror of https://github.com/passcod/cargo-watch
Rename --no-ignore and --no-gitignore
This commit is contained in:
parent
8e5b8dc2a6
commit
c03096b2c2
|
@ -53,10 +53,10 @@ Register-ArgumentCompleter -Native -CommandName 'cargo-watch' -ScriptBlock {
|
|||
[CompletionResult]::new('--debug', 'debug', [CompletionResultType]::ParameterName, 'Show debug output')
|
||||
[CompletionResult]::new('--why', 'why', [CompletionResultType]::ParameterName, 'Show paths that changed')
|
||||
[CompletionResult]::new('--ignore-nothing', 'ignore-nothing', [CompletionResultType]::ParameterName, 'Ignore nothing, not even target/ and .git/')
|
||||
[CompletionResult]::new('--no-gitignore', 'no-gitignore', [CompletionResultType]::ParameterName, 'Don’t use .gitignore files')
|
||||
[CompletionResult]::new('--no-ignore', 'no-ignore', [CompletionResultType]::ParameterName, 'Don’t use .ignore files')
|
||||
[CompletionResult]::new('--no-vcs-ignores', 'no-vcs-ignores', [CompletionResultType]::ParameterName, 'Don’t use VCS ignore files')
|
||||
[CompletionResult]::new('--no-dot-ignores', 'no-dot-ignores', [CompletionResultType]::ParameterName, 'Don’t use .ignore files')
|
||||
[CompletionResult]::new('--no-restart', 'no-restart', [CompletionResultType]::ParameterName, 'Don’t restart command while it’s still running')
|
||||
[CompletionResult]::new('--all', 'all', [CompletionResultType]::ParameterName, 'Reserves for workspace support')
|
||||
[CompletionResult]::new('--all', 'all', [CompletionResultType]::ParameterName, 'Reserved for workspace support')
|
||||
[CompletionResult]::new('--poll', 'poll', [CompletionResultType]::ParameterName, 'Force use of polling for file changes')
|
||||
[CompletionResult]::new('--postpone', 'postpone', [CompletionResultType]::ParameterName, 'Postpone first run until a file changes')
|
||||
[CompletionResult]::new('-q', 'q', [CompletionResultType]::ParameterName, 'Suppress output from cargo watch itself')
|
||||
|
|
|
@ -47,10 +47,10 @@ _cargo-watch() {
|
|||
'--debug[Show debug output]' \
|
||||
'--why[Show paths that changed]' \
|
||||
'--ignore-nothing[Ignore nothing, not even target/ and .git/]' \
|
||||
'--no-gitignore[Don’t use .gitignore files]' \
|
||||
'--no-ignore[Don’t use .ignore files]' \
|
||||
'--no-vcs-ignores[Don’t use VCS ignore files]' \
|
||||
'--no-dot-ignores[Don’t use .ignore files]' \
|
||||
'--no-restart[Don’t restart command while it’s still running]' \
|
||||
'--all[Reserves for workspace support]' \
|
||||
'--all[Reserved for workspace support]' \
|
||||
'--poll[Force use of polling for file changes]' \
|
||||
'--postpone[Postpone first run until a file changes]' \
|
||||
'-q[Suppress output from cargo watch itself]' \
|
||||
|
|
|
@ -19,7 +19,7 @@ _cargo-watch() {
|
|||
|
||||
case "${cmd}" in
|
||||
cargo__watch)
|
||||
opts="-h -V -c -q -x -s -d -i -p -w -S -C -N -E -B -L --help --version --clear --debug --why --ignore-nothing --no-gitignore --no-ignore --no-restart --all --poll --postpone --delay-run --quit-after-n --features --quiet --exec --shell --delay --ignore --package --watch --use-shell --workdir --notify --env --no-auto-env <trailing command>..."
|
||||
opts="-h -V -c -q -x -s -d -i -p -w -S -C -N -E -B -L --help --version --clear --debug --why --ignore-nothing --no-vcs-ignores --no-dot-ignores --no-restart --all --poll --postpone --delay-run --quit-after-n --features --quiet --exec --shell --delay --ignore --package --watch --use-shell --workdir --notify --env --no-auto-env <trailing command>..."
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
|
|
|
@ -50,10 +50,10 @@ set edit:completion:arg-completer[cargo-watch] = {|@words|
|
|||
cand --debug 'Show debug output'
|
||||
cand --why 'Show paths that changed'
|
||||
cand --ignore-nothing 'Ignore nothing, not even target/ and .git/'
|
||||
cand --no-gitignore 'Don’t use .gitignore files'
|
||||
cand --no-ignore 'Don’t use .ignore files'
|
||||
cand --no-vcs-ignores 'Don’t use VCS ignore files'
|
||||
cand --no-dot-ignores 'Don’t use .ignore files'
|
||||
cand --no-restart 'Don’t restart command while it’s still running'
|
||||
cand --all 'Reserves for workspace support'
|
||||
cand --all 'Reserved for workspace support'
|
||||
cand --poll 'Force use of polling for file changes'
|
||||
cand --postpone 'Postpone first run until a file changes'
|
||||
cand -q 'Suppress output from cargo watch itself'
|
||||
|
|
|
@ -155,11 +155,11 @@ const completion: Fig.Spec = {
|
|||
description: "Ignore nothing, not even target/ and .git/",
|
||||
},
|
||||
{
|
||||
name: "--no-gitignore",
|
||||
description: "Don’t use .gitignore files",
|
||||
name: "--no-vcs-ignores",
|
||||
description: "Don’t use VCS ignore files",
|
||||
},
|
||||
{
|
||||
name: "--no-ignore",
|
||||
name: "--no-dot-ignores",
|
||||
description: "Don’t use .ignore files",
|
||||
},
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ const completion: Fig.Spec = {
|
|||
},
|
||||
{
|
||||
name: "--all",
|
||||
description: "Reserves for workspace support",
|
||||
description: "Reserved for workspace support",
|
||||
},
|
||||
{
|
||||
name: "--poll",
|
||||
|
|
|
@ -18,10 +18,10 @@ complete -c cargo-watch -s c -l clear -d 'Clear the screen before each run'
|
|||
complete -c cargo-watch -l debug -d 'Show debug output'
|
||||
complete -c cargo-watch -l why -d 'Show paths that changed'
|
||||
complete -c cargo-watch -l ignore-nothing -d 'Ignore nothing, not even target/ and .git/'
|
||||
complete -c cargo-watch -l no-gitignore -d 'Don’t use .gitignore files'
|
||||
complete -c cargo-watch -l no-ignore -d 'Don’t use .ignore files'
|
||||
complete -c cargo-watch -l no-vcs-ignores -d 'Don’t use VCS ignore files'
|
||||
complete -c cargo-watch -l no-dot-ignores -d 'Don’t use .ignore files'
|
||||
complete -c cargo-watch -l no-restart -d 'Don’t restart command while it’s still running'
|
||||
complete -c cargo-watch -l all -d 'Reserves for workspace support'
|
||||
complete -c cargo-watch -l all -d 'Reserved for workspace support'
|
||||
complete -c cargo-watch -l poll -d 'Force use of polling for file changes'
|
||||
complete -c cargo-watch -l postpone -d 'Postpone first run until a file changes'
|
||||
complete -c cargo-watch -s q -l quiet -d 'Suppress output from cargo watch itself'
|
||||
|
|
18
src/args.rs
18
src/args.rs
|
@ -58,28 +58,28 @@ pub struct Args {
|
|||
)]
|
||||
pub ignore_nothing: bool,
|
||||
|
||||
/// Don’t use .gitignore files
|
||||
/// Don’t use VCS ignore files
|
||||
#[clap(
|
||||
long = "no-gitignore",
|
||||
long,
|
||||
help_heading = OPTSET_FILTERING,
|
||||
)]
|
||||
pub no_gitignore: bool,
|
||||
pub no_vcs_ignores: bool,
|
||||
|
||||
/// Don’t use .ignore files
|
||||
#[clap(
|
||||
long = "no-ignore",
|
||||
long,
|
||||
help_heading = OPTSET_FILTERING,
|
||||
)]
|
||||
pub no_ignore: bool,
|
||||
pub no_dot_ignores: bool,
|
||||
|
||||
/// Don’t restart command while it’s still running
|
||||
#[clap(
|
||||
long = "no-restart",
|
||||
long,
|
||||
help_heading = OPTSET_BEHAVIOUR,
|
||||
)]
|
||||
pub no_restart: bool,
|
||||
|
||||
/// Reserves for workspace support
|
||||
/// Reserved for workspace support
|
||||
#[clap(
|
||||
long = "all",
|
||||
hide = true,
|
||||
|
@ -89,14 +89,14 @@ pub struct Args {
|
|||
|
||||
/// Force use of polling for file changes
|
||||
#[clap(
|
||||
long = "poll",
|
||||
long,
|
||||
help_heading = OPTSET_BEHAVIOUR,
|
||||
)]
|
||||
pub poll: bool,
|
||||
|
||||
/// Postpone first run until a file changes
|
||||
#[clap(
|
||||
long = "postpone",
|
||||
long,
|
||||
help_heading = OPTSET_BEHAVIOUR,
|
||||
)]
|
||||
pub postpone: bool,
|
||||
|
|
Loading…
Reference in New Issue