Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0rax/fish-bd
Quickly go back to a parent directory up in your current working directory tree. Don't write 'cd ../../..' redundantly, use bd instead.
https://github.com/0rax/fish-bd
fish fish-packages fish-shell shell
Last synced: 6 days ago
JSON representation
Quickly go back to a parent directory up in your current working directory tree. Don't write 'cd ../../..' redundantly, use bd instead.
- Host: GitHub
- URL: https://github.com/0rax/fish-bd
- Owner: 0rax
- License: mit
- Created: 2013-10-10T23:22:50.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-03-04T02:26:03.000Z (over 2 years ago)
- Last Synced: 2024-08-03T01:39:27.643Z (3 months ago)
- Topics: fish, fish-packages, fish-shell, shell
- Language: Shell
- Homepage:
- Size: 31.3 KB
- Stars: 139
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fish-bd
**Quickly go back to a parent directory up in your current working directory tree.**
**Don't write 'cd ../../..' redundantly, use bd instead.**This is a fish implementation of [vigneshwaranr/bd](https://github.com/vigneshwaranr/bd) by Vigneshwaran Raveendran.
## Usage
```
# fish-bd v1.3.3 (https://github.com/0rax/bd-fish)Description:
Quickly go back to a parent directory up in your current working directory tree.
Don't write 'cd ../../..' redundantly, use bd instead.Usage:
bd [option]Examples:
# You are in /home/user/my/path/is/very/long/
# And you want to go back to 'path', simple type
> bd path
# or
> bd -s pa
# or
> bd -i Pat
# And you are now in /home/user/my/path/Options:
-c
Classic mode : goes back to the first directory matching the pattern (default)
Set if default using (set -gx BD_OPT 'classic')
Default mode when BD_OPT or CLI options are specified
-s
Seems mode: goes back to the first directory starting with pattern
Set it as default using (set -gx BD_OPT 'sensitive')
-i
Case insensitive mode: same as seems mode without case sensitity
Set it as default using (set -gx BD_OPT 'insensitive')
-h Print this help and exitNote:
Fuzzy matching of a directory can be done with any mode using the built-in
fish-shell autocompletion. This allows you to enter any part of the path
and still match it
```## Installation
### Using [Fisher](https://github.com/jorgebucaran/fisher) (recommended method)
```sh
# This method allows you to update bd automatically via `fisher`
fisher install 0rax/fish-bd
```### Using Symlinks
```sh
# This method allows you to update narwhal by just doing a 'git pull'
git clone https://github.com/0rax/fish-bd ~/.config/fish/fish-bd
mkdir -p ~/.config/fish/functions/ ~/.config/fish/completions/
ln -s ~/.config/fish/fish-bd/functions/bd.fish ~/.config/fish/functions/
ln -s ~/.config/fish/fish-bd/completions/bd.fish ~/.config/fish/completions/
```### Using Make
```sh
make install # Assumes your fish config directory is '~/.config/fish'
```### Manual Install
```sh
set -l FISH_CONFIG_FOLDER ~/.config/fish/
cp functions/bd.fish $FISH_CONFIG_FOLDER/functions/
cp completions/bd.fish $FISH_CONFIG_FOLDER/completions/
```## License
`fish-bd` is MIT licensed. See [LICENSE](LICENSE).