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

Spaces in Powershell alias #84

Open
mottosso opened this issue Aug 1, 2019 · 2 comments
Open

Spaces in Powershell alias #84

mottosso opened this issue Aug 1, 2019 · 2 comments
Labels

Comments

@mottosso
Copy link
Owner

mottosso commented Aug 1, 2019

This should but doesn't work.

alias("maya", r"c:\program files\autodesk\maya2018\bin\maya.exe")
@mottosso mottosso added the bug label Aug 1, 2019
@mottosso
Copy link
Owner Author

mottosso commented Aug 1, 2019

Hmm, no doesn't work with exe + arguments, like.

alias("mytext", "notepad c:\path to\some_document.txt")

@mottosso mottosso reopened this Aug 1, 2019
@mottosso
Copy link
Owner Author

mottosso commented Aug 1, 2019

The "solution" is to escape the paths you hand to your alias().

alias("maya", r"c:\program` files\autodesk\maya2018\bin\maya.exe")

Note the backtick character after c:\program. As this would only work on PowerShell aliases, there should probably be a dedicated function for escaping paths made available to a package.py.

E.g.

fname = escape_path(r"c:\program` files\autodesk\maya2018\bin\maya.exe")
alias("maya", fname + " -noAutoLoadPlugins")

Something separate from the subsequent arguments included in the alias itself.

@mottosso mottosso reopened this Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant