PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 1ms

/contrib/tcsh/FAQ

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