m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -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.
```sh
[[ "$OSTYPE" =~ darwin ]] && alias tac='tail -r'
unalias z 2> /dev/null
z() {
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
_z "$@"
fi
@@ -205,7 +203,7 @@ for the previous command as the default input by using zz
unalias z
z() {
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
_last_z_args="$@"
_z "$@"