mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Added fix for git diff being off
This commit is contained in:
parent
6435a6d9d1
commit
6d2604e564
|
|
@ -137,10 +137,10 @@ _forgit_diff() {
|
|||
# oldfile\0
|
||||
# We have to do a two-step sed -> tr pipe because OSX's sed implementation does
|
||||
# not support the null-character directly.
|
||||
get_files="echo {} | sed 's/\\\\s*\\\\[.]\\\\s*//' | sed 's/ -> /\\\n/' | tr '\\\n' '\\\0'"
|
||||
get_files="echo {} | sed -e 's/^[[:space:]]*\\\\[[A-Z]\\\\][[:space:]]*//' | tr '\\\n' '\\\0'"
|
||||
# Similar to the line above, but only gets a single file from a single line
|
||||
# Gets the new name of renamed files
|
||||
get_file="echo {} | sed 's/\\\\s*\\\\[.]\\\\s*//' | sed 's/.*-> //'"
|
||||
get_file="echo {} | sed -e 's/^[[:space:]]*\\\\[[A-Z]\\\\][[:space:]]*//' | tr '\\\n' '\\\0'"
|
||||
# Git stashes are named "stash@{x}", which contains the fzf placeholder "{x}".
|
||||
# In order to support passing stashes as arguments to _forgit_diff, we have to
|
||||
# prevent fzf from interpreting this substring by escaping the opening bracket.
|
||||
|
|
|
|||
Loading…
Reference in a new issue