Adds a max_length
property to the style "Agnoster Short" of "Path" segments
#5016
Labels
🚀 feat
New feature
Code of Conduct
What would you like to see changed/added?
In Path segment, the "Agnoster Short" style has a
max_depth
property:I would like to have a different property named
max_length
.So, when the full current working directory string has more than
max_length
characters, it renders the names of the last folders until it reachesmax_length
characters.Example:
Suppose that
max_length=36
and the current work directory isC:/Users/myUser/folder
Then, the length of the current work directory is:
22
if you count the separators,19
if you don't count separators.In any case, it is less than
36
, so it would display the full current working directory as a full string.Now, suppose that
max_length=36
and the current work directory isC:/Users/myUser/folder/subfolder/last_folder
Then, the length of the current work directory is:
44
if you count the separators,39
if you don't count separators.In any case, it is greater than
36
, so it would display the names of the last folders until the full string reaches <=36
characters, i.e.:C:/📁/📁/folder/subfolder/last_folder
(This has 35 characters if you count the separators, 30 if you don't count them)
hide_root_location
maybe?)Is that feasible?
The text was updated successfully, but these errors were encountered: