
✔️ 터미널 환경 구성 (cli 환경 구성)
✔️ Oh My Zsh 설치
맥이나 유닉스, 리눅스 계열을 사용하는 개발자들이 많이 사용하는 oh-my-zsh로 cli 환경을 구성해보자
Oh My Zsh - a delightful & open source framework for Zsh
Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with several helpful functions, helpers, plugins, themes, and a few things that make you shout... OH MY ZSH!
ohmyz.sh
Zsh 구성을 관리하기 위한 커뮤니티 기반 오픈 소스 프레임워크이다.
Zsh에 테마를 입히고 플러그인 기능을 통해 추가 기능을 부여해준다.
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
우선 해당 스크립트를 실행해 oh-my-zsh을 설치한다.
~ vi .zshrc
zsh의 환경 설정 파일은 .zshrc 이다.
GitHub - ohmyzsh/ohmyzsh: 🙃 A delightful community-driven (with 2,000+ contributors) framework for managing your zsh config
🙃 A delightful community-driven (with 2,000+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, pyth...
github.com
해당 github repository에서 사용할 zsh theme를 고른다.
ZSH_THEME 에 테마명을 입력한다.
~ source ~/.zshrc
source 명령어를 이용해 zshrc 설정 파일을 업데이트한다.
하지만 위와 같이 특수한 글자들은 기본 폰트에서는 깨진다.
✔️ 특수 문자 폰트 설치
GitHub - powerline/fonts: Patched fonts for Powerline users.
Patched fonts for Powerline users. Contribute to powerline/fonts development by creating an account on GitHub.
github.com
특수 문자들을 출력할 수 있는 폰트들을 모아 놓은 github 레포지토리이다.
압축 파일로 내려받는다.
원하는 폰트를 우클릭하여 설치해준다.
터미널 상단에서 [설정] 으로 이동 후
Windows PowerShell 로 이동하여 추가 설정의 [모양] 탭으로 이동한다.
글꼴 선택에서 방금 설치한 폰트를 선택하고 터미널로 접속하면
폰트가 바뀌어져 있다.
✔️ 자주 사용하는 명령어 처리
GitHub - zsh-users/zsh-autosuggestions: Fish-like autosuggestions for zsh
Fish-like autosuggestions for zsh. Contribute to zsh-users/zsh-autosuggestions development by creating an account on GitHub.
github.com
플러그인을 통해 자주 사용하는 명령어들을 자동으로 완성해주는 autosuggestion 기능을 추가한다.
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
우선 해당 명령어를 사용해 설치한다.
~/.zshrc
파일을 연다.
73 plugins=(
74 git
75 zsh-autosuggestions
76 zsh-completions
77 )
source ~/.zshrc
docker ps
명령어를 실행 후 d 까지만 입력후 화살표 우방향 키(→)를 누르면 완성된다.docker
를 입력하고 위(↑), 아래(↓) 방향키를 움직이면 한번 히스토리에 저장된 명령어들이 나온다.
✔️ Visual Studio Code 설정하기
Visual Stdio Code의 설정 창을 열어준다. (설정 창은 좌측 최하단의 톱니바퀴를 클릭하면 된다.)
검색 창에 'terminal font' 로 검색한 뒤 Terminal > Integrated: Font Family에 설치해 둔 폰트명을 직접 입력한다.
Visual Studio Code를 껐다가 다시 열면 Terminal 환경이 구성된 것을 확인할 수 있다.
✔️ oh-my-zsh 삭제 방법
더 이상 oh-my-zsh를 사용하지 않으려면 다음 명령을 통해 삭제한다.
sudo chmod 777 ~/.oh-my-zsh/tools/uninstall.sh
~/.oh-my-zsh/tools/uninstall.sh
'Useful' 카테고리의 다른 글
mod_proxy를 이용한 apache와 tomcat 연동하기 (0) | 2023.08.21 |
---|---|
vi 편집기 명령어 정리 (0) | 2023.08.20 |
[Packer] Packer 설치 및 사용법 (0) | 2022.05.03 |
Chocolatey 개념 및 설치 방법 (0) | 2022.05.03 |
Ansible playbook 작성을 위한 VScode Extensions 세팅 (0) | 2022.04.15 |
영차영차 성장 블로그
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!