Rust2015
V2EX  ›  Java

IDEA 在 Mac 下如何用命令行打开:

  •  
  •   Rust2015 · Sep 30, 2024 · 4483 views
    This topic created in 624 days ago, the information mentioned may be changed or developed.

    如 vscode 那样,code . IDEA 能否像它那样,idea .

    我在网上看了很多资料,还是没有成功

    9 replies    2024-10-01 13:47:56 +08:00
    Immortal
        1
    Immortal  
       Sep 30, 2024
    工具->创建命令行启动器
    TaurusXin
        2
    TaurusXin  
       Sep 30, 2024
    建议使用 Toolbox ,在工具里面可以生成 Shell 脚本
    xarthur
        3
    xarthur  
       Sep 30, 2024
    /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea
    ysc3839
        4
    ysc3839  
       Sep 30, 2024
    open IDEA.app ?
    vkillwucy
        5
    vkillwucy  
       Sep 30, 2024 via Android
    生成 shell 后对应目录,idea .就好啦
    dozer47528
        6
    dozer47528  
       Sep 30, 2024
    上面说的 2 个方法都行,但我还是习惯自己设置 alias

    if [ -d '/Applications/Visual Studio Code.app' ]; then
    alias vs="open -a '/Applications/Visual Studio Code.app'"
    fi
    if [ -d '/Applications/IntelliJ IDEA.app' ]; then
    alias idea="open -a '/Applications/IntelliJ IDEA.app'"
    fi
    if [ -d '/Applications/WebStorm.app' ]; then
    alias webstorm="open -a '/Applications/WebStorm.app'"
    fi
    if [ -d '/Applications/GoLand.app' ]; then
    alias goland="open -a '/Applications/GoLand.app'"
    fi
    yiqiao
        7
    yiqiao  
       Sep 30, 2024
    phpstorm 是可以这样的,idea 应该也可以。
    ` alias phpstorm='open -a PhpStorm' `
    8355
        8
    8355  
       Sep 30, 2024
    @xinge666 快清缓存,我控制不住了。
    z1645444
        9
    z1645444  
       Oct 1, 2024
    官方的说法: https://www.jetbrains.com/help/idea/working-with-the-ide-features-from-command-line.html#arguments
    主要看 Launcher for a standalone instance 的部分,找到对应的系统

    如果是 macOS ,直接往对应 shell 的 dotfile 里加入 export PATH="/Applications/GoLand.app/Contents/MacOS:$PATH" 就好了,这里是以 GoLand 为例
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3173 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 61ms · UTC 13:05 · PVG 21:05 · LAX 06:05 · JFK 09:05
    ♥ Do have faith in what you're doing.