Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias can't be used on the same line as rez-env #708

Closed
JanRiebeAxis opened this issue Aug 30, 2019 · 3 comments
Closed

Alias can't be used on the same line as rez-env #708

JanRiebeAxis opened this issue Aug 30, 2019 · 3 comments
Labels
bug os:windows Windows-specific shell Shell related issues

Comments

@JanRiebeAxis
Copy link

We are observing some unexpected behaviour with the alias feature.

For the examples let's assume we are setting up a package 'alias_test' in which we define alias('alias_command', 'echo alias successfully excecuted')

When entering a rez shell that includes a package which sets an alias the alias can afterwards be used as expected.
Example:
C:\Users\me>rez-env alias_test

C:\Users\me>alias_command
C:\Users\me>alias successfully executed

However when running the alias command in the same line the alias is not recognised.
Example:
C:\Users\me>rez-env alias_test -- alias_command

C:\Users\me>'alias_command' is not recognized as an internal or external command,
operable program or batch file.

This was mentioned before in issue #389 but appears to still occur.

@instinct-vfx
Copy link
Contributor

This is currently expected because if you use the command syntax with -- (or -c) there is no actual shell created and hence doskey is never run. This works with the powershell and pwsh plugins. I am actually not sure if there is a really good way to support this.

@JanRiebeAxis
Copy link
Author

Thanks for the insight. That makes sense, though it would be a good feature to have.
As a workaround we are now considering to wrap commands into batch scripts, to act as an alias would, and append these to path in the rez package.

@JeanChristopheMorinPerso
Copy link
Member

Fixed by #948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug os:windows Windows-specific shell Shell related issues
Projects
None yet
Development

No branches or pull requests

3 participants