커맨드 라인 도구 활용하기 - zsh + oh-my-zsh, tmux, peco

4,452 views

Published on

2014. 07. 23. RORLab 강남 토즈 2호점
커맨드 라인 도구 활용하기 - zsh + oh-my-zsh, tmux, peco

발표 영상 : http://www.youtube.com/watch?v=HGPp-FnUNKM

1 Comment
40 Likes
Statistics
Notes
No Downloads
Views
Total views
4,452
On SlideShare
0
From Embeds
0
Number of Embeds
54
Actions
Shares
0
Downloads
32
Comments
1
Likes
40
Embeds 0
No embeds

No notes for slide

커맨드 라인 도구 활용하기 - zsh + oh-my-zsh, tmux, peco

  1. 1. Command Line Tools Daekwon Kim propellerheaven@gmail.com 0
  2. 2. naycot @nacyot Leevi Inc. Ruby programmer http://nacyot.com
  3. 3. 하나라도 건지면…
  4. 4. TOC oh­my­zsh tmux peco
  5. 5. oh­my­zsh http://www.zsh.org/ https://github.com/robbyrussell/oh­my­zsh
  6. 6. Install with curl $ curl -L http://install.ohmyz.sh | sh with wget $ wget --no-check-certificate http://install.ohmyz.sh -O - | sh
  7. 7. Manual Install $ apt-get update $ apt-get install git zsh $ zsh --version zsh 5.0.2 (x86_64-pc-linux-gnu) $ chsh -s /bin/zsh $ git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zs h $ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc $ zsh
  8. 8. 단축키 ^ = Ctrl M = Alt(Meta) Like Emacs
  9. 9. 앞으로 / 뒤로 ^a : 맨 앞으로 ^e : 맨 뒤로 ^b : 한 칸 앞으로 ^f : 한 칸 뒤로
  10. 10. 현재 라인 삭제하기 ^u : 현재 라인 삭제하기 ^c : 현재 라인 버리기
  11. 11. Kill / Yank ^d : 한 글자 Kill ^k : 한 줄 Kill ^y : Yank
  12. 12. Search ^r : 히스토리 뒤로 검색 ^s : 히스토리 앞으로 검색 ^g : 검색 종료 M­p : 이전 명령어 M­n : 다음 명령어
  13. 13. 디렉토리 이동
  14. 14. 상위 디렉토리로 이동 $ .. $ cd.. $ cd... $ cd.... $ cd..... $ cd/
  15. 15. 이전 디렉토리로 이동 $ cd /bin/ $ cd /var/log $ cd ~ $ cd /usr/bin $ cd - # 이전 디렉토리로 $ cd -<TAB> # 이전 디렉토리 일람
  16. 16. tmux 한 줄 요약 더 나은 Screen https://gist.github.com/nacyot/299d044bd4606a63c386 http://tmux.sourceforge.net/
  17. 17. Install $ apt-get install tmux $ git clone https://gist.github.com/299d044bd4606a63c386.git ~/.tmu x.conf
  18. 18. Run $ tmux new -s Project_A $ tmux -V tmux 1.8
  19. 19. Prefix Key ^b
  20. 20. Windows 다수의 Window으로 분할 가능(탭과 비슷)
  21. 21. Windows ^b c # 새 window ^b & y # 현재 window 닫기 $ echo 'Window1' ^b c $ echo 'Window2' ^b c $ echo 'Window3' ^b c $ echo 'Window4' ^b p ^b n ^b 1 ^b 2 ^b l
  22. 22. 레일스 프로젝트 예제 Windows 1번 창: Emacs Editor 2번 창: $ rails server 3번 창: $ guard 4번 창: $ rails console 5번 창: 셸 작업용 6번 창: 셸 작업용 7번 창: Stage 서버 접속용(ssh) 초기화 스크립트도 작성 가능
  23. 23. penes 하나의 창 안에서 여러 개의 pane로 구성 가능 창마다 고유의 pane 구성을 가질 수 있음
  24. 24. panes ^b | $ exit ^b - ^b | ^b LeftArrow ^b BottomArrow ...
  25. 25. Sessions Tmux의 Killer Featuer Tmux를 detach해도 프로세스는 살아있음 다수의 프로젝트를 동시에 운용 가능 심지어 협업도 가능 원격으로 집단 개발하고 by han http://blog.remotty.com/blog/2014/02/28/remote­group­development/
  26. 26. Sessions $ tmux detach $ tmux ls $ tmux new -s Project_B
  27. 27. Peco(*) / Percol Incremental String Searcher 증분 문자열 검색기 https://github.com/peco/peco
  28. 28. Incremental a async aws application amazon app apple applepie
  29. 29. Incremental ap app application apple applepie
  30. 30. Incremental app application apple applepie
  31. 31. Incremental appl application apple applepie
  32. 32. Incremental apple apple applepie
  33. 33. Incremental applep applepie
  34. 34. 파이어폭스를 사랑했던 이유 Tab Incremental Serach
  35. 35. Install $ cd /opt $ wget https://github.com/peco/peco/releases/download/v0.1.12/peco_ linux_amd64.tar.gz $ tar xvf peco_linux_amd64.tar.gz $ ln -s /opt/peco_linux_amd64/peco /usr/local/bin
  36. 36. peco $ ps aux | peco
  37. 37. Matcher ^r : Select Matcher IgnoreCase CaseSesitive Regexp
  38. 38. Zsh Script
  39. 39. peco­pushd $ source ~/.zsh/directory.zsh $ ^a # 이전 디렉토리로 이동
  40. 40. peco­git­log $ source ~/.zsh/git-log.zsh $ cd ~/.oh-my-zsh $ ^b # git log 검색
  41. 41. peco­select­history $ source ~/.zsh/history.zsh $ ^r # 이전 명령어 찾기

×