Skip to content

Commit

Permalink
Sandroid suggestion for new sed
Browse files Browse the repository at this point in the history
  • Loading branch information
cjappl committed Mar 12, 2024
1 parent 424acaa commit 3a036f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/git-forgit
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ _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 -e 's/^[[:space:]]*\\\\[[A-Z0-9]*\\\\][[:space:]]*//' | sed 's/.*-> //' | tr '\\\n' '\\\0'"
get_files="echo {} | sed -e 's/^[[:space:]]*\\\\[[A-Z0-9]*\\\\][[:space:]]*//' | sed 's/ -> /\\\n/' | 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 -e 's/^[[:space:]]*\\\\[[A-Z0-9]*\\\\][[:space:]]*//' | sed 's/.*-> //'"
Expand Down

0 comments on commit 3a036f9

Please sign in to comment.