Variable: pretty-sha-path-regexp
pretty-sha-path-regexp is a customizable variable defined in
pretty-sha-path.el.
Value
"/\\(?:gnu\\|nix\\)/store/\\([0-9a-df-np-sv-z]\\{32\\}\\)"
Documentation
Regexp matching SHA paths.
Disable pretty-sha-path-mode(var)/pretty-sha-path-mode(fun) before modifying this variable and
make sure to modify pretty-sha-path-regexp-group if needed.
Example of a "deeper" prettifying:
(setq pretty-sha-path-regexp "store/[[:alnum:]]\\\\\\={32\\\\}"
pretty-sha-path-regexp-group 0)
This will transform
'/gnu/store/72f54nfp6g1hz873w8z3gfcah0h4nl9p-foo-0.1' into
'/gnu/…-foo-0.1'
Source Code
;; Defined in /nix/store/0sidmpcpzq7hwxvxlmkbzsm399sak6g6-emacs-packages-deps/share/emacs/site-lisp/elpa/pretty-sha-path-20141105.1826/pretty-sha-path.el
(defcustom pretty-sha-path-regexp
(rx "/"
(or "nix" "gnu")
"/store/"
;; Hash-parts do not include "e", "o", "u" and "t". See base32Chars
;; at <https://github.com/NixOS/nix/blob/master/src/libutil/hash.cc>
(group (= 32 (any "0-9" "a-d" "f-n" "p-s" "v-z"))))
"Regexp matching SHA paths.
Disable `pretty-sha-path-mode' before modifying this variable and
make sure to modify `pretty-sha-path-regexp-group' if needed.
Example of a \"deeper\" prettifying:
(setq pretty-sha-path-regexp \"store/[[:alnum:]]\\\\\\={32\\\\}\"
pretty-sha-path-regexp-group 0)
This will transform
'/gnu/store/72f54nfp6g1hz873w8z3gfcah0h4nl9p-foo-0.1' into
'/gnu/…-foo-0.1'"
:type 'regexp
:group 'pretty-sha-path)