Repo Relative Path Pt2 #2767
Unanswered
GavinOsborn
asked this question in
Troubleshoot
Replies: 1 comment
Not that trivial tbh. The main issue is that for this to work we need template functions to have access to the environment, and that's not easily achievable (in a clean, testable way). But, to be clear, this only needs to work in the path segment, right? So potentially, adding a function in the path segment that allows formatting the relative |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey, me again!
In #2717 we introduced the
.Git.Dirvariable that made it possible to build repo relative paths - thank you 😊.I'm wondering how feasible it would be to dial that up to eleven and support formatting the repo relative path with the same formatting options and styles generally supported by the
pathsegment?Lets say I have a git repo located at:
~/code/my-repoand my terminal session is currently navigating~/code/my-repo/source/website/images. Thanks to your previous update I can now calculate a repo relative path/source/website/images. What I don't seem to be able to do is then apply styles (agnoster, etc) to that path - I can only ever get the raw value.I can think of a couple of mental models for doing it but I've been unable to figure out a way to do it in v9.
pathsegment with the location we want it to consider the root of the path being evaluated (.Git.Dir)pathsegment could be updated to format non-rooted valuesIn either case I haven't figured out how to do this myself yet.
Is this already possible?
If not - does this seem like something that could realistically be supported?
All reactions