Rust2015
V2EX  ›  Java

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

  •  
  •   Rust2015 · Sep 30, 2024 · 5909 views
    This topic created in 770 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
    Immortal
    Sep 30, 2024
    1
    工具->创建命令行启动器
    TaurusXin
    TaurusXin
    Sep 30, 2024
    2
    建议使用 Toolbox ,在工具里面可以生成 Shell 脚本
    xarthur
    xarthur
    Sep 30, 2024
    3
    /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea
    ysc3839
    ysc3839
    Sep 30, 2024
    4
    open IDEA.app ?
    vkillwucy
    vkillwucy
    Sep 30, 2024 via Android
    5
    生成 shell 后对应目录,idea .就好啦
    dozer47528
    dozer47528
    Sep 30, 2024
    6
    上面说的 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
    yiqiao
    Sep 30, 2024
    7
    phpstorm 是可以这样的,idea 应该也可以。
    ` alias phpstorm='open -a PhpStorm' `
    8355
    8355
    Sep 30, 2024
    8
    @xinge666 快清缓存,我控制不住了。
    z1645444
    z1645444
    Oct 1, 2024
    9
    官方的说法: 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   ·   Privacy   ·   Solana   ·   4077 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 06:46 · PVG 14:46 · LAX 22:46 · JFK 01:46
    ♥ Do have faith in what you're doing.