From 26c3ce0ef34440de9d8bd1febba1c692a39d13f8 Mon Sep 17 00:00:00 2001 From: dAu6jARL Date: Sat, 27 Jun 2020 20:20:55 +0900 Subject: [PATCH] default "sed" command in macOS Catalina don't support -r option. --- Examples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples.md b/Examples.md index c08abf1..6994880 100644 --- a/Examples.md +++ b/Examples.md @@ -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') } ```