diff --git a/conf.d/forgit.plugin.fish b/conf.d/forgit.plugin.fish index 43bef8c..d6bede5 100644 --- a/conf.d/forgit.plugin.fish +++ b/conf.d/forgit.plugin.fish @@ -42,7 +42,7 @@ function forgit::log -d "git commit viewer" $FORGIT_FZF_DEFAULT_OPTS +s +m --tiebreak=index --bind=\"enter:execute($cmd |env LESS='-r' less)\" - --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' | $copy_cmd)\" + --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]' |$copy_cmd)\" $FORGIT_LOG_FZF_OPTS " @@ -259,7 +259,7 @@ function forgit::rebase -d "git rebase " set opts " $FORGIT_FZF_DEFAULT_OPTS +s +m --tiebreak=index - --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' |$copy_cmd)\" + --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]' |$copy_cmd)\" $FORGIT_REBASE_FZF_OPTS " eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" | diff --git a/forgit.plugin.zsh b/forgit.plugin.zsh index 4b799c6..94f75fd 100755 --- a/forgit.plugin.zsh +++ b/forgit.plugin.zsh @@ -22,7 +22,7 @@ forgit::log() { $FORGIT_FZF_DEFAULT_OPTS +s +m --tiebreak=index --bind=\"enter:execute($cmd | LESS='-r' less)\" - --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' |${FORGIT_COPY_CMD:-pbcopy})\" + --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]' |${FORGIT_COPY_CMD:-pbcopy})\" $FORGIT_LOG_FZF_OPTS " graph=--graph @@ -174,7 +174,7 @@ forgit::rebase() { opts=" $FORGIT_FZF_DEFAULT_OPTS +s +m --tiebreak=index - --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' |${FORGIT_COPY_CMD:-pbcopy})\" + --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '[:space:]' |${FORGIT_COPY_CMD:-pbcopy})\" $FORGIT_REBASE_FZF_OPTS " commit=$(eval "$cmd" | FZF_DEFAULT_OPTS="$opts" fzf --preview="$preview" |