Closed chshersh closed 11 months ago
I stumbled upon this repo from the OCaml reddit! Since you are using Core
already you might be able to replace your use of basename
process execution by using the basename
function in Core's Filename
library.
https://ocaml.org/p/core/latest/doc/Core/Filename/index.html#val-basename
Wow, @anuragsoni, that's super neat! Didn't know about this function 👀 Feel free to open a PR if you feel like it 🤗
Closed by:
Currently,
zbg
calls a separate processbasename
to extract the branch name.https://github.com/chshersh/zbg/blob/7b448631f76e014f70347dcd88fa1514e9d52657/lib/git.ml#L13-L14
However, this is unnecessary as it could be implemented as a pure function (maybe a filepath library already has it?).
The plan:
basename
into a separate function