Evaluate PowerShell expression to calculate link destination #72
Closed
AdamYellen
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
Hey, I'm not sure how well this would work with other shells. My hope is that most needs like this will be met by the available variables in the templating engine. I've added a lot more in the latest release. If thats not enough I think a new templating function like windows:
links:
powershell.config.json: {{ #if (eq os "windows") }}{{ eval '"$(Split-Path $PROFILE.CurrentUserCurrentHost)\powershell.config.json"' }}{{ /if }} Maybe for convenience also some helper functions that simplity the windows:
links:
powershell.config.json: {{ #windows }}{{ eval '"$(Split-Path $PROFILE.CurrentUserCurrentHost)\powershell.config.json"' }}{{ /windows }} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes the link destination isn't a straight forward path. E.g.
(Split-Path $PROFILE.CurrentUserCurrentHost)\powershell.config.json
How does rotz compute the destination? From my experimenting it does accept
~
but it's not clear to me what else is possible.Does it make sense to evaluate the destination string before the link operation?
Beta Was this translation helpful? Give feedback.
All reactions