mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
default "sed" command in macOS Catalina don't support -r option.
@@ -341,14 +341,14 @@ Suggested by [@knoxknox](https://github.com/knoxknox)
|
||||
```sh
|
||||
# fh - repeat history
|
||||
fh() {
|
||||
eval $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -r 's/ *[0-9]*\*? *//' | sed -r 's/\\/\\\\/g')
|
||||
eval $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -E 's/ *[0-9]*\*? *//' | sed -E 's/\\/\\\\/g')
|
||||
}
|
||||
```
|
||||
|
||||
```sh
|
||||
# fh - repeat history
|
||||
fh() {
|
||||
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -r 's/ *[0-9]*\*? *//' | sed -r 's/\\/\\\\/g')
|
||||
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -E 's/ *[0-9]*\*? *//' | sed -E 's/\\/\\\\/g')
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user