简体   繁体   中英

Aliases in OSX Terminal, unable to find PhpStorm 2 Application

I have used this "ea" alias with previous versions of PhpStorm but since the change to "PhpStorm 2" it doesn't work anymore, any suggestions?

My current setting is:

alias phpstorm="PhpStorm 2"
alias ea='open -a phpstorm ~/ .aliases'

The terminal output is:

// Calling the alias
ea

// Output error
Unable to find application named 'phpstorm'

PS Even if I escape the name like this, it doesn't find the application:

alias phpstorm="PhpStorm\ 2"

Try: open -a application_name

Keep in mind that 'PhpStorm 2' is not a valid binary in your PATH. With '-a' you are telling to 'open' look for an application with that name, which 'Phpstorm 2' is.

This works now for me :)

alias ps2="open -a PhpStorm\ 2"

alias ea='ps2 .aliases'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM