mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
Add plugin for zoxide
This commit is contained in:
committed by
Koichi Murase
parent
ae432c6185
commit
6c79f70891
14
plugins/zoxide/README.md
Normal file
14
plugins/zoxide/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# zoxide plugin
|
||||
|
||||
Initializes [zoxide](https://github.com/ajeetdsouza/zoxide), a smarter cd
|
||||
command for your terminal.
|
||||
|
||||

|
||||
|
||||
To use it, add `zoxide` to the plugins array in your `.bashrc` file:
|
||||
|
||||
```bash
|
||||
plugins=(... zoxide)
|
||||
```
|
||||
|
||||
**Note:** you have to [install zoxide](https://github.com/ajeetdsouza/zoxide#step-1-install-zoxide) first.
|
8
plugins/zoxide/zoxide.plugin.sh
Normal file
8
plugins/zoxide/zoxide.plugin.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Check if zoxide is installed
|
||||
if [ -x "$(command -v zoxide)" ]; then
|
||||
eval "$(zoxide init bash)"
|
||||
else
|
||||
echo '[oh-my-bash] zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide'
|
||||
fi
|
Reference in New Issue
Block a user