Tweaks
This commit is contained in:
parent
4f0ed58b27
commit
f5ebe5f2b8
15
README.md
15
README.md
@ -93,12 +93,17 @@ documentation](API.md) or by running `man bbcmd` after installing.
|
|||||||
|
|
||||||
Applications cannot change the shell's working directory on their own, but you
|
Applications cannot change the shell's working directory on their own, but you
|
||||||
can define a shell function that uses the shell's builtin `cd` function on the
|
can define a shell function that uses the shell's builtin `cd` function on the
|
||||||
output of `bb -d` (print directory on exit). For bash (or sh, zsh, etc.), you can
|
output of `bb -d` (print directory on exit). For bash or sh, you can put the
|
||||||
put the following function in your `~/.profile` (or `~/.bashrc`, `~/.zshrc`,
|
following function in your `~/.bashrc`:
|
||||||
etc.):
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
function bcd() { cd "$(bb -d "$@" <$TTY)"; }
|
function bcd() { cd "$(bb -d "$@")"; }
|
||||||
|
```
|
||||||
|
|
||||||
|
Zsh is slightly different and requires the following in your `~/.zshrc`:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
bcd() { cd "$(bb -d "$@" <$TTY)"; }
|
||||||
```
|
```
|
||||||
|
|
||||||
For [fish](https://fishshell.com/) (v3.0.0+), you can put this in your
|
For [fish](https://fishshell.com/) (v3.0.0+), you can put this in your
|
||||||
@ -119,7 +124,7 @@ handled by your shell. Here are some examples for binding `Ctrl-b` to launch
|
|||||||
above). For sh and bash, put this in your `~/.profile`:
|
above). For sh and bash, put this in your `~/.profile`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
function bcd() { cd "$(bb -d "$@" <$TTY)"; }
|
function bcd() { cd "$(bb -d "$@")"; }
|
||||||
bind '"\C-b":"bcd\n"'
|
bind '"\C-b":"bcd\n"'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user