mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 00:53:42 -05:00
Handle commands with backslash and history from other instances
@@ -252,14 +252,14 @@ ag --nobreak --nonumbers --noheading . | fzf
|
|||||||
```sh
|
```sh
|
||||||
# fh - repeat history
|
# fh - repeat history
|
||||||
fh() {
|
fh() {
|
||||||
eval $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed 's/ *[0-9]* *//')
|
eval $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -r 's/ *[0-9]*\*? *//' | sed -r 's/\\/\\\\/g')
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# fh - repeat history
|
# fh - repeat history
|
||||||
fh() {
|
fh() {
|
||||||
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed 's/ *[0-9]* *//')
|
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -r 's/ *[0-9]*\*? *//' | sed -r 's/\\/\\\\/g')
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user