oh-my-zsh 테마 및 유용한 플러그인 정리

in #kr-dev11 months ago (edited)

oh-my-zsh는 Zsh(Z Shell)의 설정을 간편하게 관리할 수 있도록 도와주는 오픈 소스 프레임워크입니다. Zsh는 강력한 기능과 유연성으로 많은 개발자들에게 사랑받고 있으며, oh-my-zsh는 이를 더욱 편리하게 사용할 수 있도록 다양한 테마와 플러그인을 제공합니다. 이번 글에서는 oh-my-zsh 설치 방법 및 인기 있는 테마와 유용한 플러그인들을 정리해보겠습니다.

1. oh-my-zsh 설치 및 설정

1.1. 설치

oh-my-zsh를 설치하려면 다음 명령어를 터미널에 입력합니다:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

1.2. 테마 변경

테마를 변경하려면 ~/.zshrc 파일을 열어 ZSH_THEME 변수를 원하는 테마 이름으로 수정합니다:

ZSH_THEME="agnoster"

변경 후 터미널을 재시작하거나 source ~/.zshrc 명령어를 입력하여 설정을 적용합니다.

1.3. 플러그인 활성화

플러그인을 활성화하려면 ~/.zshrc 파일을 열어 plugins 배열에 원하는 플러그인 이름을 추가합니다:

plugins=(git zoxide syntax-highlighting autosuggestions)

변경 후 터미널을 재시작하거나 source ~/.zshrc 명령어를 입력하여 설정을 적용합니다.

2. 인기 있는 oh-my-zsh 테마

2.1. agnoster

agnoster 테마는 깔끔하고 직관적인 디자인으로 많은 사용자들에게 인기가 있습니다. Git 상태, 현재 디렉토리, 명령어 실행 결과 등을 시각적으로 쉽게 확인할 수 있습니다.

2.2. powerlevel10k

powerlevel10k는 고성능과 커스터마이징 옵션을 제공하는 테마입니다. 다양한 아이콘과 색상 옵션을 통해 터미널을 더욱 아름답게 꾸밀 수 있으며, 빠른 속도로 동작합니다.

powerlevel10k 리포지토리를 복제합니다:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k


.zshrc에서 ZSH_THEME="powerlevel10k/powerlevel10k"를 설정합니다.

2.3. robbyrussell

oh-my-zsh의 기본 테마로, 간단하면서도 필요한 정보를 제공하는 깔끔한 디자인이 특징입니다. 처음 oh-my-zsh를 설치하면 기본적으로 설정되는 테마입니다.

3. 유용한 oh-my-zsh 플러그인

3.1. git

git 플러그인은 많은 별칭과 몇 가지 유용한 기능을 제공하여 Git 명령어를 더욱 편리하게 사용할 수 있도록 도와줍니다.

.zshrc 파일의 플러그인 배열에 git을 추가합니다.

plugins=(... git)


제가 자주 사용하는 alias를 몇가지를 소개합니다.

AliasCommand
ggit
gglgit pull origin $(current_branch)
ggpgit push origin $(current_branch)
ggpnpggl && ggp
gagit add
gaagit add --all
gcmsggit commit --message
gcamgit commit --all --message
gcogit checkout
gswgit switch
gswcgit switch -c
gswdgit switch $(git_develop_branch)
gswmgit switch $(git_main_branch)
gstgit status
gmgit merge
gmsgit merge --squash
gmomgit merge origin/$(git_main_branch)
glogit log --oneline --decorate
gloggit log --oneline --decorate --graph
glogagit log --oneline --decorate --graph --all

3.2. zoxide

zoxide 플러그인은 자주 방문하는 디렉토리를 빠르게 이동할 수 있도록 도와줍니다. 디렉토리의 경로를 기억하고, 짧은 명령어로 해당 디렉토리로 이동할 수 있습니다.

zoxide를 설치합니다. 맥OS라면 brew로 설치합니다: brew install zoxide

.zshrc 파일의 플러그인 배열에 zoxide를 추가합니다.

plugins=(... zoxide)

3.3. syntax-highlighting

syntax-highlighting 플러그인은 명령어의 구문을 하이라이트하여 가독성을 높여줍니다. 잘못된 명령어를 입력했을 때 즉시 확인할 수 있어 오류를 줄이는 데 도움이 됩니다.

syntax-highlighting 리포지토리를 oh-my-zsh의 플러그인 디렉토리에 복제합니다:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting


.zshrc에서 플러그인을 활성화합니다:

plugins=(
    # other plugins...
    zsh-syntax-highlighting
)

3.4. autosuggestions

autosuggestions 플러그인은 이전에 입력한 명령어를 기반으로 자동 완성 제안을 제공합니다. Tab 키를 눌러 제안된 명령어를 쉽게 입력할 수 있어 생산성을 높여줍니다.

autosuggestions 리포지토리를 oh-my-zsh의 플러그인 디렉토리에 복제합니다:

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions


.zshrc에서 플러그인을 활성화합니다:

plugins=( 
    # other plugins...
    zsh-autosuggestions
)

이상으로 oh-my-zsh의 인기 있는 테마와 유용한 플러그인들을 정리해보았습니다. oh-my-zsh를 통해 더욱 효율적이고 아름다운 터미널 환경을 구축해보세요!

Posted using Obsidian Steemit plugin

Sort:  

[광고] STEEM 개발자 커뮤니티에 참여 하시면, 다양한 혜택을 받을 수 있습니다.

Congratulations, your post has been upvoted by @upex with a 0.21% upvote. We invite you to continue producing quality content and join our Discord community here. Keep up the good work! #upex

Coin Marketplace

STEEM 0.15
TRX 0.24
JST 0.032
BTC 94787.98
ETH 1798.17
USDT 1.00
SBD 0.84