From 9b7b09183c014e01c6d9c565a2f2764a4b10b24c Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Sun, 22 Sep 2019 14:44:21 -0400 Subject: [PATCH] Fixed up zsh (but only for linux, cause macos sux) --- zsh/zshrc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index 9cc1aed..db4f67e 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -155,14 +155,9 @@ else fi function fzf_hist() { - local sed_cmd - if [[ $(uname -s) == "Darwin" ]]; then - sed_cmd='sed -E' - else - sed_cmd='sed -r' - fi - print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | $($sed_cmd 's/ *[0-9]*\*? *//') | ${sed_cmd} 's/\\/\\\\/g') + print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -r 's/ *[0-9]*\*? *//' | sed -r 's/\\/\\\\/g') } +bindkey -s "\C-r" "\eifzf_hist\n" export PATH="$PATH:$HOME/.anyenv/bin" eval "$(anyenv init -)"