Questions on how the path segment's mapped_locations
feature works.
#690
-
Prerequisites
DescriptionThis is less of a Bug and more of a question on how things are expected to function with this particular feature (the path segment's Environment
My Questions
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Right now, the Example: will replace d:\dev\ohmyposh to \uf962\ohmyposh but you can't do something like this: and expects that it will replace the text dev anywhere in the path. I don't remember exactly why it wasn't done as we obviously discussed it in the issue related to ignore_folders. oh-my-posh/src/segment_path.go Line 187 in 52b66d1 |
Beta Was this translation helpful? Give feedback.
-
@lnu I tried but were too many side-effects we couldn't guarantee that to work as expected. |
Beta Was this translation helpful? Give feedback.
Right now, the
replaceMappedLocations
function checks if the current location starts with one of the prefix defined in mapped_locations and replaces it with a custom glyph/text.Example:
"mapped_locations": [
["D:\dev", "\uf962"],
],
will replace d:\dev\ohmyposh to \uf962\ohmyposh
but you can't do something like this:
"mapped_locations": [
["dev", "\uf962"],
],
and expects that it will replace the text dev anywhere in the path.
I don't remember exactly why it wasn't done as we obviously discussed it in the issue related to ignore_folders.
oh-my-posh/src/segment_path.go
Line 187 in 52b66d1