exit if there is no history
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
fzf_history_seach() {
|
fzf_history_seach() {
|
||||||
history -i 0 | fzf +s +m -x --tac -e | awk '{print substr($0, index($0, $4))}' | tr -d "\n"
|
local _history=$(history -i 0)
|
||||||
|
|
||||||
|
[[ -z "$_history" ]] && exit
|
||||||
|
|
||||||
|
echo -e "$_history"| fzf +s +m -x --tac -e | awk '{print substr($0, index($0, $4))}' | tr -d "\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload fzf_history_seach
|
autoload fzf_history_seach
|
||||||
|
|||||||
Reference in New Issue
Block a user