m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-20 09:33:42 -05:00

Updated examples (markdown)

Thomas Frössman
2014-07-30 23:27:08 -07:00
parent 09613b7df6
commit 9a118cc3ce

@@ -155,6 +155,31 @@ z() {
} }
``` ```
Here is another version that also supports relaunching z with the arguments
for the previous command as the default input by using zz
```sh
z() {
if [[ -z "$*" ]]; then
cd "$(_z -l 2>&1 | sed -n 's/^[ 0-9.,]*//p' | fzf)"
else
_last_z_args="$@"
_z "$@"
fi
}
zz() {
cd "$(_z -l 2>&1 | sed -n 's/^[ 0-9.,]*//p' | fzf -q $_last_z_args)"
}
```
Since z is not very optimal located on a qwerty keyboard I have these aliased as j and jj
```sh
alias j=z
alias jj=zz
```
Vim scripts Vim scripts
=========== ===========