mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
Updated Examples (markdown)
@@ -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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user