2007. 11. 3. 21:00 Unix

자동 단어 완성기능

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP
 
                       Unix Tip 2335 - May 24, 2006
 
                   http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
자동 단어 완성기능
 
tcsh에서 TAB키는 임의의 응용프로그램(예를 들면 pico, cd, rm, chown등)에 사용될
임의의 이름을 자동으로 완성해준다.(auto complete기능) 또한 root디렉토리(/)부터
절대 경로까지도 자동으로 완성해준다.
 
root(/)로부터 자신의 .cshrc 파일을 열고자 한다면..
 
"pico /ho"[TAB] -> "pico /home/"
계속해서 "you"[TAB] -> "yourusername"
결과적으로 "pico /home/yourusername/"를 얻을 수 있다.
다음으로 ".cs"[TAB] -> ".cshrc"를 얻을 수 있다.
결과적으로 "pico /home/yourusername/.cshrc"를 얻을 수 있다.
상당히 적은 수의 키스트로크로..
 
하지만 yourusername과 yourothername이라는 사용자가 있다고 해보자.
 
그러면 shell이 beep음을 낼 것이며 TAB키를 한번 더 입력하면 "your"로 시작하는
모든 파일 리스트를 보게 될 것이다.
이름이 다른부분에 커서가 위치하게 될 것이며 다른 부분을 입력하고 TAB을 입력하라.
 
이 팁은 명령어에도 작용한다.
 
※ 譯者 註: Linux의 Shell(보통 bash)에서는 기본적으로 지원하는 기능이다.
-------------------------------------------------------
 
AUTO WORD COMPLETION
 
In tcsh, the TAB key will automatically
complete any name in the current
directory for any application (for pico,
cd, rm, chown)... It will even complete
paths from root.
 
Soo... If you want to open your .cshrc
from root you do..
 
"pico /ho"[TAB] -> "pico /home/"
Then continue with "yuo"[tab] -> "yourusername"
Then you get "pico /home/yourusername/"
And then type ".cs"[TAB] -> ".cshrc"
So in the end you get "pico /home/yourusername/.cshrc"
In a lot less stokes...
 
But say there are 2 users called
yourusername and yourothername.
 
Well, then the shell will beep, and if
you hit TAB again, you will get a listing
off all the files that start with "you".
You can then continue to the point where
the names differ, and then hit TAB.
 
This also works for commands.
반응형
Posted by She쥐포s

블로그 이미지
She쥐포s
Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

글 보관함