diff --git a/CHANGELOG.md b/CHANGELOG.md index 6386dc1..924ff54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 3ee8df5..e6295c2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/config.rs b/src/config.rs index 733fec8..3e49f65 100644 --- a/src/config.rs +++ b/src/config.rs @@ -37,10 +37,10 @@ pub fn zo_exclude_dirs() -> Vec { } pub fn zo_fzf_args() -> Result> { - 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"), } }