Finding defined aliases from a package's commands section #1400
-
Hello. I'm finding myself in a situation where I need to define an alias which will in turn call another alias. A more concrete example:My Nuke package defines an alias
I feel like I could get around that possibly by creating a .bat file as an intermediary step (one alias pointing at the .bat, and the .bat using the other alias), and I'm about to try if this works, but the downside of that is that .bat files are windows only, and I'd have to make variants for other OSes if going this route. Edit: Can't use doskey aliases in .bat files apparently, so that's not the way either. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Note that this can become really really tricky, specifically in cmd and specifically if you need to do things like using environment variables as parameters in a bat file. You can end up in escape madness quickly. That said what about setting an env variable to the value of the alias when setting the alias and then looking for the env variable? |
Beta Was this translation helpful? Give feedback.
-
Yeah I landed on setting a NUKE_EXECUTABLE env var on the nuke package. Not
loving setting specific stuff upstream for downstream packages but I
couldn't quite think of a solution that wouldn't be less interdependent.
…On Mon, 17 Oct 2022, 23:16 Thorsten Kaufmann, ***@***.***> wrote:
Note that this can become really really tricky, specifically in cmd and
specifically if you need to do things like using environment variables as
parameters in a bat file. You can end up in escape madness quickly.
That said what about setting an env variable to the value of the alias
when setting the alias and then looking for the env variable?
—
Reply to this email directly, view it on GitHub
<#1400 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJAV5ASDADHY6LUJ3FWJPDWDY6EJANCNFSM6AAAAAARHS4XYY>
.
You are receiving this because you authored the thread.Message ID:
<AcademySoftwareFoundation/rez/repo-discussions/1400/comments/3902527@
github.com>
|
Beta Was this translation helpful? Give feedback.
Note that this can become really really tricky, specifically in cmd and specifically if you need to do things like using environment variables as parameters in a bat file. You can end up in escape madness quickly.
That said what about setting an env variable to the value of the alias when setting the alias and then looking for the env variable?