rioj7 / command-variable

Visual Studio Code extension for variable substitution via ${command:commandID}
51 stars 10 forks source link

get relative pathUp2 #7

Closed gbrueckl closed 3 years ago

gbrueckl commented 3 years ago

is it possible the the full relative path up two levels?

e.g. if my current file is /folder/second/third/file.txt I would like to get /folder/second

ideally there would be a solution similar to extension.commandvariable.file.fileDirBasenameXUp but returning the full path and not only the folder name X levels up

rioj7 commented 3 years ago

@gbrueckl See the updated README

gbrueckl commented 3 years ago

awesome, works like a charm! thanks for your quick response

gbrueckl commented 3 years ago

seems like extension.commandvariable.file.fileDirname1Up returns the full path, any way to also return the relative path from the workspace root?

rioj7 commented 3 years ago

@gbrueckl Look at version 1.11

I found your comment by visiting the email related to my github account.

Always best to mention the person with @ in your message. Most likely I get a notify on my github main page. (That I visit frequently)

gbrueckl commented 3 years ago

great, thanks again!