ãªãã¹ãè¦ããªãbashã®ãã¼æä½
ã¿ã¼ããã«ï¼bashã§ã³ãã³ãã©ã¤ã³ãç·¨éããæãå®ã«ãããããªãã¼æä½ãããã便å©ããã ããã¨ãããããããè¦ãããã¨æ¬²å¼µãã®ã ãã©ãããã«å¿ãã¦ãã¾ã...ããã£ã¨å³é¸ãã¦è¦ãã¦ãããªãã¦ã¯ãèªåã«ã¨ã£ã¦å¿ è¦æå°éã®ãã¼æä½ãæ¢ã£ã¦ã¿ãã
- åæãªæ¹é
- OSXç°å¢ã®ãã¼ãã¤ã³ãã使ããå ´åã¯ããã¡ããåªå ããã
- ãã¼ã ãã¸ã·ã§ã³ã®ç¶æã«ãã ãããªãã
- ãã£ã¦ãç¢å°ãã¼ã»deleteãã¼ãªã©ãé æ ®ãªã使ãã
ã«ã¼ã½ã«ç§»å
- è¡é ã»è¡æ«ã»åèªåºåãã®ç§»åã§ãã«ã¼ã½ã«ãç´ æ©ãåããã
- ãã¦ã¹ã«ã¼ã½ã«ã§æå®ããã°ãã¯ãªãã¯ããä½ç½®ã«ã¸ã£ã³ãããã
control-Aã»E | è¡é ã»è¡æ«ã¸ç§»å |
option-âã»â | 1åèªãã¤ç§»å |
option-ã¯ãªã㯠| ã¯ãªãã¯ããä½ç½®ã¸ç§»å |
åé¤
- è¡é ã»è¡æ«ã»ã¹ãã¼ã¹ã»åèªåºåãã®åé¤ã«ãã£ã¦ãä¿®æ£ã楽ã«ããã
control-Uã»K | è¡é ã»è¡æ«ã¾ã§åé¤ |
control-W | 次ã®ã¹ãã¼ã¹ã¾ã§åé¤ï¼å·¦æ¹åã®ã¿ï¼ |
escãdeleteã»D | 1åèªãã¤åé¤ï¼å·¦ã»å³æ¹åï¼ |
control-Hã»Dï¼deleteã»fn-deleteï¼ | 1æåãã¤åé¤ï¼å·¦ã»å³æ¹åï¼ |
-
-
- å¡ä¾ï¼escãdeleteã»D ï¼ escãæ¼ããå¾ã«deleteãã¾ãã¯escãæ¼ããå¾ã«Dãæ¼ãã
- å¡ä¾ï¼control-Uã»K ï¼ controlãæ¼ããªããUãã¾ãã¯controlãæ¼ããªããKãæ¼ãã
-
æä½ãæ»ã
- åé¤ããããã¹ãã¯ããã¼ã¹ãã§ããã
- ç·¨éããå 容ã¯ã確å®ã«å ã«æ»ããã
control-Y | ç´åã«åé¤ããããã¹ãããã¼ã¹ããã |
control-- (controlã¨ãã¤ãã¹) |
æä½ãï¼ã¤æ»ãï¼undoï¼ |
escãR | æä½ãå ¨ã¦æ»ã |
-
-
- redoã¯ãªãã®ã ãããï¼
-
ã³ãã³ãå±¥æ´
âã»â | ã³ãã³ãå±¥æ´ãé¡ãã»é²ã |
escãshift-<ã»> | ã³ãã³ãå±¥æ´ã®å é ã»æ«å°¾ï¼å¤ã»æ°ï¼ã¸ç§»å |
control-Rããã¼ã¯ã¼ã | ã³ãã³ãå±¥æ´ããã¼ã¯ã¼ãæ¤ç´¢ |
æ¤ç´¢ä¸ã«control-Rã»S | ãã¼ã¯ã¼ãæ¤ç´¢ãé¡ãã»é²ã |
- control-Rã«ç¶ãã¦ãã¼ã¯ã¼ããå ¥åããã¨ãã³ãã³ãå±¥æ´ã®ãã¼ã¯ã¼ãæ¤ç´¢ãå§ã¾ãã
- ããã¦ãæ¤ç´¢ä¸ã«control-Rã»Sãæ¼ãã¨ããã¼ã¯ã¼ããå«ãå±¥æ´ã ããèªå¨ã«è¡ãæ¥ã§ããã
- ä½ãã以ä¸ã®è¨å®ããã¦ããå¿ è¦ãããã
bashã®control-Sãæå¹ã«ãã
- ããã©ã«ãã®ã¿ã¼ããã«ç°å¢ã§ã¯ãäºã¤ã®control-Sã競åãã¦ããã
- 端æ«ã®control-Sï¼ç»é¢åºåãåæ¢ããï¼
- bashã®control-Sï¼ã³ãã³ãå±¥æ´ãåæ¹æ¤ç´¢ããï¼
- åªå ãããã®ã¯ã端æ«ã®control-Sã
- ã§ããã»ã¨ãã©ä½¿ããã¨ã¯ãªã...ã
- ãbashã®control-Sãã使ããæ¹ããé¥ãã«å¹¸ãã«ãªãã
ããã§ã端æ«ã®control-Sãç¡å¹ã«ãããããã¨ãbashã®control-Sãæå¹ã«ãªãï¼
- ããã©ã«ãã§ã¯ã端æ«è¨å®ã§stopï¼^Sã¨ãªã£ã¦ãããï¼^ = controlï¼
$ stty -a speed 9600 baud; 40 rows; 270 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel iutf8 -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -oxtabs -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol =; eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
- ãããundefã«è¨å®ãã¦ãstop =
ã¨åæ ãããã°OKã
$ stty stop undef $ stty -a speed 9600 baud; 40 rows; 270 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel iutf8 -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -oxtabs -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol =; eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ; susp = ^Z; time = 0; werase = ^W;
ããã§ãbashã®control-Sãæå¹ã«ãªã£ãï¼
- æ¯åstty stop undefãå ¥åå®è¡ããã®ã¯é¢åãªã®ã§ã~/.bashrcã«è¿½è¨ãã¦ããã¨ãbashèµ·åæã«èªåçã«è¨å®ãããã
...ä¸ç¥... # 端æ«ã®ç»é¢åºååæ¢ãç¡å¹ã«ãã # ã³ãã³ãå±¥æ´ã®åæ¹æ¤ç´¢ãæå¹ã«ãããã stty stop undef
optionãã¼ãæ´»ç¨ãã
- ã¿ã¼ããã« >> ç°å¢è¨å® >> è¨å® >>ãã¡ã¿ãã¼ã¨ãã¦optionãã¼ã使ç¨ããæå¹ã«ãã¦ãããã¨ã§ãescã®ä»£ããã«optionã使ããããã«ãªãã
- 以ååæ§ãescã使ããã
- optionã使ãã¨ãé£ç¶æä½ãå¿«é©ã«ãªãã®ã ï¼
ä¾ï¼
- ãå·¦æ¹åã«1åèªãã¤åé¤ãããæä½ã5åç¹°ãè¿ãã¦ã¿ãã¨...
-
- escãdeleteã¯ã交äºã«10åæ¼ãå¿ è¦ãããã
escãdeleteãescãdeleteãescãdeleteãescãdeleteãescãdelete
-
- ä¸æ¹ãoption-deleteãªããoptionæ¼ããªããdeleteã®ã¿5åæ¼ãã§æ¸ãï¼
optionæ¼ããªãããdeleteãdeleteãdeleteãdeleteãdelete
ãã®ä»
escãUã»Lã»C | ã«ã¼ã½ã«ã®å³æ¹åã®1åèªã大æåã»å°æåã»å é ã®ã¿å¤§æåã«ãã |
control-L | ã¯ãªã¢ï¼ã¿ã¼ããã«ã®ã¹ã¯ãã¼ã«ã¨ãªã¢ã®å±¥æ´ã¯æ®ãï¼ |
command-K | ã¯ãªã¢ï¼ã¿ã¼ããã«ã®ã¹ã¯ãã¼ã«ã¨ãªã¢ã®å±¥æ´ãåé¤ï¼ |
å³é¸
以ä¸ã®æä½ã¨è¨å®ããããã«å³é¸ãã¦ã¿ãããã®åºæºã¯...
- åé¤ã¯å·¦æ¹åã®ã¿ãï¼ä½ããè¡æ«ã¾ã§åé¤ã¯å«ãï¼
- optionã使ãã
- ç¬æã¨åè¦ã
è¨å®
- ~/.bashrcã«ãstty stop undefãã追è¨ããã
- ã¿ã¼ããã« >> ç°å¢è¨å® >> è¨å® >>ãã¡ã¿ãã¼ã¨ãã¦optionãã¼ã使ç¨ããæå¹ã«ãã¦ããã
æä½
No. | ãã¼æä½ | åä½ | åé¡ |
---|---|---|---|
1 | control-Aã»E | è¡é ã»è¡æ«ã¸ç§»å | ã«ã¼ã½ã«ç§»å |
2 | option-âã»â | 1åèªãã¤ç§»å | ã«ã¼ã½ã«ç§»å |
3 | option-ã¯ãªã㯠| ã¯ãªãã¯ããä½ç½®ã¸ç§»å | ã«ã¼ã½ã«ç§»å |
4 | control-Uã»K | è¡é ã»è¡æ«ã¾ã§åé¤ | åé¤ |
5 | control-W | 次ã®ã¹ãã¼ã¹ã¾ã§åé¤ï¼å·¦æ¹åï¼ | åé¤ |
6 | option-delete | 1åèªãã¤åé¤ï¼å·¦æ¹åï¼ | åé¤ |
7 | control-Y | ç´åã«åé¤ããããã¹ãããã¼ã¹ããã | æä½ãæ»ã |
8 | control-- (controlã¨ãã¤ãã¹) |
æä½ãï¼ã¤æ»ãï¼undoï¼ | æä½ãæ»ã |
9 | âã»â | ã³ãã³ãå±¥æ´ãé¡ãã»é²ã | å±¥æ´ |
10 | option-shift-> | ã³ãã³ãå±¥æ´ã®æ«å°¾ï¼æ°ï¼ã¸ç§»å | å±¥æ´ |
11 | control-Rããã¼ã¯ã¼ã | ã³ãã³ãå±¥æ´ããã¼ã¯ã¼ãæ¤ç´¢ | å±¥æ´ |
12 | æ¤ç´¢ä¸ã«control-Rã»S | ãã¼ã¯ã¼ãæ¤ç´¢ãé¡ãã»é²ã | å±¥æ´ |
åèãã¼ã¸
以ä¸ã®ãã¼ã¸ãããã¸ãåèã«ãªãã¾ãããæè¬ã§ãï¼
- bashã®ãã¼ãã¤ã³ã(ãã¼ãã¼ãã·ã§ã¼ãã«ãã) ã¾ã¨ã - readlineã¨bindãã¤ãã§ã«sttyç·¨ - ãã¾ãæ£blog
- bashã®å±¥æ´ãæ¤ç´¢ããã³ãã³ããæãããã¦ã¤ããï¼ä¿ºã®ä½æ¥å¹çãï¼åã©ãããæ´ã«åãã¦ãã³ãï¼
- Mac ã®ã¿ã¼ããã«ã® Bash ã«åèªåä½ã«ã¼ã½ã«ç§»åã®ãã¼ãã¤ã³ãè¨å®ããã | Idea, Design, Engineering, Architecture, etc