mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-22 12:55:13 +00:00
Replace --no-aliases
with --no-cmd
This commit is contained in:
parent
a0242d7c9a
commit
b71d33b5c1
@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Manpages: moved to `man/man1/*.1`.
|
- Manpages: moved to `man/man1/*.1`.
|
||||||
|
- Replace `--no-aliases` with `--no-cmd`.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
86
Cargo.lock
generated
86
Cargo.lock
generated
@ -131,9 +131,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "3.1.6"
|
version = "3.1.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123"
|
checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
@ -157,9 +157,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_complete_fig"
|
name = "clap_complete_fig"
|
||||||
version = "3.1.0"
|
version = "3.1.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5c11f6f44afea4aee21bb57a5297879c88ac8dc97224fbbbe796edd60a098f0e"
|
checksum = "690eb5abb7a98df1a64a3028beaf95af7e0ceb13da3186e6d0a86161af76309e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"clap_complete",
|
"clap_complete",
|
||||||
@ -167,9 +167,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_derive"
|
name = "clap_derive"
|
||||||
version = "3.1.4"
|
version = "3.1.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16"
|
checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck",
|
"heck",
|
||||||
"proc-macro-error",
|
"proc-macro-error",
|
||||||
@ -180,9 +180,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-utils"
|
name = "crossbeam-utils"
|
||||||
version = "0.8.7"
|
version = "0.8.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
|
checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
@ -205,9 +205,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dirs-sys"
|
name = "dirs-sys"
|
||||||
version = "0.3.6"
|
version = "0.3.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
|
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"redox_users",
|
"redox_users",
|
||||||
@ -249,9 +249,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "getrandom"
|
name = "getrandom"
|
||||||
version = "0.2.5"
|
version = "0.2.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77"
|
checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
@ -318,9 +318,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "1.8.0"
|
version = "1.8.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
|
checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
@ -352,15 +352,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.119"
|
version = "0.2.122"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
|
checksum = "ec647867e2bf0772e28c8bcde4f0d19a9216916e890543b5a03ed8ef27b8f259"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.14"
|
version = "0.4.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
|
checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
]
|
]
|
||||||
@ -417,13 +417,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nom"
|
name = "nom"
|
||||||
version = "7.1.0"
|
version = "7.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109"
|
checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
"minimal-lexical",
|
"minimal-lexical",
|
||||||
"version_check",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -512,39 +511,40 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.36"
|
version = "1.0.37"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
|
checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.15"
|
version = "1.0.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
|
checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "redox_syscall"
|
name = "redox_syscall"
|
||||||
version = "0.2.11"
|
version = "0.2.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c"
|
checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "redox_users"
|
name = "redox_users"
|
||||||
version = "0.4.0"
|
version = "0.4.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
|
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom",
|
"getrandom",
|
||||||
"redox_syscall",
|
"redox_syscall",
|
||||||
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -623,9 +623,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "semver"
|
name = "semver"
|
||||||
version = "1.0.6"
|
version = "1.0.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d"
|
checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
@ -661,9 +661,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.86"
|
version = "1.0.91"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
|
checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -705,6 +705,26 @@ version = "0.15.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
|
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "thiserror"
|
||||||
|
version = "1.0.30"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
|
||||||
|
dependencies = [
|
||||||
|
"thiserror-impl",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "thiserror-impl"
|
||||||
|
version = "1.0.30"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thread_local"
|
name = "thread_local"
|
||||||
version = "1.1.4"
|
version = "1.1.4"
|
||||||
|
@ -294,8 +294,8 @@ zoxide import --from z path/to/db
|
|||||||
When calling `zoxide init`, the following flags are available:
|
When calling `zoxide init`, the following flags are available:
|
||||||
|
|
||||||
- `--cmd`
|
- `--cmd`
|
||||||
- Changes the prefix of predefined aliases (`z`, `zi`).
|
- Changes the prefix of the `z` and `zi` commands.
|
||||||
- `--cmd j` would change the aliases to (`j`, `ji`).
|
- `--cmd j` would change the commands to (`j`, `ji`).
|
||||||
- `--cmd cd` would replace the `cd` command (doesn't work on Nushell / POSIX shells).
|
- `--cmd cd` would replace the `cd` command (doesn't work on Nushell / POSIX shells).
|
||||||
- `--hook <HOOK>`
|
- `--hook <HOOK>`
|
||||||
- Changes how often zoxide increments a directory's score:
|
- Changes how often zoxide increments a directory's score:
|
||||||
@ -304,8 +304,8 @@ When calling `zoxide init`, the following flags are available:
|
|||||||
| `none` | Never |
|
| `none` | Never |
|
||||||
| `prompt` | At every shell prompt |
|
| `prompt` | At every shell prompt |
|
||||||
| `pwd` | Whenever the directory is changed |
|
| `pwd` | Whenever the directory is changed |
|
||||||
- `--no-aliases`
|
- `--no-cmd`
|
||||||
- Don't define aliases (`z`, `zi`).
|
- Prevents zoxide from defining the `z` and `zi` commands.
|
||||||
- These functions will still be available in your shell as `__zoxide_z` and
|
- These functions will still be available in your shell as `__zoxide_z` and
|
||||||
`__zoxide_zi`, should you choose to redefine them.
|
`__zoxide_zi`, should you choose to redefine them.
|
||||||
|
|
||||||
|
6
contrib/completions/_zoxide
generated
6
contrib/completions/_zoxide
generated
@ -50,9 +50,9 @@ _arguments "${_arguments_options[@]}" \
|
|||||||
;;
|
;;
|
||||||
(init)
|
(init)
|
||||||
_arguments "${_arguments_options[@]}" \
|
_arguments "${_arguments_options[@]}" \
|
||||||
'--cmd=[Renames the '\''z'\'' command and corresponding aliases]:CMD: ' \
|
'--cmd=[Changes the prefix of the `z` and `zi` commands]:CMD: ' \
|
||||||
'--hook=[Chooses event upon which an entry is added to the database]:HOOK:(none prompt pwd)' \
|
'--hook=[Changes how often zoxide increments a directory'\''s score]:HOOK:(none prompt pwd)' \
|
||||||
'--no-aliases[Prevents zoxide from defining any commands]' \
|
'--no-cmd[Prevents zoxide from defining the `z` and `zi` commands]' \
|
||||||
'-h[Print help information]' \
|
'-h[Print help information]' \
|
||||||
'--help[Print help information]' \
|
'--help[Print help information]' \
|
||||||
'-V[Print version information]' \
|
'-V[Print version information]' \
|
||||||
|
6
contrib/completions/_zoxide.ps1
generated
6
contrib/completions/_zoxide.ps1
generated
@ -49,9 +49,9 @@ Register-ArgumentCompleter -Native -CommandName 'zoxide' -ScriptBlock {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
'zoxide;init' {
|
'zoxide;init' {
|
||||||
[CompletionResult]::new('--cmd', 'cmd', [CompletionResultType]::ParameterName, 'Renames the ''z'' command and corresponding aliases')
|
[CompletionResult]::new('--cmd', 'cmd', [CompletionResultType]::ParameterName, 'Changes the prefix of the `z` and `zi` commands')
|
||||||
[CompletionResult]::new('--hook', 'hook', [CompletionResultType]::ParameterName, 'Chooses event upon which an entry is added to the database')
|
[CompletionResult]::new('--hook', 'hook', [CompletionResultType]::ParameterName, 'Changes how often zoxide increments a directory''s score')
|
||||||
[CompletionResult]::new('--no-aliases', 'no-aliases', [CompletionResultType]::ParameterName, 'Prevents zoxide from defining any commands')
|
[CompletionResult]::new('--no-cmd', 'no-cmd', [CompletionResultType]::ParameterName, 'Prevents zoxide from defining the `z` and `zi` commands')
|
||||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
|
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
|
||||||
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
|
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
|
||||||
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
|
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
|
||||||
|
2
contrib/completions/zoxide.bash
generated
2
contrib/completions/zoxide.bash
generated
@ -80,7 +80,7 @@ _zoxide() {
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
zoxide__init)
|
zoxide__init)
|
||||||
opts="-h -V --no-aliases --cmd --hook --help --version bash elvish fish nushell posix powershell xonsh zsh"
|
opts="-h -V --no-cmd --cmd --hook --help --version bash elvish fish nushell posix powershell xonsh zsh"
|
||||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||||
return 0
|
return 0
|
||||||
|
6
contrib/completions/zoxide.elv
generated
6
contrib/completions/zoxide.elv
generated
@ -43,9 +43,9 @@ set edit:completion:arg-completer[zoxide] = {|@words|
|
|||||||
cand --version 'Print version information'
|
cand --version 'Print version information'
|
||||||
}
|
}
|
||||||
&'zoxide;init'= {
|
&'zoxide;init'= {
|
||||||
cand --cmd 'Renames the ''z'' command and corresponding aliases'
|
cand --cmd 'Changes the prefix of the `z` and `zi` commands'
|
||||||
cand --hook 'Chooses event upon which an entry is added to the database'
|
cand --hook 'Changes how often zoxide increments a directory''s score'
|
||||||
cand --no-aliases 'Prevents zoxide from defining any commands'
|
cand --no-cmd 'Prevents zoxide from defining the `z` and `zi` commands'
|
||||||
cand -h 'Print help information'
|
cand -h 'Print help information'
|
||||||
cand --help 'Print help information'
|
cand --help 'Print help information'
|
||||||
cand -V 'Print version information'
|
cand -V 'Print version information'
|
||||||
|
6
contrib/completions/zoxide.fish
generated
6
contrib/completions/zoxide.fish
generated
@ -11,9 +11,9 @@ complete -c zoxide -n "__fish_seen_subcommand_from import" -l from -d 'Applicati
|
|||||||
complete -c zoxide -n "__fish_seen_subcommand_from import" -l merge -d 'Merge into existing database'
|
complete -c zoxide -n "__fish_seen_subcommand_from import" -l merge -d 'Merge into existing database'
|
||||||
complete -c zoxide -n "__fish_seen_subcommand_from import" -s h -l help -d 'Print help information'
|
complete -c zoxide -n "__fish_seen_subcommand_from import" -s h -l help -d 'Print help information'
|
||||||
complete -c zoxide -n "__fish_seen_subcommand_from import" -s V -l version -d 'Print version information'
|
complete -c zoxide -n "__fish_seen_subcommand_from import" -s V -l version -d 'Print version information'
|
||||||
complete -c zoxide -n "__fish_seen_subcommand_from init" -l cmd -d 'Renames the \'z\' command and corresponding aliases' -r
|
complete -c zoxide -n "__fish_seen_subcommand_from init" -l cmd -d 'Changes the prefix of the `z` and `zi` commands' -r
|
||||||
complete -c zoxide -n "__fish_seen_subcommand_from init" -l hook -d 'Chooses event upon which an entry is added to the database' -r -f -a "{none ,prompt ,pwd }"
|
complete -c zoxide -n "__fish_seen_subcommand_from init" -l hook -d 'Changes how often zoxide increments a directory\'s score' -r -f -a "{none ,prompt ,pwd }"
|
||||||
complete -c zoxide -n "__fish_seen_subcommand_from init" -l no-aliases -d 'Prevents zoxide from defining any commands'
|
complete -c zoxide -n "__fish_seen_subcommand_from init" -l no-cmd -d 'Prevents zoxide from defining the `z` and `zi` commands'
|
||||||
complete -c zoxide -n "__fish_seen_subcommand_from init" -s h -l help -d 'Print help information'
|
complete -c zoxide -n "__fish_seen_subcommand_from init" -s h -l help -d 'Print help information'
|
||||||
complete -c zoxide -n "__fish_seen_subcommand_from init" -s V -l version -d 'Print version information'
|
complete -c zoxide -n "__fish_seen_subcommand_from init" -s V -l version -d 'Print version information'
|
||||||
complete -c zoxide -n "__fish_seen_subcommand_from query" -l exclude -d 'Exclude a path from results' -r -f -a "(__fish_complete_directories)"
|
complete -c zoxide -n "__fish_seen_subcommand_from query" -l exclude -d 'Exclude a path from results' -r -f -a "(__fish_complete_directories)"
|
||||||
|
78
contrib/completions/zoxide.ts
generated
78
contrib/completions/zoxide.ts
generated
@ -31,13 +31,9 @@ const completion: Fig.Spec = {
|
|||||||
args: {
|
args: {
|
||||||
name: "from",
|
name: "from",
|
||||||
suggestions: [
|
suggestions: [
|
||||||
{
|
"autojump",
|
||||||
name: "autojump",
|
"z",
|
||||||
},
|
],
|
||||||
{
|
|
||||||
name: "z",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -64,7 +60,7 @@ const completion: Fig.Spec = {
|
|||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: "--cmd",
|
name: "--cmd",
|
||||||
description: "Renames the 'z' command and corresponding aliases",
|
description: "Changes the prefix of the `z` and `zi` commands",
|
||||||
args: {
|
args: {
|
||||||
name: "cmd",
|
name: "cmd",
|
||||||
isOptional: true,
|
isOptional: true,
|
||||||
@ -72,26 +68,20 @@ const completion: Fig.Spec = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "--hook",
|
name: "--hook",
|
||||||
description: "Chooses event upon which an entry is added to the database",
|
description: "Changes how often zoxide increments a directory's score",
|
||||||
args: {
|
args: {
|
||||||
name: "hook",
|
name: "hook",
|
||||||
isOptional: true,
|
isOptional: true,
|
||||||
suggestions: [
|
suggestions: [
|
||||||
{
|
"none",
|
||||||
name: "none",
|
"prompt",
|
||||||
},
|
"pwd",
|
||||||
{
|
],
|
||||||
name: "prompt",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "pwd",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "--no-aliases",
|
name: "--no-cmd",
|
||||||
description: "Prevents zoxide from defining any commands",
|
description: "Prevents zoxide from defining the `z` and `zi` commands",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: ["-h", "--help"],
|
name: ["-h", "--help"],
|
||||||
@ -105,31 +95,15 @@ const completion: Fig.Spec = {
|
|||||||
args: {
|
args: {
|
||||||
name: "shell",
|
name: "shell",
|
||||||
suggestions: [
|
suggestions: [
|
||||||
{
|
"bash",
|
||||||
name: "bash",
|
"elvish",
|
||||||
},
|
"fish",
|
||||||
{
|
"nushell",
|
||||||
name: "elvish",
|
"posix",
|
||||||
},
|
"powershell",
|
||||||
{
|
"xonsh",
|
||||||
name: "fish",
|
"zsh",
|
||||||
},
|
],
|
||||||
{
|
|
||||||
name: "nushell",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "posix",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "powershell",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "xonsh",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "zsh",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -152,14 +126,26 @@ const completion: Fig.Spec = {
|
|||||||
{
|
{
|
||||||
name: ["-i", "--interactive"],
|
name: ["-i", "--interactive"],
|
||||||
description: "Use interactive selection",
|
description: "Use interactive selection",
|
||||||
|
exclusiveOn: [
|
||||||
|
"-l",
|
||||||
|
"--list",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: ["-l", "--list"],
|
name: ["-l", "--list"],
|
||||||
description: "List all matching directories",
|
description: "List all matching directories",
|
||||||
|
exclusiveOn: [
|
||||||
|
"-i",
|
||||||
|
"--interactive",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: ["-s", "--score"],
|
name: ["-s", "--score"],
|
||||||
description: "Print score with results",
|
description: "Print score with results",
|
||||||
|
exclusiveOn: [
|
||||||
|
"-i",
|
||||||
|
"--interactive",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: ["-h", "--help"],
|
name: ["-h", "--help"],
|
||||||
|
@ -74,9 +74,9 @@ Add this to your configuration:
|
|||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B --cmd
|
.B --cmd
|
||||||
Changes the prefix of predefined aliases (\fBz\fR, \fBzi\fR).
|
Changes the prefix of the \fBz\fR and \fBzi\fR commands.
|
||||||
.br
|
.br
|
||||||
\fB--cmd j\fR would change the aliases to (\fBj\fR, \fBji\fR).
|
\fB--cmd j\fR would change the commands to (\fBj\fR, \fBji\fR).
|
||||||
.br
|
.br
|
||||||
\fB--cmd cd\fR would replace the \fBcd\fR command (doesn't work on Nushell /
|
\fB--cmd cd\fR would replace the \fBcd\fR command (doesn't work on Nushell /
|
||||||
POSIX shells).
|
POSIX shells).
|
||||||
@ -94,10 +94,10 @@ l l.
|
|||||||
\fBpwd\fR|Whenever the directory is changed
|
\fBpwd\fR|Whenever the directory is changed
|
||||||
.TE
|
.TE
|
||||||
.TP
|
.TP
|
||||||
.B --no-aliases
|
.B --no-cmd
|
||||||
Don't define extra aliases (\fBz\fR, \fBzi\fR). These functions will still be
|
Prevents zoxide from defining the \fBz\fR and \fBzi\fR commands. These functions
|
||||||
available in your shell as \fB__zoxide_z\fR and \fB__zoxide_zi\fR, should you
|
will still be available in your shell as \fB__zoxide_z\fR and \fB__zoxide_zi\fR,
|
||||||
choose to redefine them.
|
should you choose to redefine them.
|
||||||
.SH REPORTING BUGS
|
.SH REPORTING BUGS
|
||||||
For any issues, feature requests, or questions, please visit:
|
For any issues, feature requests, or questions, please visit:
|
||||||
.sp
|
.sp
|
||||||
|
@ -62,15 +62,15 @@ pub struct Init {
|
|||||||
#[clap(arg_enum)]
|
#[clap(arg_enum)]
|
||||||
pub shell: InitShell,
|
pub shell: InitShell,
|
||||||
|
|
||||||
/// Prevents zoxide from defining any commands
|
/// Prevents zoxide from defining the `z` and `zi` commands
|
||||||
#[clap(long)]
|
#[clap(long, alias = "no-aliases")]
|
||||||
pub no_aliases: bool,
|
pub no_cmd: bool,
|
||||||
|
|
||||||
/// Renames the 'z' command and corresponding aliases
|
/// Changes the prefix of the `z` and `zi` commands
|
||||||
#[clap(long, default_value = "z")]
|
#[clap(long, default_value = "z")]
|
||||||
pub cmd: String,
|
pub cmd: String,
|
||||||
|
|
||||||
/// Chooses event upon which an entry is added to the database
|
/// Changes how often zoxide increments a directory's score
|
||||||
#[clap(arg_enum, long, default_value = "pwd")]
|
#[clap(arg_enum, long, default_value = "pwd")]
|
||||||
pub hook: InitHook,
|
pub hook: InitHook,
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ use crate::shell::{self, Opts};
|
|||||||
|
|
||||||
impl Run for Init {
|
impl Run for Init {
|
||||||
fn run(&self) -> Result<()> {
|
fn run(&self) -> Result<()> {
|
||||||
let cmd = if self.no_aliases { None } else { Some(self.cmd.as_str()) };
|
let cmd = if self.no_cmd { None } else { Some(self.cmd.as_str()) };
|
||||||
|
|
||||||
let echo = config::echo();
|
let echo = config::echo();
|
||||||
let resolve_symlinks = config::resolve_symlinks();
|
let resolve_symlinks = config::resolve_symlinks();
|
||||||
|
@ -58,7 +58,7 @@ fi
|
|||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# When using zoxide with --no-aliases, alias these internal functions as
|
# When using zoxide with --no-cmd, alias these internal functions as
|
||||||
# desired.
|
# desired.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ function __zoxide_zi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# Convenient aliases for zoxide. Disable these using --no-aliases.
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
#
|
#
|
||||||
|
|
||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
|
@ -41,7 +41,7 @@ if (builtin:not (builtin:eq $E:__zoxide_shlvl $E:SHLVL)) {
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# When using zoxide with --no-aliases, alias these internal functions as
|
# When using zoxide with --no-cmd, alias these internal functions as
|
||||||
# desired.
|
# desired.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ fn __zoxide_zi {|@rest|
|
|||||||
edit:add-var __zoxide_zi~ $__zoxide_zi~
|
edit:add-var __zoxide_zi~ $__zoxide_zi~
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# Convenient aliases for zoxide. Disable these using --no-aliases.
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
#
|
#
|
||||||
|
|
||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
|
@ -53,7 +53,7 @@ end
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# When using zoxide with --no-aliases, alias these internal functions as
|
# When using zoxide with --no-cmd, alias these internal functions as
|
||||||
# desired.
|
# desired.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ function __zoxide_zi
|
|||||||
end
|
end
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# Convenient aliases for zoxide. Disable these using --no-aliases.
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
#
|
#
|
||||||
|
|
||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
|
@ -45,7 +45,7 @@ $'zoxide: PWD hooks are not supported on Nushell.(char nl)Use (char sq)zoxide in
|
|||||||
{%- endmatch %}
|
{%- endmatch %}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# When using zoxide with --no-aliases, alias these internal functions as
|
# When using zoxide with --no-cmd, alias these internal functions as
|
||||||
# desired.
|
# desired.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ def __zoxide_zi [...rest:string] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# Convenient aliases for zoxide. Disable these using --no-aliases.
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
#
|
#
|
||||||
|
|
||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
|
@ -47,7 +47,7 @@ fi
|
|||||||
{%- endmatch %}
|
{%- endmatch %}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# When using zoxide with --no-aliases, alias these internal functions as
|
# When using zoxide with --no-cmd, alias these internal functions as
|
||||||
# desired.
|
# desired.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ __zoxide_zi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# Convenient aliases for zoxide. Disable these using --no-aliases.
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
#
|
#
|
||||||
|
|
||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
|
@ -67,7 +67,7 @@ if ($__zoxide_hooked -ne 1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# When using zoxide with --no-aliases, alias these internal functions as
|
# When using zoxide with --no-cmd, alias these internal functions as
|
||||||
# desired.
|
# desired.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ function __zoxide_zi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# Convenient aliases for zoxide. Disable these using --no-aliases.
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
#
|
#
|
||||||
|
|
||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
|
@ -108,7 +108,7 @@ if "__zoxide_hook" not in globals():
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# When using zoxide with --no-aliases, alias these internal functions as
|
# When using zoxide with --no-cmd, alias these internal functions as
|
||||||
# desired.
|
# desired.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ def __zoxide_zi(args: typing.List[str]) -> None:
|
|||||||
|
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# Convenient aliases for zoxide. Disable these using --no-aliases.
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
#
|
#
|
||||||
|
|
||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
|
@ -46,7 +46,7 @@ fi
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# When using zoxide with --no-aliases, alias these internal functions as
|
# When using zoxide with --no-cmd, alias these internal functions as
|
||||||
# desired.
|
# desired.
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ function __zoxide_zi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{ section }}
|
{{ section }}
|
||||||
# Convenient aliases for zoxide. Disable these using --no-aliases.
|
# Commands for zoxide. Disable these using --no-cmd.
|
||||||
#
|
#
|
||||||
|
|
||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
|
Loading…
Reference in New Issue
Block a user