Rename _ZO_FZF_ARGS to _ZO_FZF_OPTS
This commit is contained in:
parent
66ccfb0220
commit
5e90d33951
|
|
@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- Interactive mode for removing entries (`zoxide remove -i`).
|
- Interactive mode for removing entries (`zoxide remove -i`).
|
||||||
- Aliases for interactive `query` and `remove` (`zqi` and `zri` respectively)
|
- Aliases for interactive `query` and `remove` (`zqi` and `zri` respectively)
|
||||||
- Specify additional arguments to `fzf` with `$_ZO_FZF_ARGS`.
|
- Specify additional arguments to `fzf` with `$_ZO_FZF_OPTS`.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ NOTE: PWD hooks are currently not supported for POSIX shells.
|
||||||
- `$_ZO_EXCLUDE_DIRS`: list of directories separated by platform-specific
|
- `$_ZO_EXCLUDE_DIRS`: list of directories separated by platform-specific
|
||||||
characters ("`:`" on Linux and macOS, and "`;`" on Windows) to be excluded from
|
characters ("`:`" on Linux and macOS, and "`;`" on Windows) to be excluded from
|
||||||
the database
|
the database
|
||||||
- `$_ZO_FZF_ARGS`: extra arguments to pass to `fzf`
|
- `$_ZO_FZF_OPTS`: extra arguments to pass to `fzf`
|
||||||
- `$_ZO_MAXAGE`: sets the maximum total rank after which entries start getting deleted
|
- `$_ZO_MAXAGE`: sets the maximum total rank after which entries start getting deleted
|
||||||
|
|
||||||
[`dirs` documentation]: https://docs.rs/dirs/latest/dirs/fn.data_local_dir.html
|
[`dirs` documentation]: https://docs.rs/dirs/latest/dirs/fn.data_local_dir.html
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ pub fn zo_exclude_dirs() -> Vec<PathBuf> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn zo_fzf_args() -> Result<Vec<String>> {
|
pub fn zo_fzf_args() -> Result<Vec<String>> {
|
||||||
match env::var("_ZO_FZF_ARGS") {
|
match env::var("_ZO_FZF_OPTS") {
|
||||||
Ok(fzf_args) => shlex::split(&fzf_args).ok_or_else(|| anyhow!("could not parse _ZO_FZF_ARGS")),
|
Ok(fzf_args) => shlex::split(&fzf_args).ok_or_else(|| anyhow!("could not parse _ZO_FZF_OPTS")),
|
||||||
Err(env::VarError::NotPresent) => Ok(Vec::new()),
|
Err(env::VarError::NotPresent) => Ok(Vec::new()),
|
||||||
Err(e) => Err(e).context("invalid Unicode in _ZO_FZF_ARGS"),
|
Err(e) => Err(e).context("invalid Unicode in _ZO_FZF_OPTS"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue