1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-15 18:30:08 +00:00

feat(zoxide): add option to override cmd (#12218)

This commit is contained in:
Julian 2024-02-19 10:29:37 +01:00 committed by GitHub
parent 872b5cd408
commit 15ffbdd346
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -10,5 +10,8 @@ To use it, add `zoxide` to the plugins array in your `.zshrc` file:
```zsh
plugins=(... zoxide)
```
## Overriding `z` Alias
You can set the `ZOXIDE_CMD_OVERRIDE`, which will be passed to the `--cmd` flag of `zoxide init`. This allows you to set your `z` command to a default of `cd`.
**Note:** you have to [install zoxide](https://github.com/ajeetdsouza/zoxide#step-1-install-zoxide) first.

View file

@ -1,5 +1,5 @@
if (( $+commands[zoxide] )); then
eval "$(zoxide init zsh)"
eval "$(zoxide init --cmd ${ZOXIDE_CMD_OVERRIDE:-z} zsh)"
else
echo '[oh-my-zsh] zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide'
fi