
iTerm에는 마지막 프롬프트까지 스크롤하는 기능(예: 일부 코드를 컴파일할 때 표준 출력이 많은 경우)과 같은 몇 가지 멋진 기능을 활성화하는 쉘 통합 스크립트가 있습니다. 그러나 터미널이 iTerm이 아닌 경우 해당 쉘 스크립트는 실패하고 프롬프트를 오염시킵니다.
터미널이 iTerm인 경우에만 셸 통합을 실행하므로 정리하려고 합니다.
답변1
이것을 ~/.config/fish/config.fish에 넣으면 효과가 있습니다.
if test $TERM_PROGRAM = iTerm.app
test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish
end
답변2
이것을 넣으면 ~/.config/fish/config.fish
트릭을 수행해야합니다그리고$TERM_PROGRAM
설정되었는지 확인하세요 .
test -n "$TERM_PROGRAM"
and test $TERM_PROGRAM = iTerm.app
and test -e {$HOME}/.iterm2_shell_integration.fish
and source {$HOME}/.iterm2_shell_integration.fish