jsg@jsg-ubuntu:~$ set -o
allexport off
braceexpand on
emacs on
errexit off
errtrace off
functrace off
hashall on
histexpand on
history on
ignoreeof off
interactive-comments on
keyword off
monitor on
noclobber off
noexec off
noglob off
nolog off
notify off
nounset off
onecmd off
physical off
pipefail off
posix off
privileged off
verbose off
vi off
xtrace off
Ⅰ. Emacs Mode
bash 기본 모드
$set -o emacs
1. 커서 이동
단축키
설명
Ctrl-F / →
앞으로 1칸 이동
Ctrl-B / ←
뒤로 1칸 이동
Alt-F / Ctrl-→
한단어 앞으로 이동
Alt-B / Ctrl-←
한단어 뒤로 이동
Ctrl-A
맨 뒤로 이동
Ctrl-E
맨 앞으로 이동
2. 탐색
단축키
설명
Ctrl-P / ↑
이전 명령어
Ctrl-N / ↓
앞 명령어
Tab
자동 완성
Tab x 2
prefix와 매칭되는 단어 목록
Esc-*
prefix와 매칭되는 단어 프롬프트에 복사
Ctrl-R
이전 명령어에서 후방탐색 / 더 누르면 재탐색
이전 명령어에서 전방탐색 단축키를 쓰고 싶을 때
~/.bashrc 에 stty stop '' 추가하면 Ctrl-S 로 쓸 수 있음