/contrib/tcsh/FAQ

https://bitbucket.org/freebsd/freebsd-head/ · #! · 304 lines · 222 code · 82 blank · 0 comment · 0 complexity · 1f439b4717b07ca3e98400e893b679ab MD5 · raw file

  1. [Home] FAQ
  2. Home | RecentChanges | Preferences
  3. _________________________________________________________________
  4. This is for people who do not read the manual!
  5. So far people who don't read manuals don't read this either... I may
  6. call it README.*PLEASE* in the future, but then the same people won't
  7. be able to get ftp it... :-)
  8. _________________________________________________________________
  9. 1. Where can I find tcsh sources?
  10. See http://www.tcsh.org/MostRecentRelease for download locations.
  11. _________________________________________________________________
  12. 2. Why is the meta key broken in tcsh-5.20 and up?
  13. On some machines the tty is not set up to pass 8 bit characters by
  14. default. Tcsh 5.19 used to try to determine if pass8 should be set by
  15. looking at the terminal's meta key. Unfortunately there is no good way
  16. of determining if the terminal can really pass 8 characters or not.
  17. Consider if you are logged in through a modem line with 7 bits and
  18. parity and your terminal has a meta key. Then tcsh 5.19 would set
  19. wrongly set pass8.
  20. If you did like the previous behavior you can add in /etc/csh.login,
  21. or in .login:
  22. if ( $?tcsh && $?prompt ) then
  23. if ( "`echotc meta`" == "yes" ) then
  24. stty pass8
  25. endif
  26. endif
  27. If you don't have pass8, maybe one of these would work..
  28. stty -parity -evenp -oddp cs8 -istrip (rs6000)
  29. stty -parenb -istrip cs8
  30. Finally, tcsh will bind all printable meta characters to the self
  31. insert command. If you don't want that to happen (i.e. use the
  32. printable meta characters for commands) setenv NOREBIND.
  33. _________________________________________________________________
  34. 3. I ran 'dbxtool &' and 'shelltool &' from tcsh, and they end up in
  35. cbreak and no echo mode?
  36. These programs are broken. Background jobs should not try to look at
  37. the tty. What happens is that dbxtool looks in stderr to inherit the
  38. tty setups, but tcsh sets up the tty in cbreak and -echo modes, so
  39. that it can do line editing. This cannot be fixed because tcsh cannot
  40. give away the tty. Pick one of the following as a workaround:
  41. dbxtool < /dev/null >& /dev/null &
  42. /usr/etc/setsid dbxtool &
  43. If that does not work, for dbxtool at least you can add "sh stty sane"
  44. in your .dbxinit
  45. _________________________________________________________________
  46. 4. I tried to compile tcsh and it cannot find <locale.h>?
  47. Your system does not support NLS. Undefine NLS in config_f.h and it
  48. should work fine.
  49. _________________________________________________________________
  50. 5. Where can I get csh sources?
  51. Csh sources are now available with the 4.4BSD networking
  52. distributions. You don't need csh sources to compile tcsh-6.0x.
  53. _________________________________________________________________
  54. 6. I just made tcsh my login shell, and I cannot ftp any more?
  55. Newer versions of the ftp daemon check for the validity of the user's
  56. shell before they allow logins. The list of valid login shells is
  57. either hardcoded or it is usually in a file called /etc/shells. If it
  58. is hard-coded, then you are out of luck and your best bet is to get a
  59. newer version of ftpd. Otherwise add tcsh to the list of shells. [For
  60. AIX this file is called /etc/security/login.cfg.] Remember that the
  61. full path is required. If there is no /etc/shells, and you are
  62. creating one, remember to add /bin/csh, /bin/sh, and any other valid
  63. shells for your system, so that other people can ftp too :-)
  64. _________________________________________________________________
  65. 7. I am using SunView or OpenWindows and editing is screwed up. In
  66. particular my arrow keys and backspace don't work right. What am I
  67. doing wrong?
  68. Well, cmdtool tries to do its own command line editing and the effect
  69. you get is one of using an editor inside an editor. Both try to
  70. interpret the arrow key sequences and cmdtool wins since it gets them
  71. first. The solutions are in my order of preference:
  72. 1. Don't use suntools
  73. 2. Use shelltool instead of cmdtool.
  74. 3. Unset edit in tcsh.
  75. _________________________________________________________________
  76. 8. On a SPARCstation running Solaris 2.x and OpenWindows 3.1, inside a
  77. cmdtool, the short-cut key sequence to clear log (i.e. Meta-e or
  78. Diamond-e) doesn't work: it just echos 'e'; or
  79. Unset edit in tcsh.
  80. _________________________________________________________________
  81. 9. On a SPARCstation running Solaris 2.x and OpenWindows 3.1, maketool
  82. (within SPARCworks) doesn't work: it just does a `cd' to the working
  83. directory then stops.
  84. Unset edit in tcsh. Using shelltool instead of cmdtool does not fix
  85. this.
  86. _________________________________________________________________
  87. 10. I rlogin to another machine, and then no matter what I tell 'stty'
  88. I cannot get it to pass 8 bit characters?
  89. Maybe you need to use 'rlogin -8' to tell rlogin to pass 8 bit
  90. characters.
  91. _________________________________________________________________
  92. 11. Where do I get the public domain directory library?
  93. Anonymous ftp to prep.ai.mit.edu:/pub/gnu/dirent.tar.Z
  94. _________________________________________________________________
  95. 12. I compiled tcsh using gcc, and when I start up it says: tcsh:
  96. Warning no access to tty (Invalid Argument). Thus no job control in
  97. this shell
  98. Your <sys/ioctl.h> file is not ansi compliant. You have one of 3
  99. choices:
  100. 1. Run fixincludes from the gcc distribution.
  101. 2. Add -traditional to the gcc flags.
  102. 3. Compile with cc.
  103. _________________________________________________________________
  104. 13. I compiled tcsh with the SunOS unbundled compiler and now things
  105. get echo'ed twice.
  106. It is a bug in the unbundled optimizer. Lower the optimization level.
  107. _________________________________________________________________
  108. 14. How can I use the arrow keys with hpterm?
  109. Hp terminals use the arrow keys internally. You can tell hpterm not to
  110. do that, by sending it the termcap sequence smkx. Since this has to be
  111. done all the time, the easiest thing is to put it as an alias for
  112. precmd, or inside the prompt:
  113. if ($term == "hp") then
  114. set prompt="%{`echotc smkx`%}$prompt"
  115. endif
  116. Note that by doing that you cannot use pgup and pgdn to scroll... Also
  117. if you are using termcap, replace "smkx" with "ks"...
  118. _________________________________________________________________
  119. 15. On POSIX machines ^C and ^Z will do not work when tcsh is a login
  120. shell?
  121. Make sure that the interrupt character is set to ^C and suspend is set
  122. to ^Z; 'stty -a' will show you the current stty settings; 'stty intr
  123. ^C susp ^Z' will set them to ^C and ^Z respectively.
  124. _________________________________________________________________
  125. 16. I am trying to compile tcsh and I am getting compile errors that
  126. look like:
  127. >sh.c:???: `STR???' undeclared, outside of functions [gcc]
  128. >"sh.c", line ???: STR??? undefined [cc]
  129. You interrupted make, while it was making the automatically generated
  130. headers. Type 'make clean; make'
  131. _________________________________________________________________
  132. 17. On the cray, sometimes the CR/LF mapping gets screwed up.
  133. You are probably logged in to the cray via telnet. Cray's telnetd
  134. implements line mode selection the telnet client you are using does
  135. not implement telnet line mode. This cause the Cray's telnetd to try
  136. to use KLUDGELINEMODE. You can turn off telnet line mode from the cray
  137. side by doing a "stty -extproc", or you can get the Cray AIC to build
  138. a telnetd without KLUDGELINEMODE, or you can compile a new telnet
  139. client (from the BSD net2 tape), or at least on the suns use: 'mode
  140. character'.
  141. _________________________________________________________________
  142. 18. On AU/X, I made tcsh my startup shell, but the mac desktop is not
  143. starting up (no X11 or Finder), and I only get console emulation.
  144. This is another manifestation of item 5. Just add the pathname to tcsh
  145. in /etc/shells and everything should work fine.
  146. _________________________________________________________________
  147. 19. On machines that use YP (NIS) tilde expansion might end up in
  148. /dev/null
  149. If this happens complain to your vendor, to get a new version of NIS.
  150. You can fix that in tcsh by defining YPBUGS in config.h
  151. _________________________________________________________________
  152. 20. Script on SGI 4.0.5 does not give us a tty, so we cannot have job
  153. control.
  154. Their csh does not have job control either. Try:
  155. % script
  156. % cat > /dev/tty
  157. _________________________________________________________________
  158. 21. I start tcsh and it takes a couple of minutes to get the prompt.
  159. You have defined REMOTEHOST and your DNS is not responding. Either
  160. undefine REMOTEHOST and recompile or fix your DNS.
  161. _________________________________________________________________
  162. 22. If you need help generating your .cshrc file, check out:
  163. http://www.imada.sdu.dk/~blackie/dotfile/
  164. or
  165. http://www.dotfiles.com
  166. _________________________________________________________________
  167. 23. On POSIX systems the kernel will send hup signals to all the
  168. processes in the foreground process group if 'stty hupcl' is set.
  169. For example
  170. ./tcsh
  171. echo $$
  172. 591
  173. ./tcsh
  174. kill -6 591
  175. Will kill everything, since hup will be sent to all tcsh processes. To
  176. avoid that you can set stty -hupcl, but it is not recommended.
  177. _________________________________________________________________
  178. 24. When I rsh the meta key stops working on the remote machine.
  179. Try using rsh -8; this option is undocumented on some systems, but it
  180. works. If that does not work, get and use ssh/sshd. You'll be better
  181. off from a security point of view anyway.
  182. _________________________________________________________________
  183. 25. Tcsh compiled under hp/ux-10.x does not pass resource limits
  184. correctly when ran on hp/ux-11.x systems.
  185. This is a problem with lack of ABI compatibility between the two
  186. systems. The only solution is to recompile.
  187. _________________________________________________________________
  188. 26. Refreshing in command line editing can appear broken on some OS's
  189. This is because the termcap/terminfo description lies about the
  190. ability of the terminal to use tabs. At least on Compaq/DEC Alpha
  191. OSF/1 3.x and 4.x systems, stty -tabs will cause problems.
  192. _________________________________________________________________
  193. 27. Where can I learn the merits of tcsh vs. bash vs. csh vs. sh etc?
  194. You can read the manual page section titled [NEW FEATURES] listing
  195. features that tcsh adds to csh.
  196. You can read Tom Christiansen's [Csh Programming Considered Harmful],
  197. a document advocating that csh (and by extension, tcsh) should not be
  198. used for writing shell scripts.
  199. XXX: Need to find something about [bash], but bash is sh-compatible
  200. and has many of the same interactive features of tcsh (command
  201. completion does not appear to be as flexible, though).
  202. [Curtains up: introducing the Z shell] has a pretty good rundown on
  203. zsh. Aside from the arguments about csh being evil, tcsh appears to
  204. compare well with zsh [zsh]. Zsh is sh and ksh compatible, with many
  205. of the interactive features of tcsh.
  206. _________________________________________________________________
  207. 28. Why does FreeBSD's tcsh do history browsing differently than I
  208. expect?
  209. On FreeBSD, by default, the up arrow is set to
  210. "history-search-backward", rather than the default "up-history". As a
  211. result, if you type (part of) a word and press up arrow, you'll see
  212. previous commands that match the prefix. Pretty useful, actually,
  213. although it takes some getting used to. You can use bindkey to see
  214. your settings, and to rebind up & down differently if desired.
  215. _________________________________________________________________
  216. Everything else is a bug :-(
  217. Christos
  218. _________________________________________________________________
  219. Home | RecentChanges | Preferences
  220. Edit text of this page | View other revisions
  221. Last edited April 29, 2004 15:02 (diff)
  222. Search: ____________________