"Fossies" - the Fresh Open Source Software Archive 
Member "tcshrc/doc/tcshrc.sgml" (24 Jan 2009, 22119 Bytes) of package /linux/privat/old/tcshrc-1.6.2.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
2 <!-- Title of document -->
3 <!ENTITY document-version "1.0">
4 <!ENTITY document-title "The tcshrc manual">
5 <!ENTITY document-description "A guide for the tcshrc package">
6 ]>
7
8 <BOOK ID="TCSHRC">
9 <BOOKINFO>
10 <TITLE>&document-title;</TITLE>
11 <SUBTITLE>&document-description;</SUBTITLE>
12 <DATE>2nd September 2001</DATE>
13 <ABBREV>tcshrc</ABBREV>
14 <AUTHORGROUP>
15 <AUTHOR>
16 <FIRSTNAME>Simeon</FIRSTNAME>
17 <SURNAME>Xenitellis</SURNAME>
18 <OTHERNAME>(Simos)</OTHERNAME>
19 </AUTHOR>
20 <AUTHOR>
21 <FIRSTNAME>Amine</FIRSTNAME>
22 <SURNAME>Chelghaf</SURNAME>
23 </AUTHOR>
24 </AUTHORGROUP>
25 <ABSTRACT>
26 <PARA>
27 This document serves as an introduction to the tcsh shell,
28 providing pointers to further documentation and
29 covering significant features of the tcshrc package.
30 </PARA>
31 <PARA>
32 The latest version of this document can be found at the tcshrc WWW site
33 at <EMPHASIS>http://tcshrc.sourceforge.net/</EMPHASIS>.
34 </PARA>
35 </ABSTRACT>
36 <ADDRESS><EMAIL>S.Xenitellis@rhbnc.ac.uk</EMAIL></ADDRESS>
37 <ADDRESS><EMAIL>chelghaf@yahoo.fr</EMAIL></ADDRESS>
38 <COPYRIGHT>
39 <YEAR>2000, 2001</YEAR>
40 <HOLDER>Simeon (Simos) Xenitellis</HOLDER>
41 <HOLDER>Amine Chelghaf</HOLDER>
42 </COPYRIGHT>
43 <LEGALNOTICE>
44 <PARA>
45 Permission is granted to copy, distribute and/or modify this document
46 under the terms of the GNU Free Documentation License, Version 1.1
47 or any later version published by the Free Software Foundation;
48 with no Invariant Sections, no Front-Cover Texts and
49 no Back-Cover Texts. A copy of the license is available at
50 http://www.gnu.org/
51 </PARA>
52 </LEGALNOTICE>
53 <REVHISTORY>
54 <REVISION>
55 <REVNUMBER>0.5</REVNUMBER>
56 <DATE> 8th Dec 2000 </DATE>
57 <AUTHORINITIALS>simos at hellug dot gr</AUTHORINITIALS>
58 <REVREMARK>First public distribution</REVREMARK>
59 </REVISION>
60 <REVISION>
61 <REVNUMBER>0.6</REVNUMBER>
62 <DATE> 22nd Jan 2001 </DATE>
63 <AUTHORINITIALS>simos at hellug dot gr</AUTHORINITIALS>
64 <REVREMARK>Documentation of the F* keys, addition of CSH/TCSH book, tcsh mailling list.</REVREMARK>
65 </REVISION>
66 <REVISION>
67 <REVNUMBER>1.0</REVNUMBER>
68 <DATE> 2nd Sep 2001 </DATE>
69 <AUTHORINITIALS>simos at hellug dot gr</AUTHORINITIALS>
70 <REVREMARK>Added documentation for the installation, tcshrc_config utility.</REVREMARK>
71 </REVISION>
72 </REVHISTORY>
73 </BOOKINFO>
74
75
76 <CHAPTER>
77 <TITLE>Shells</TITLE>
78 <PARA>
79 The shell is an interface to the operating system just like the graphic user interface
80 (<ACRONYM>GUI</ACRONYM>) is.
81 Typically, the shell acts as a command interpreter;
82 it takes each command and passes it to the operating system. It then
83 displays the results of this operation on your screen.
84 </PARA>
85 <PARA>
86 The most common shells are
87 <ITEMIZEDLIST>
88 <LISTITEM>
89 <PARA>
90 Bourne shell (sh)
91 </PARA>
92 </LISTITEM>
93 <LISTITEM>
94 <PARA>
95 C shell (csh)
96 </PARA>
97 </LISTITEM>
98 <LISTITEM>
99 <PARA>
100 Korn shell (ksh)
101 </PARA>
102 </LISTITEM>
103 <LISTITEM>
104 <PARA>
105 TC Shell (tcsh)
106 </PARA>
107 </LISTITEM>
108 <LISTITEM>
109 <PARA>
110 Bourne Again Shell (bash)
111 </PARA>
112 </LISTITEM>
113 </ITEMIZEDLIST>
114 </PARA>
115
116 <PARA>
117 To identify which shell you are currently running, you may type
118 in your current shell
119 <USERINPUT>echo $shell</USERINPUT>
120 </PARA>
121
122 <PARA>
123 Historically, the shell came before the GUI, however the latter has become more popular
124 since it allows in several cases easier usage of a computer. In reality, the shell
125 is well-suited in specific types of usage and extra functionality that it may provide
126 can make it quite productive.
127 </PARA>
128
129 <PARA>
130 This document describes the tcshrc project, a project that demonstrates exactly this
131 extra functionality of the tcsh shell and makes it more accesible to the end user.
132 </PARA>
133 </CHAPTER>
134
135 <CHAPTER>
136 <TITLE>Basic resources on Unix, shells and the tcsh shell</TITLE>
137 <PARA>
138 As basic reference, the reader is advised to read the following
139
140 <ITEMIZEDLIST>
141 <LISTITEM>
142 <PARA>
143 The <ULINK URL="http://www.primate.wisc.edu/software/csh-tcsh-book/">
144 Using csh & tcsh</ULINK> handbook from O`Reilly is the definitive hard-copy manual for csh
145 and tcsh. At the mentioned URL one can find some electronic versions of documentation
146 of csh and tcsh.
147 </PARA>
148 </LISTITEM>
149 <LISTITEM>
150 <PARA>
151 <ULINK URL="http://www.mhpcc.edu/training/vitecbids/UnixIntro/UnixIntro.html">
152 UnixIntro</ULINK> is a gentle introduction to Unix. It has a chapter dedicated to shells
153 and provides an HTML version of the tcsh man page.
154 </PARA>
155 </LISTITEM>
156 <LISTITEM>
157 <PARA>
158 The Unix FAQ is available at the <ULINK URL="news:comp.answers">
159 comp.answers</ULINK> newsgroup. It is excellent to read, especially
160 if you have tried to use Unix and have questions that you want answered.
161 </PARA>
162 </LISTITEM>
163 <LISTITEM>
164 <PARA>
165 The <ULINK URL="http://www.ibiblio.org/pub/Linux/docs/HOWTO/mini/other-formats/html_single/Path.html">
166 Path HowTo</ULINK> describes common tricks and problems with Unix or Linux environment variables
167 and it focuses on the PATH variable.
168 </PARA>
169 </LISTITEM>
170 <LISTITEM>
171 <PARA>
172 A further link that describes how to add search directories in the PATH variable is the
173 <ULINK URL="http://www.ecn.purdue.edu/ECN/Newsletters/1996.September/Search_Path_Essentials">
174 Search Path Essentials link</ULINK>.
175 </PARA>
176 </LISTITEM>
177 <LISTITEM>
178 <PARA>
179 The tcsh man pages is an invaluable source of information on the extra features of tcsh.
180 It is recommended for the reader to walk through the sections of the man pages and use the features
181 while reading.
182 </PARA>
183 </LISTITEM>
184 </ITEMIZEDLIST>
185 </PARA>
186
187 <PARA>
188 There is a development mailling list on tcsh. To find more information on how to subscribe,
189 send an e-mail to <ULINK URL="mailto:listserv@mx.gw.com">listserv@mx.gw.com</ULINK> and put the word <emphasis>help</emphasis>
190 in the message body.
191 </PARA>
192 <PARA>
193 The author and developer of tcsh is Christos Zoulas. He is available at the mentioned mailling list.
194 </PARA>
195
196 </CHAPTER>
197
198 <CHAPTER>
199 <TITLE>Installation of the tcshrc package</TITLE>
200 <PARA>
201 To install the tcshrc package for your current account, choose from the
202 following scenarios.
203 </PARA>
204
205 <SECT1>
206 <TITLE>I want a quick installation for my account only.</TITLE>
207
208 <PARA>
209 <USERINPUT>make install</USERINPUT> at your command prompt.
210 </PARA>
211
212 <PARA>The above command essentially keeps a backup of the existing <FILENAME>.tcshrc</FILENAME>,
213 if there is one, as <FILENAME>.tcshrc.ORIGINAL</FILENAME>. If such a backup file already exists,
214 no backup is kept in order not to remove the initial .tcshrc file while doing
215 repetitive installations.
216 </PARA>
217
218 <PARA>
219 To make a backup of your existing .tcshrc file
220
221 <LITERALLAYOUT>
222 <PROMPT>%</PROMPT> <USERINPUT>cd</USERINPUT>
223 <PROMPT>%</PROMPT> <USERINPUT>cp .tcshrc .tcshrc.ORIGINAL</USERINPUT>
224 </LITERALLAYOUT>
225 </PARA>
226
227 </SECT1>
228
229 <SECT1>
230 <TITLE>I want to make a system installation</TITLE>
231 <PARA>
232 To make a system installation, type
233
234 <LITERALLAYOUT>
235 <PROMPT>#</PROMPT> <USERINPUT>make systeminstall</USERINPUT>
236 </LITERALLAYOUT>
237
238 AND ALSO use the <FILENAME>tcshrc_config</FILENAME> configuration utility
239 with the -s (--system) option to populate <FILENAME
240 CLASS=DIRECTORY>/etc/skel</FILENAME>.
241
242 </PARA>
243 <PARA>
244 This installs tcshrc in $(PREFIX)/share/tcshrc/ and adds the
245 <FILENAME>tcshrc_config</FILENAME> configuration utility in $(PREFIX)/bin.
246 The <FILENAME>tcshrc_config</FILENAME> utility can be used to make the
247 installation in the <FILENAME CLASS=DIRECTORY>/etc/skel</FILENAME>.
248 Finally, tell your users that they can add tcshrc to their existing accounts
249 by running
250
251 <LITERALLAYOUT>
252 <PROMPT>%</PROMPT> <USERINPUT>tcshrc_config --user</USERINPUT>
253 </LITERALLAYOUT>
254
255 </PARA>
256
257 <NOTE>
258 <PARA>
259 The <FILENAME>tcshrc_config</FILENAME> configuration utility is usually
260 placed in <FILENAME CLASS=DIRECTORY>/usr/local/bin</FILENAME> which is not in
261 the path in default Unix installations. You can invoke the utility using the
262 absolute path as in
263
264 <LITERALLAYOUT>
265 <PROMPT>%</PROMPT> <USERINPUT>/usr/local/bin/tcshrc_config --user</USERINPUT>
266 </LITERALLAYOUT>
267 </PARA>
268 </NOTE>
269 </SECT1>
270
271 </CHAPTER>
272
273 <CHAPTER>
274 <TITLE>tcshrc FAQ and features</TITLE>
275 <PARA>
276 For a full list of the tcshrc features of tcsh that are made available,
277 you should consult the <FILENAME>.tcshrc.*</FILENAME> files and the tcsh
278 man pages. Moreover, there must be a book on the subject from the favourite bookshop.
279 </PARA>
280
281 <qandaset defaultlabel='qanda'>
282 <qandaentry>
283 <question>
284 <para>
285 I did "tar xvfz tcshrc-0.x.tar.gz" and I did not find any RC files!
286 </para>
287 </question>
288 <answer>
289 <para>
290 The RC files start with a dot, which means that you need to do
291 <LITERALLAYOUT>
292 <PROMPT>%</PROMPT> <USERINPUT>ls -al</USERINPUT>
293 </LITERALLAYOUT>
294 to see them.
295 </para>
296 </answer>
297 </qandaentry>
298
299 <qandaentry>
300 <question>
301 <para>
302 When I try the completion, it does not work!
303 </para>
304 </question>
305 <answer>
306 <para>
307 You are doing
308 <LITERALLAYOUT>
309 <PROMPT>%</PROMPT><USERINPUT>cp /etc/passwd /etc/pa<TAB></USERINPUT>
310 </LITERALLAYOUT>
311
312 The behaviour set in the .tcshrc files is to complete only in safe mode.
313 This means that it is not sane to complete on existing files in this case.
314 </para>
315 <para>
316 Use
317 <LITERALLAYOUT>
318 <PROMPT>%</PROMPT> <USERINPUT>cp /etc/passwd<ENTER></USERINPUT>
319 cp: error blah blah
320 <PROMPT>%</PROMPT> <USERINPUT><UP ARROW></USERINPUT>
321 <PROMPT>%</PROMPT> cp /etc/passwd <USERINPUT><F7></USERINPUT>
322 <PROMPT>%</PROMPT> cp /etc/passwd /etc/passwd<USERINPUT><ENTER></USERINPUT>
323 <PROMPT>%</PROMPT> cp /etc/passwd /etc/passwd<USERINPUT><.old></USERINPUT>
324 </LITERALLAYOUT>
325
326 The F7 key prints the last argument of the previous command.
327 </para>
328 </answer>
329 </qandaentry>
330
331
332
333 <qandaentry>
334 <question>
335 <para>
336 When I do "cd<TAB>", I only see directories. This is nice!
337 </para>
338 </question>
339 <answer>
340 <para>
341 This is part of the <EMPHASIS>completion</EMPHASIS> functionality, and it is configured
342 in <FILENAME>.tcshrc.complete</FILENAME>.
343 </para>
344 </answer>
345 </qandaentry>
346
347
348
349 <qandaentry>
350 <question>
351 <para>
352 Auto-correction confuses me.
353 </para>
354 </question>
355 <answer>
356 <para>
357 Try this
358
359 <LITERALLAYOUT>
360 <PROMPT>%</PROMPT> <USERINPUT>cd /usr/locl/bin<ENTER></USERINPUT>
361 CORRECT> cd /usr/local/bin (y|n|e)?<USERINPUT><SPACE></USERINPUT> or <USERINPUT><y></USERINPUT>
362 <PROMPT>%</PROMPT>
363 </LITERALLAYOUT>
364 </para>
365 <para>
366 For the opposite, suppose you really want to make the directory
367 <FILENAME>/usr/locall</FILENAME>
368
369 <LITERALLAYOUT>
370 <PROMPT>%</PROMPT> <USERINPUT>mkdir /usr/locall<ENTER></USERINPUT>
371 CORRECT> mkdir /usr/local (y|n|e)?<ENTER> or <n>
372 <PROMPT>%</PROMPT>
373 </LITERALLAYOUT>
374
375 Consider that the SPACE key means <EMPHASIS>acceptance of suggestion</EMPHASIS>
376 while the ENTER key means <EMPHASIS>forcing what we wrote</EMPHASIS>.
377 </para>
378 </answer>
379 </qandaentry>
380
381
382 <qandaentry>
383 <question>
384 <para>
385 What does the F1 key do?
386 </para>
387 </question>
388 <answer>
389 <para>
390 It prints the man page (if there is one) of the current command you are trying to execute. It is used like in the following.
391
392 <LITERALLAYOUT>
393 <PROMPT>%</PROMPT> <USERINPUT> ncftp<F1></USERINPUT>
394
395 <emphasis>the command "man ncftp" is executed. once you have found the information
396 you are interested in, you may hit <USERINPUT>q</USERINPUT> and continue
397 editing the command line.</emphasis>
398 <PROMPT>%</PROMPT> ncftp
399 </LITERALLAYOUT>
400
401 It does not disturb the command you are current editing. At present, the <emphasis>man</emphasis>
402 application is used to provide full help documentation. Another option is to use <emphasis>whatis</emphasis>.
403 If you are aware of a utility that provides short help of up to 15 lines for typical UNIX commands,
404 the author would be glad to hear about.
405 </para>
406 </answer>
407 </qandaentry>
408
409 <qandaentry>
410 <question>
411 <para>
412 What do the F2 and F3 keys do?
413 </para>
414 </question>
415 <answer>
416 <para>
417 Suppose you are editing a long line. F2 sets a mark to the command line while F3 is used to switch between
418 the current position and the marked position.
419
420 </para>
421 </answer>
422 </qandaentry>
423
424 <qandaentry>
425 <question>
426 <para>
427 What does the F4 key do?
428 </para>
429 </question>
430 <answer>
431 <para>
432 Currently nothing.
433
434 </para>
435 </answer>
436 </qandaentry>
437
438
439 <qandaentry>
440 <question>
441 <para>
442 What do F5 and F6 do?
443 </para>
444 </question>
445 <answer>
446 <para>
447 F5 does a spelling check on the current line while F6 spell-checks the current word the cursor is at.
448 Spelling is typically done by checking that filenames or directories exist. You may find it usufull when you type
449 a long command line without hitting the TAB key and you notice that some filenames are not correct.
450
451 <LITERALLAYOUT>
452 <PROMPT>%</PROMPT> <USERINPUT> cd /usr/loca/bin<F5></USERINPUT>
453 <PROMPT>%</PROMPT> <USERINPUT> cd /usr/local/bin</USERINPUT>
454 </LITERALLAYOUT>
455 </para>
456 </answer>
457 </qandaentry>
458
459
460 <qandaentry>
461 <question>
462 <para>
463 What does the F7 key do?
464 </para>
465 </question>
466 <answer>
467 <para>
468 Without F7, you would do
469
470 <LITERALLAYOUT>
471 <PROMPT>%</PROMPT> <USERINPUT> cd /tmp</USERINPUT>
472 <PROMPT>%</PROMPT> <USERINPUT> ls demodir</USERINPUT>
473 not found blah blah
474 <PROMPT>%</PROMPT> <USERINPUT> mkdir demodir</USERINPUT>
475 <PROMPT>%</PROMPT> <USERINPUT> cd demodir</USERINPUT>
476
477 With F7, you do:
478
479 <PROMPT>%</PROMPT> <USERINPUT> cd /tmp</USERINPUT>
480 <PROMPT>%</PROMPT> <USERINPUT> mkdir demodir</USERINPUT>
481 <PROMPT>%</PROMPT> <USERINPUT> cd <F7></USERINPUT>
482 <PROMPT>%</PROMPT> cd demodir<USERINPUT><ENTER></USERINPUT>
483 </LITERALLAYOUT>
484
485 Try several times to get used to it.
486 F7 prints the last argument of the previous command.
487 </para>
488 </answer>
489 </qandaentry>
490
491
492
493 <qandaentry>
494 <question>
495 <para>
496 What does F8 do?
497 </para>
498 </question>
499 <answer>
500 <para>
501 F8 searches the command history for commands that match the current line,
502 up to the cursor. For example, suppose we want to invoke the history line 18.
503 In a real case, we do not need to type <emphasis>history</emphasis> to check
504 out the previous commands. We typically remember them.
505
506 <LITERALLAYOUT>
507 <PROMPT>%</PROMPT> <USERINPUT> history<ENTER></USERINPUT>
508 17 21:54 clear
509 18 21:59 cd /usr/local/samba/bin
510 19 21:59 ls -l
511 20 22:00 cd ../lib
512 21 22:02 vi *
513 22 22:02 cd
514 23 22:02 smbclient -L //SERVER/share -U test
515 24 22:02 history
516
517 <PROMPT>%</PROMPT> <USERINPUT> cd<F8></USERINPUT>
518 <PROMPT>%</PROMPT> cd
519 <PROMPT>%</PROMPT> cd <USERINPUT><F8></USERINPUT>
520 <PROMPT>%</PROMPT> cd ../lib
521 <PROMPT>%</PROMPT> cd ../lib<USERINPUT> <F8></USERINPUT>
522 <PROMPT>%</PROMPT> cd /usr/local/samba/bin
523 </LITERALLAYOUT>
524 </para>
525 </answer>
526 </qandaentry>
527
528 <qandaentry>
529 <question>
530 <para>
531 What does F9 do?
532 </para>
533 </question>
534 <answer>
535 <para>
536 It simply clear the current screen. It is smarter than a simple <application>clear</application>
537 command, it does not affect the current line you are editing.
538
539 </para>
540 </answer>
541 </qandaentry>
542
543 <qandaentry>
544 <question>
545 <para>
546 What does F10 do?
547 </para>
548 </question>
549 <answer>
550 <para>
551 <application>ls -l</application> is among the most common commands one typically types.
552 F10 does just that, it executes that command. This one does affect the current line you are editing.
553 A workaround is sought that does not affect the current line.
554
555 </para>
556 </answer>
557 </qandaentry>
558
559 <qandaentry>
560 <question>
561 <para>
562 What does F11 do?
563 </para>
564 </question>
565 <answer>
566 <para>
567 It shows the current load of the system and like F9, it does not affect the current line you are editing.
568 On the other hand it does not appear to be enabled on Linux. It remains there until a solution is found.
569 </para>
570 </answer>
571 </qandaentry>
572
573 <qandaentry>
574 <question>
575 <para>
576 What does F12 do?
577 </para>
578 </question>
579 <answer>
580 <para>
581 It does standard completion, irrelevant of the smart and configurable completion that tcsh provides.
582 There are some cases that the smart completion is not smart enough. This is where F12 comes in. For example,
583 suppose you have a file called lynx_bookmarks.html and you want to make a backup adding an extension. You may use
584 the trick described elsewhere in this FAQ, using the F7 key, or you can do the following.
585
586 <LITERALLAYOUT>
587 <PROMPT>%</PROMPT> <USERINPUT> cp ly<TAB></USERINPUT>
588 <PROMPT>%</PROMPT> cd lynx_bookmarks.html
589 <PROMPT>%</PROMPT> cd lynx_bookmarks.html<USERINPUT> ly<F12></USERINPUT>
590 <PROMPT>%</PROMPT> cd lynx_bookmarks.html lynx_bookmarks.html<USERINPUT>.old<ENTER></USERINPUT>
591 </LITERALLAYOUT>
592
593 </para>
594 </answer>
595 </qandaentry>
596
597
598
599
600
601
602
603 <qandaentry>
604 <question>
605 <para>
606 What do these lines mean?
607
608 <literallayout>
609 root has logged on pts/0 from :0.
610 root has logged on pts/1 from :0.
611 root has logged on tty1 from local.
612 </literallayout>
613 </para>
614 </question>
615 <answer>
616 <para>
617 They are part of the <EMPHASIS>watch</EMPHASIS> facility.
618 Whenever you run a command in tcsh, tcsh checks if someones has
619 logged on/off the system. If so, it will print it here.
620 It is quite handy to know what is going on your system.
621 It is even handy if you run a non-networked system, to know where you
622 have shells open.
623 </para>
624 </answer>
625 </qandaentry>
626
627
628 <qandaentry>
629 <question>
630 <para>
631 I was compiling an application and at the end of it I got
632
633 <literallayout>
634 Time spent in user mode (CPU seconds) : 8.810s
635 Time spent in kernel mode (CPU seconds) : 1.030s
636 Total time : 0:11.66s
637 CPU utilisation (percentage) : 84.3%
638 Times the process was swapped : 0
639 Times of major page faults : 29424
640 Times of minor page faults : 28521
641 </literallayout>
642
643 </para>
644 </question>
645 <answer>
646 <para>
647 These are some statistics that TCSH can provide (in a human readable manner)
648 using a special command (time).
649 With the current configuration, it is printed automatically whenever
650 a process takes quite a bit of time to complete. It shows the time
651 the process spent in kernel and user mode, the total time used for the
652 process, the CPU utilisation (user+kernel time / total time) in %.
653 The swapped times is the times the whole process was swapped.
654 If you have plenty of memory, you usually get 0 here.
655 </para>
656 <para>
657 For the page faults, a small operating system tutorial. In modern operating
658 systems, memory is used in chunks called pages. These pages can be swapped
659 to the swap partition to make space for other processes. When our process
660 is running and it cannot find one of its <emphasis>pages</emphasis>,
661 it issues a <emphasis>fault</emphasis>, or
662 a <emphasis>page fault</emphasis> and makes arrangements to have the page up.
663 The fewer the page faults, the better. The <emphasis>page fault</emphasis>
664 terminology is a bit wierd and it comes from long time ago.
665
666 <NOTE>
667 <PARA>the amount of page faults look to me rather a lot, perhaps they are
668 faults regarding the presense of the page in the memory cache and not the
669 swap. If a kernel hacker knows about this stuff and can have a look in the
670 source code of TCSH, please clarify this issue.
671 </PARA>
672 </NOTE>
673 </para>
674 </answer>
675 </qandaentry>
676
677
678 <qandaentry>
679 <question>
680 <para>
681 I find it a bit awkward when I change back and forth directories.
682 Any nice trick?
683 </para>
684 </question>
685 <answer>
686 <para>
687 You can use the <emphasis>cd -</emphasis> command. It takes you to the previous directory.
688 Try it once more to take you to the initial directory.
689 </para>
690 </answer>
691 </qandaentry>
692
693
694 <qandaentry>
695 <question>
696 <para>
697 How can I access that <EMPHASIS>cd /usr/local/samba/lib/</EMPHASIS> command I type ages ago?
698 </para>
699 </question>
700 <answer>
701 <para>
702 As long as you remember the beginning of the command that resides in the
703 history, you can access it quickly.
704 </para>
705 <para>
706 Do
707
708 <LITERALLAYOUT>
709 <PROMPT>%</PROMPT> <USERINPUT> cd /usr/local/samba/lib/</USERINPUT>
710 <PROMPT>%</PROMPT> <USERINPUT> cd /usr/local/bin/</USERINPUT>
711 <PROMPT>%</PROMPT> <USERINPUT> cd /etc/</USERINPUT>
712 </LITERALLAYOUT>
713 </para>
714
715 <para>
716 Now you want to go to samba/lib.
717 <LITERALLAYOUT>
718 <PROMPT>%</PROMPT> <USERINPUT> cd <ESC p></USERINPUT>
719 <PROMPT>%</PROMPT> cd /etc<USERINPUT><ESC p></USERINPUT>
720 <PROMPT>%</PROMPT> cd /usr/local/bin<USERINPUT><ESC p></USERINPUT>
721 <PROMPT>%</PROMPT> cd /usr/local/samba/lib
722 </LITERALLAYOUT>
723
724 That is, you press several times ESC p to go to the Previous occurence
725 of a similar command. If at some point you want to go to the next command
726 in the history, hit ESC n.
727 </para>
728 </answer>
729 </qandaentry>
730
731 <qandaentry>
732 <question>
733 <para>
734 What does ^G mean?
735 </para>
736 </question>
737 <answer>
738 <para>
739 Means you press Ctrl-G.
740 Speaking of ^G, try
741 <LITERALLAYOUT>
742 <PROMPT>%</PROMPT> <USERINPUT> echo <^V><^G><ENTER></USERINPUT>
743 </LITERALLAYOUT>
744
745 You will hear a BEEP.
746 ^V is used to <emphasis>mask</emphasis> the next character pressed.
747
748 </para>
749 </answer>
750 </qandaentry>
751
752
753
754 <qandaentry>
755 <question>
756 <para>
757 I want F4 to beep to me!
758 </para>
759 </question>
760 <answer>
761 <para>
762 You need to bind F4 with the beep. Beep is ^G.
763 Do
764 <LITERALLAYOUT>
765 <PROMPT>%</PROMPT> <USERINPUT>bindkey -c <^V><F4> "echo -n <^V><^G>"<ENTER></USERINPUT>
766 </LITERALLAYOUT>
767
768 That's it. You need to use it on an empty command line.
769
770 </para>
771 </answer>
772 </qandaentry>
773
774 <qandaentry>
775 <question>
776 <para>
777 How can I traverse the history (backwards and forwards) restricting the search to what I have typed until now?
778 </para>
779 </question>
780 <answer>
781 <para>
782 This is similar to the F8 key that goes only backwards. Check the question on the F8 key.
783 </para>
784 <para>
785 To go backwards, use the <USERINPUT>ESC p</USERINPUT> combination.
786 To go forwards, use the <USERINPUT>ESC n</USERINPUT> combination.
787 p is for previous and n for next. You hit first ESC, then you hit either p or n.
788
789 </para>
790 </answer>
791 </qandaentry>
792
793
794 <qandaentry>
795 <question>
796 <para>
797 How can I make it so that these .tcshrc* files are added to each newly created user?
798 </para>
799 </question>
800 <answer>
801 <para>
802 You need to copy them to the <FILENAME CLASS="DIRECTORY">/etc/skel</FILENAME> directory.
803 Then, the utility that creates new users will automatically include the tcsh
804 configuration files. We assume that the tcsh shell has been chosen for the new user.
805 In the future a script will be written that installs these files on a per-user basis.
806 </para>
807 </answer>
808 </qandaentry>
809
810
811 </qandaset>
812
813 </CHAPTER>
814
815 </BOOK>