필자는 home directory 에 .bash_profile에 alias를 설정해 놓은 것들이 있다.
예를 들어 아래와 같이 설정해두었기 때문에 해당 alias를 종종 사용하는 편인데,
IntelliJ Terminal에서는 사용이 불가능 했다.
alias opendir='explorer .'
alias gorepo='cd "C:\DEV"'
해결 방법
1. File > Settings > Tools > Terminal 에 shell path에 --login 옵션을 추가한다.
2. File > Settings > Tools > Terminal 에 shell path에 --rcfile ~/.bash_profile 옵션을 추가한다.
나와 같은 현상을 겪던 유저가 올려놓은 것인데, (해당 유저는 Pycharm을 사용함)
comment에서 --rcfile ~/.bash_profile 로 하면 된다는 것도 추가로 알 수 있었음.
보통 터미널을 열면 interactive 모드로 열리는데, interactive 모드는
사용자가 터미널(또는 콘솔)에서 실시간으로 명령어를 입력하고 그 결과를 즉시 확인할 수 있는 모드입니다.
근데 intelliJ에서는 non-interactive 모드로 열려서 .bash_profile은 읽지 않고 있었다.
https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
위의 글을 확인해보면 non-interactive mode에서는 .bashrc 만 읽는다고 한다.
따라서 --login 옵션을 주어 나의 custom setting이 들어가져 있는 .bash_profile이 적용되도록 하면 된다.
'정보' 카테고리의 다른 글
MSSQL 프로시저에 테이블명이 들어가 있는지 확인 (0) | 2022.08.16 |
---|---|
Git Bash 에서 한글 자꾸 깨져서 나올 때 / cmd 에서 java 한글 깨질 때 (0) | 2022.03.13 |
REST 와 SOAP 비교 (0) | 2022.01.20 |
[Git 설치 없이] VSCode와 Git Repository연결하기 (clone repository 아님) (0) | 2022.01.12 |
[Git 설치 없이 IDE와 연결] Eclipse 와 Git Repository 연결하기 (0) | 2022.01.11 |