diff --git a/site-modules/core/files/oh-my-zsh/custom/sapling.zsh b/site-modules/core/files/oh-my-zsh/custom/sapling.zsh index a2ce6f2..a92a857 100644 --- a/site-modules/core/files/oh-my-zsh/custom/sapling.zsh +++ b/site-modules/core/files/oh-my-zsh/custom/sapling.zsh @@ -1,10 +1,12 @@ # Alias sl to s. This is so we can keep the workflow much the same as git. You # can mostly replace `g` with `s` and you are using sapling instead of git. alias s="\\sl" -alias sl="\\sl log --pager never --remote -T ' {graphnode} {ifeq(phase, \"public\", \"\\033[31m\", \"\\033[34m\")}{node|short}\\033[0m {truncatelonglines(desc|firstline, 80)} \\033[32m({date|age}) \\033[34;1m<{author|person}> {if(github_pull_request_number, \"\033[31mPR #{github_pull_request_number}\")}\\033[0m\n' -r '.::top() or last(::., 40)'" +alias sl="\\sl log --pager never --remote -r '.::top() or last(::., 40)'" alias sc="\\sl commit -iv" alias sd="\\sl diff" alias ss="\\sl status" +alias sco="\\sl log -r 'heads(draft())' -T'{node} {truncatelonglines(desc|firstline, 80)} <{author|person}>\n' | fzf | cut -d' ' -f1 | xargs \\sl goto" + function sl-convert() { if ! [ -d .git ]; then diff --git a/site-modules/core/templates/sapling.conf.liquid b/site-modules/core/templates/sapling.conf.liquid index d62a26d..6f26359 100644 --- a/site-modules/core/templates/sapling.conf.liquid +++ b/site-modules/core/templates/sapling.conf.liquid @@ -19,6 +19,8 @@ color = never # (see 'sl help pager' for details) #paginate = always +logtemplate = ' {graphnode} {ifeq(phase, "public", "\033[31m", "\033[34m")}{node|short}\033[0m {truncatelonglines(desc|firstline, 80)} \033[32m({date|age}) \033[34;1m<{author|person}>{if(github_pull_request_number, " \033[31mPR #{github_pull_request_number}")}\033[0m{if(bookmarks, " [{bookmarks}]")}\n' + # User delta as the pager so that the diff is highlighted nicely.in the # terminal. This give a better diff coloring than the built in sl pager, also # keeps things looking the same as git so I can keep the familiarity when