From 4f49c40f2721c1477cf029711e4bebd1af5a1a02 Mon Sep 17 00:00:00 2001 From: AmirHossein Habibvand Date: Sun, 26 Apr 2020 16:17:55 +0430 Subject: [PATCH 1/6] Fix right prompt git commit count --- fish_greeting.fish | 2 +- fish_prompt.fish | 18 +++--- fish_right_prompt.fish | 128 ++++++++++++++++++++++++++++++++--------- fish_title.fish | 4 +- 4 files changed, 112 insertions(+), 40 deletions(-) diff --git a/fish_greeting.fish b/fish_greeting.fish index a611263..b073587 100644 --- a/fish_greeting.fish +++ b/fish_greeting.fish @@ -1,3 +1,3 @@ function fish_greeting - echo (__batman_color_dim)(uname -mnprs)(__batman_color_off) + echo (__batman_color_dim)(uname -mnprs)(__batman_color_off) end diff --git a/fish_prompt.fish b/fish_prompt.fish index 57b7ed1..7e29580 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -1,20 +1,20 @@ function fish_prompt - test $status -ne 0; + test $status -ne 0 and set -l colors 600 900 c00 or set -l colors 333 666 aaa - set -l pwd (prompt_pwd) - set -l base (basename "$pwd") + set -l pwd (prompt_pwd) + set -l base (basename "$pwd") - set -l expr "s|~|"(__batman_color_fst)"^^"(__batman_color_off)"|g; \ + set -l expr "s|~|"(__batman_color_fst)"^^"(__batman_color_off)"|g; \ s|/|"(__batman_color_snd)"/"(__batman_color_off)"|g; \ s|"$base"|"(__batman_color_fst)$base(__batman_color_off)" |g" - echo -n (echo "$pwd" | sed -e $expr)(__batman_color_off) + echo -n (echo "$pwd" | sed -e $expr)(__batman_color_off) - for color in $colors - echo -n (set_color $color)">" - end + for color in $colors + echo -n (set_color $color)">" + end - echo -n " " + echo -n " " end diff --git a/fish_right_prompt.fish b/fish_right_prompt.fish index 5b2b6bb..4a7313a 100644 --- a/fish_right_prompt.fish +++ b/fish_right_prompt.fish @@ -1,43 +1,115 @@ function git::is_stashed - command git rev-parse --verify --quiet refs/stash >/dev/null + command git rev-parse --verify --quiet refs/stash >/dev/null end -function git::get_ahead_count - echo (command git log 2> /dev/null | grep '^commit' | wc -l | tr -d " ") +function git::print::is_stashed + if git::is_stashed + echo (__batman_color_trd)"^"(__batman_color_off) + else + echo "" + end end function git::branch_name - command git symbolic-ref --short HEAD + if git symbolic-ref --short HEAD >/dev/null 2>&1 + echo (command git symbolic-ref --short HEAD 2> /dev/null) + else + echo (command git rev-parse --short HEAD) + end end -function git::is_touched - test -n (echo (command git status --porcelain)) +function git::print::branch_name + echo (__batman_color_fst)(git::branch_name) end -function fish_right_prompt - set -l code $status - test $code -ne 0; and echo (__batman_color_dim)"("(__batman_color_trd)"$code"(__batman_color_dim)") "(__batman_color_off) - - if test -n "$SSH_CONNECTION" - printf (__batman_color_trd)":"(__batman_color_dim)"$HOSTNAME "(__batman_color_off) - end +function git::is_touched + test -n (echo (command git status --porcelain)) +end - if git rev-parse 2> /dev/null - git::is_stashed; and echo (__batman_color_trd)"^"(__batman_color_off) - printf (__batman_color_snd)"("(begin - if git::is_touched +function git::print::is_touched + if git::is_touched echo (__batman_color_trd)"*"(__batman_color_off) - else + else echo "" - end - end)(__batman_color_fst)(git::branch_name)(__batman_color_snd)(begin - set -l count (git::get_ahead_count) - if test $count -eq 0 - echo "" - else - echo (__batman_color_trd)"+"(__batman_color_fst)$count + end +end + +function git::remote_info + + set -l branch $argv[1] + set -l remote_name (git config branch.$branch.remote) + + if test -n "$remote_name" + set merge_name (git config branch.$branch.merge) + set merge_name_short (echo $merge_name | cut -c 12-) + else + set remote_name "origin" + set merge_name "refs/heads/$branch" + set merge_name_short $branch + end + + if test $remote_name = '.' # local + set remote_ref $merge_name + else + set remote_ref "refs/remotes/$remote_name/$merge_name_short" + end + + set -l rev_git (eval "git rev-list --left-right $remote_ref...HEAD" ^/dev/null) + if test $status != "0" + set rev_git (eval "git rev-list --left-right $merge_name...HEAD" ^/dev/null) + end + + for i in $rev_git + if echo $i | grep '>' >/dev/null + set isAhead $isAhead ">" end - end)(__batman_color_snd)") "(__batman_color_off) - end - printf (__batman_color_dim)(date +%H(__batman_color_fst):(__batman_color_dim)%M(__batman_color_fst):(__batman_color_dim)%S)(__batman_color_off)" " + end + + set -l remote_diff (count $rev_git) + set -l ahead (count $isAhead) + set -l behind (math $remote_diff - $ahead) + + echo $ahead + echo $behind + +end + +function git::print::remote_info + + set -l remote (git::remote_info (git::branch_name)) + set -l ahead $remote[1] + set -l behind $remote[2] + + if test $ahead != "0" + echo (__batman_color_trd)" +"(__batman_color_fst)$ahead + end + + if test $behind != "0" + echo (__batman_color_trd)" -"(__batman_color_fst)$behind + end +end + +function git::print + if git rev-parse 2>/dev/null + echo (git::print::is_stashed) + echo (__batman_color_snd)"(" + echo (git::print::is_touched) + echo (git::print::branch_name) + echo (git::print::remote_info) + echo (__batman_color_snd)") " + echo (__batman_color_off) + end +end + +function fish_right_prompt + set -l code $status + test $code -ne 0; and echo (__batman_color_dim)"("(__batman_color_trd)"$code"(__batman_color_dim)") "(__batman_color_off) + + if test -n "$SSH_CONNECTION" + printf (__batman_color_trd)":"(__batman_color_dim)"$HOSTNAME "(__batman_color_off) + end + + git::print + + printf (__batman_color_dim)(date +%H(__batman_color_fst):(__batman_color_dim)%M(__batman_color_fst):(__batman_color_dim)%S)(__batman_color_off)" " end diff --git a/fish_title.fish b/fish_title.fish index 34e2c5d..04e97c5 100644 --- a/fish_title.fish +++ b/fish_title.fish @@ -1,3 +1,3 @@ function fish_title - echo "$PWD | $_" | sed "s|$HOME|~|g" -end \ No newline at end of file + echo "$PWD | $_" | sed "s|$HOME|~|g" +end From 17fb91a6113c51254a81dbca4acbbdf9d3370db9 Mon Sep 17 00:00:00 2001 From: AmirHossein Habibvand Date: Mon, 27 Apr 2020 12:59:57 +0430 Subject: [PATCH 2/6] Update readme --- LICENSE | 2 +- README.md | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index 03c1daf..18d9835 100644 --- a/LICENSE +++ b/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index c5945ce..9e3ab55 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + #### Batman > A [Oh My Fish][omf-link] theme inspired by Batman. @@ -20,7 +20,7 @@ _From left to right:_ + `^` character denotes the current repository has [_stashed_](https://git-scm.com/book/no-nb/v1/Git-Tools-Stashing) changes. + `*` character denotes the current repository is dirty. + Display current branch. -+ Display number of commits in relation to the current branch. ++ Display number of commits in relation to the origin of current branch. + Display current time. + _Batman_ inspired colors. @@ -36,7 +36,6 @@ _From left to right:_ > __Disclaimer:__ This work is not intended to infringe on any rights by and of the companies and/or individuals involved in the production of any series mentioned here. I don't own Batman. - [mit]: http://opensource.org/licenses/MIT [author]: http://about.bucaran.me [omf-link]: https://www.github.com/oh-my-fish/oh-my-fish From e48794bb58e7609ed9ff2974502c2d03921d91d3 Mon Sep 17 00:00:00 2001 From: AmirHossein Habibvand Date: Mon, 27 Apr 2020 13:00:08 +0430 Subject: [PATCH 3/6] Fix color names --- fish_greeting.fish | 16 +++++++++++++++- fish_prompt.fish | 12 ++++++------ fish_right_prompt.fish | 22 +++++++++++----------- functions/__batman_color_dim.fish | 1 - functions/__batman_color_fst.fish | 1 - functions/__batman_color_off.fish | 1 - functions/__batman_color_snd.fish | 1 - functions/__batman_color_trd.fish | 1 - functions/__color_dim.fish | 1 + functions/__color_off.fish | 1 + functions/__color_primary.fish | 1 + functions/__color_secondary.fish | 1 + functions/__color_tertiary.fish | 1 + 13 files changed, 37 insertions(+), 23 deletions(-) delete mode 100644 functions/__batman_color_dim.fish delete mode 100644 functions/__batman_color_fst.fish delete mode 100644 functions/__batman_color_off.fish delete mode 100644 functions/__batman_color_snd.fish delete mode 100644 functions/__batman_color_trd.fish create mode 100644 functions/__color_dim.fish create mode 100644 functions/__color_off.fish create mode 100644 functions/__color_primary.fish create mode 100644 functions/__color_secondary.fish create mode 100644 functions/__color_tertiary.fish diff --git a/fish_greeting.fish b/fish_greeting.fish index b073587..5ba75bb 100644 --- a/fish_greeting.fish +++ b/fish_greeting.fish @@ -1,3 +1,17 @@ function fish_greeting - echo (__batman_color_dim)(uname -mnprs)(__batman_color_off) + echo ' '(set_color F00)'___ + ___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)') +/T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)') '(set_color red)(whoami)'@'(hostname)' +[ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')'(set_color yellow)' Uptime:'(set_color white)(uptime | sed 's/.*up \([^,]*\), .*/\1/')(set_color red)' + \ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)') IP Address: '(set_color white)(curl -s http://checkip.dyndns.org/ | sed 's/[a-zA-Z<>/ :]//g')(set_color red)' + \\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\) '(set_color yellow)'Version: '(set_color white)(echo $FISH_VERSION)(set_color red)' + \_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\ + '(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J'(set_color FF7F00)'~~~'(set_color FF0)'~~ '(set_color FF7F00)'\\ + (-'(set_color FF0)'\)'(set_color F00)'\='(set_color FF7F00)'|'(set_color FF0)'\\\\\\'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color FF7F00)'L_'(set_color FF0)'_ + '(set_color FF7F00)'('(set_color F00)'\\'(set_color FF7F00)'\\) ('(set_color FF0)'\\'(set_color FF7F00)'\\\)'(set_color F00)'_ '(set_color FF0)'\=='(set_color FF7F00)'__ + '(set_color F00)'\V '(set_color FF7F00)'\\\\'(set_color F00)'\) =='(set_color FF7F00)'=_____ '(set_color FF0)'\\\\\\\\'(set_color FF7F00)'\\\\ + '(set_color F00)'\V) \_) '(set_color FF7F00)'\\\\'(set_color FF0)'\\\\JJ\\'(set_color FF7F00)'J\) + '(set_color F00)'/'(set_color FF7F00)'J'(set_color FF0)'\\'(set_color FF7F00)'J'(set_color F00)'T\\'(set_color FF7F00)'JJJ'(set_color F00)'J) + (J'(set_color FF7F00)'JJ'(set_color F00)'| \UUU) + (UU)'(set_color normal) end diff --git a/fish_prompt.fish b/fish_prompt.fish index 7e29580..7387756 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -1,16 +1,16 @@ function fish_prompt test $status -ne 0 - and set -l colors 600 900 c00 - or set -l colors 333 666 aaa + and set -l colors 600 900 c00 + or set -l colors 333 666 aaa set -l pwd (prompt_pwd) set -l base (basename "$pwd") - set -l expr "s|~|"(__batman_color_fst)"^^"(__batman_color_off)"|g; \ - s|/|"(__batman_color_snd)"/"(__batman_color_off)"|g; \ - s|"$base"|"(__batman_color_fst)$base(__batman_color_off)" |g" + set -l expr "s|~|"(__color_primary)"^^"(__color_off)"|g; \ + s|/|"(__color_secondary)"/"(__color_off)"|g; \ + s|"$base"|"(__color_primary)$base(__color_off)" |g" - echo -n (echo "$pwd" | sed -e $expr)(__batman_color_off) + echo -n (echo "$pwd" | sed -e $expr)(__color_off) for color in $colors echo -n (set_color $color)">" diff --git a/fish_right_prompt.fish b/fish_right_prompt.fish index 4a7313a..0881ed4 100644 --- a/fish_right_prompt.fish +++ b/fish_right_prompt.fish @@ -4,7 +4,7 @@ end function git::print::is_stashed if git::is_stashed - echo (__batman_color_trd)"^"(__batman_color_off) + echo (__color_tertiary)"^"(__color_off) else echo "" end @@ -19,7 +19,7 @@ function git::branch_name end function git::print::branch_name - echo (__batman_color_fst)(git::branch_name) + echo (__color_primary)(git::branch_name) end function git::is_touched @@ -28,7 +28,7 @@ end function git::print::is_touched if git::is_touched - echo (__batman_color_trd)"*"(__batman_color_off) + echo (__color_tertiary)"*"(__color_off) else echo "" end @@ -81,35 +81,35 @@ function git::print::remote_info set -l behind $remote[2] if test $ahead != "0" - echo (__batman_color_trd)" +"(__batman_color_fst)$ahead + echo (__color_tertiary)" +"(__color_primary)$ahead end if test $behind != "0" - echo (__batman_color_trd)" -"(__batman_color_fst)$behind + echo (__color_tertiary)" -"(__color_primary)$behind end end function git::print if git rev-parse 2>/dev/null echo (git::print::is_stashed) - echo (__batman_color_snd)"(" + echo (__color_secondary)"(" echo (git::print::is_touched) echo (git::print::branch_name) echo (git::print::remote_info) - echo (__batman_color_snd)") " - echo (__batman_color_off) + echo (__color_secondary)") " + echo (__color_off) end end function fish_right_prompt set -l code $status - test $code -ne 0; and echo (__batman_color_dim)"("(__batman_color_trd)"$code"(__batman_color_dim)") "(__batman_color_off) + test $code -ne 0; and echo (__color_dim)"("(__color_tertiary)"$code"(__color_dim)") "(__color_off) if test -n "$SSH_CONNECTION" - printf (__batman_color_trd)":"(__batman_color_dim)"$HOSTNAME "(__batman_color_off) + printf (__color_tertiary)":"(__color_dim)"$HOSTNAME "(__color_off) end git::print - printf (__batman_color_dim)(date +%H(__batman_color_fst):(__batman_color_dim)%M(__batman_color_fst):(__batman_color_dim)%S)(__batman_color_off)" " + printf (__color_dim)(date +%H(__color_primary):(__color_dim)%M(__color_primary):(__color_dim)%S)(__color_off)" " end diff --git a/functions/__batman_color_dim.fish b/functions/__batman_color_dim.fish deleted file mode 100644 index 53f5ab1..0000000 --- a/functions/__batman_color_dim.fish +++ /dev/null @@ -1 +0,0 @@ -function __batman_color_dim; set_color 666; end diff --git a/functions/__batman_color_fst.fish b/functions/__batman_color_fst.fish deleted file mode 100644 index f9556f1..0000000 --- a/functions/__batman_color_fst.fish +++ /dev/null @@ -1 +0,0 @@ -function __batman_color_fst; set_color -o fa0; end diff --git a/functions/__batman_color_off.fish b/functions/__batman_color_off.fish deleted file mode 100644 index 4b1e4c4..0000000 --- a/functions/__batman_color_off.fish +++ /dev/null @@ -1 +0,0 @@ -function __batman_color_off; set_color normal; end diff --git a/functions/__batman_color_snd.fish b/functions/__batman_color_snd.fish deleted file mode 100644 index 591cf80..0000000 --- a/functions/__batman_color_snd.fish +++ /dev/null @@ -1 +0,0 @@ -function __batman_color_snd; set_color -o 36f; end diff --git a/functions/__batman_color_trd.fish b/functions/__batman_color_trd.fish deleted file mode 100644 index e3c8d25..0000000 --- a/functions/__batman_color_trd.fish +++ /dev/null @@ -1 +0,0 @@ -function __batman_color_trd; set_color -o f06; end diff --git a/functions/__color_dim.fish b/functions/__color_dim.fish new file mode 100644 index 0000000..05b6d5a --- /dev/null +++ b/functions/__color_dim.fish @@ -0,0 +1 @@ +function __color_dim; set_color 666; end diff --git a/functions/__color_off.fish b/functions/__color_off.fish new file mode 100644 index 0000000..c82d6db --- /dev/null +++ b/functions/__color_off.fish @@ -0,0 +1 @@ +function __color_off; set_color normal; end diff --git a/functions/__color_primary.fish b/functions/__color_primary.fish new file mode 100644 index 0000000..a77ed40 --- /dev/null +++ b/functions/__color_primary.fish @@ -0,0 +1 @@ +function __color_primary; set_color -o fa0; end diff --git a/functions/__color_secondary.fish b/functions/__color_secondary.fish new file mode 100644 index 0000000..c34fe78 --- /dev/null +++ b/functions/__color_secondary.fish @@ -0,0 +1 @@ +function __color_secondary; set_color -o 36f; end diff --git a/functions/__color_tertiary.fish b/functions/__color_tertiary.fish new file mode 100644 index 0000000..0c1d9cf --- /dev/null +++ b/functions/__color_tertiary.fish @@ -0,0 +1 @@ +function __color_tertiary; set_color -o f06; end From 4c154a2d61cc91f6253a7dde4c7023a589cc0f4d Mon Sep 17 00:00:00 2001 From: AmirHossein Habibvand Date: Mon, 27 Apr 2020 13:15:50 +0430 Subject: [PATCH 4/6] Remove greeting --- fish_greeting.fish | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/fish_greeting.fish b/fish_greeting.fish index 5ba75bb..da92d24 100644 --- a/fish_greeting.fish +++ b/fish_greeting.fish @@ -1,17 +1,3 @@ function fish_greeting - echo ' '(set_color F00)'___ - ___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)') -/T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)') '(set_color red)(whoami)'@'(hostname)' -[ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')'(set_color yellow)' Uptime:'(set_color white)(uptime | sed 's/.*up \([^,]*\), .*/\1/')(set_color red)' - \ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)') IP Address: '(set_color white)(curl -s http://checkip.dyndns.org/ | sed 's/[a-zA-Z<>/ :]//g')(set_color red)' - \\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\) '(set_color yellow)'Version: '(set_color white)(echo $FISH_VERSION)(set_color red)' - \_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\ - '(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J'(set_color FF7F00)'~~~'(set_color FF0)'~~ '(set_color FF7F00)'\\ - (-'(set_color FF0)'\)'(set_color F00)'\='(set_color FF7F00)'|'(set_color FF0)'\\\\\\'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color FF7F00)'L_'(set_color FF0)'_ - '(set_color FF7F00)'('(set_color F00)'\\'(set_color FF7F00)'\\) ('(set_color FF0)'\\'(set_color FF7F00)'\\\)'(set_color F00)'_ '(set_color FF0)'\=='(set_color FF7F00)'__ - '(set_color F00)'\V '(set_color FF7F00)'\\\\'(set_color F00)'\) =='(set_color FF7F00)'=_____ '(set_color FF0)'\\\\\\\\'(set_color FF7F00)'\\\\ - '(set_color F00)'\V) \_) '(set_color FF7F00)'\\\\'(set_color FF0)'\\\\JJ\\'(set_color FF7F00)'J\) - '(set_color F00)'/'(set_color FF7F00)'J'(set_color FF0)'\\'(set_color FF7F00)'J'(set_color F00)'T\\'(set_color FF7F00)'JJJ'(set_color F00)'J) - (J'(set_color FF7F00)'JJ'(set_color F00)'| \UUU) - (UU)'(set_color normal) + echo -n '' end From 28aec223a80d46e4e43e760f731d48efda8bc9c2 Mon Sep 17 00:00:00 2001 From: AmirHossein Habibvand Date: Fri, 27 Aug 2021 15:51:15 +0430 Subject: [PATCH 5/6] Fix right prompt remote info --- fish_right_prompt.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fish_right_prompt.fish b/fish_right_prompt.fish index 0881ed4..523c7f7 100644 --- a/fish_right_prompt.fish +++ b/fish_right_prompt.fish @@ -54,9 +54,9 @@ function git::remote_info set remote_ref "refs/remotes/$remote_name/$merge_name_short" end - set -l rev_git (eval "git rev-list --left-right $remote_ref...HEAD" ^/dev/null) + set -l rev_git (eval "git rev-list --left-right $remote_ref...HEAD") if test $status != "0" - set rev_git (eval "git rev-list --left-right $merge_name...HEAD" ^/dev/null) + set rev_git (eval "git rev-list --left-right $merge_name...HEAD") end for i in $rev_git From fd41bb6aacbcca95023bd21db7815da936251fbf Mon Sep 17 00:00:00 2001 From: AmirHossein Habibvand Date: Wed, 26 Oct 2022 16:33:38 +0330 Subject: [PATCH 6/6] Fix right prompt remote info --- fish_right_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish_right_prompt.fish b/fish_right_prompt.fish index 523c7f7..e605ac2 100644 --- a/fish_right_prompt.fish +++ b/fish_right_prompt.fish @@ -54,7 +54,7 @@ function git::remote_info set remote_ref "refs/remotes/$remote_name/$merge_name_short" end - set -l rev_git (eval "git rev-list --left-right $remote_ref...HEAD") + set -l rev_git (eval "git rev-list --left-right $remote_ref...HEAD" 2> /dev/null) if test $status != "0" set rev_git (eval "git rev-list --left-right $merge_name...HEAD") end