Question
How to configure the directory to be shortened, like only folder name should be displayed.
Answer
In 2024.2, IntelliJ IDEA supports using Shell prompt in the new Terminal Which means we can set zsh to use shorten prompt. Then it will apply to IntelliJ IDEA Terminal.
Steps:
- Open IntelliJ IDEA Terminal or Mac OS Terminal.
- run
vi ~/.zshrcin Terminal - Press 'I' on your keyboard to change to insert mode
- type
PROMPT='%1~ %# ' - Press 'ESC', then press
:wqto save and quit - run
source ~/.zshrcin Terminal - restart IntelliJ IDEA
- If Terminal engine is set to Experimental 2024 (deprecated), go to Settings | Tools | Terminal, set as below
Comments
0 comments
Please sign in to leave a comment.