Rename _ZO_FZF_ARGS to _ZO_FZF_OPTS

This commit is contained in:
Jason Shirk 2020-04-09 11:31:00 -07:00
parent 66ccfb0220
commit 5e90d33951
3 changed files with 5 additions and 5 deletions

View File

@ -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`).
- 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

View File

@ -128,7 +128,7 @@ NOTE: PWD hooks are currently not supported for POSIX shells.
- `$_ZO_EXCLUDE_DIRS`: list of directories separated by platform-specific
characters ("`:`" on Linux and macOS, and "`;`" on Windows) to be excluded from
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
[`dirs` documentation]: https://docs.rs/dirs/latest/dirs/fn.data_local_dir.html

View File

@ -37,10 +37,10 @@ pub fn zo_exclude_dirs() -> Vec<PathBuf> {
}
pub fn zo_fzf_args() -> Result<Vec<String>> {
match env::var("_ZO_FZF_ARGS") {
Ok(fzf_args) => shlex::split(&fzf_args).ok_or_else(|| anyhow!("could not parse _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_OPTS")),
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"),
}
}