mercurial: have "qcat" use "colordiff" for syntax higlighting
This commit is contained in:
@@ -143,6 +143,7 @@ in
|
||||
"cdecl" # like <https://cdecl.org>. `cdecl explain 'struct foo *const inst'`
|
||||
# "cdrtools"
|
||||
# "clinfo"
|
||||
"colordiff"
|
||||
# "dmidecode"
|
||||
"dtrx" # `unar` alternative, "Do The Right eXtraction"
|
||||
# "efivar"
|
||||
@@ -487,6 +488,8 @@ in
|
||||
"/var/lib/clightning/bitcoin/lightning-rpc"
|
||||
];
|
||||
|
||||
colordiff.sandbox.autodetectCliPaths = "existingFile"; # for `aplay ./file.wav`
|
||||
|
||||
# cryptsetup: typical use is `cryptsetup open /dev/loopxyz mappedName`, and creates `/dev/mapper/mappedName`
|
||||
cryptsetup.sandbox.extraPaths = [
|
||||
"/dev/mapper"
|
||||
|
@@ -4,6 +4,7 @@
|
||||
packageUnwrapped = pkgs.mercurialFull;
|
||||
sandbox.wrapperType = "inplace"; # etc/mercurial/hgrc refers to hg python-path (to define an extension)
|
||||
suggestedPrograms = [
|
||||
"colordiff" #< optional, for my hgrc aliases
|
||||
"less" #< TODO: this might be a missing dependency on the nix side of things?
|
||||
];
|
||||
sandbox.net = "clearnet";
|
||||
|
@@ -21,7 +21,7 @@ q = qseries -s -v
|
||||
qpath = !$HG noop ; echo ".hg/patches-$($HG qqueue --active)" | sed 's:hg/patches-patches:hg/patches:'
|
||||
#
|
||||
# `hg qcat PATCH_NAME`: view the diff of a mq patch in the current queue.
|
||||
qcat = !$HG noop ; cat $($HG qpath)/$1
|
||||
qcat = !$HG noop ; cat $($HG qpath)/$1 | colordiff --nobanner
|
||||
#
|
||||
# `hg qdup NEW_QUEUE_NAME`: copy all patches in the current queue into a new queue
|
||||
qdup = !$HG qpop -a ; cp -R $($HG qpath) .hg/patches-$1 ; echo $1 >> .hg/patches.queues ; $HG qqueue $1
|
||||
|
Reference in New Issue
Block a user