터미널 유용한 프로그램
1. fzf
- 폴더 내의 파일들을 빠르게 검색할 수 있도록 하는 명령어
설치 방법
Linux
1
2
| git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
|
Mac
사용 방법
- 터미널에
fzf 를 입력하면 편하게 사용할 수 있다.
추가적으로 유용한 사용방법 (display 모드 편하게 사용하기)
1
2
3
4
5
6
| # ~/.bashrc or ~/.zshrc
function fzfv(){
fzf --style full \
--preview 'fzf-preview.sh {}' \
--bind 'focus:transform-header:file --brief {}'
}
|
이후 source ~/.bashrc 도는 source ~/.zshrc 로 적용시킨뒤 아래와 같이 사용하면 된다.
1
2
3
| # linux 커맨드와 자유롭게 사용하면 된다.
cat $(fzfv) # 파일 출력
cd $(fzfv) # 폴더 이동
|
2. zoxide
cd 로 이동한 폴더들의 rank 를 매겨줘서 자주 사용하는 경로로 편하게 이동할 수 있게 해주는 명령어
설치 방법
Linux
1
| curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
|
1
2
3
4
| # ~/.bashrc or zshrc
PATH=~/.local/bin:$PATH
eval "$(zoxide init bash)"
|
Mac
사용방법
cd 를 사용하면서 rank 가 쌓이면 zi 를 입력하면 자주가는 폴더 목록이 나온다.
Comments powered by Disqus.