m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Updated Examples (markdown)

Junegunn Choi
2015-02-19 23:13:03 +09:00
parent 0a196d9526
commit 87f21c6c6f

@@ -186,12 +186,10 @@ Integration with [z](https://github.com/rupa/z), like normal z when used with
arguments but displays an fzf prompt when used without. arguments but displays an fzf prompt when used without.
```sh ```sh
[[ "$OSTYPE" =~ darwin ]] && alias tac='tail -r'
unalias z 2> /dev/null unalias z 2> /dev/null
z() { z() {
if [[ -z "$*" ]]; then if [[ -z "$*" ]]; then
cd "$(_z -l 2>&1 | tac | fzf | sed 's/^[0-9,.]* *//')" cd "$(_z -l 2>&1 | fzf +s | sed 's/^[0-9,.]* *//')"
else else
_z "$@" _z "$@"
fi fi
@@ -205,7 +203,7 @@ for the previous command as the default input by using zz
unalias z unalias z
z() { z() {
if [[ -z "$*" ]]; then if [[ -z "$*" ]]; then
cd "$(_z -l 2>&1 | tac | fzf | sed 's/^[0-9,.]* *//')" cd "$(_z -l 2>&1 | fzf +s | sed 's/^[0-9,.]* *//')"
else else
_last_z_args="$@" _last_z_args="$@"
_z "$@" _z "$@"