This is the mail archive of the
cygwin
mailing list for the Cygwin project.
tcsh and chere-0.3-1
- From: Andrew Grimm <agrimm at redwood dot rsc dot raytheon dot com>
- To: cygwin at cygwin dot com
- Cc: d_inabox at yahoo dot com
- Date: Wed, 13 Oct 2004 15:58:02 -0600 (MDT)
- Subject: tcsh and chere-0.3-1
The new (very cool!) chere package doesn't work with tcsh, at least on my
system. The problem is that "tcsh -l" doesn't work with any additional
arguments. There is even a comment to that effect in the script:
tcsh )
# Apparently -l only applies if it is the only argument
# so this may not work
SHELL_EXE="/bin/tcsh.exe"
SHELL_CMD="-l -c \\\"cd '%L'; exec $SHELL_EXE\\\""
If I run this, the tcsh immediately bombs out, closing the shell window,
because tcsh exits when it sees the additional arguments.
There may not be a perfect solution because tcsh won't work with the
code pattern used for the other shells. If you make the exec'd shell a
login shell it cd's to your home directory which defeats the purpose of
the package. This hack works for me, it doesn't create a real login
shell but it fakes one fairly well:
SHELL_CMD="-f -c \\\"if ( -f /etc/csh.login ) source
/etc/csh.login; if ( -f /etc/csh.cshrc ) source /etc/csh.cshrc; if ( -f
~/.tcshrc ) source ~/.tcshrc; if ( -f ~/.login ) source ~/.login; cd '%L';
exec $SHELL_EXE\\\""
A more complicated line could be created to handle more unusual tcsh
configurations but this approach works with the default setup.
-Andy
P.S. Output of "chere -r" as requested on bug reports (with the above
modification to line 244 of the chere script):
OS is CYGWIN_NT-5.0
chere version 0.3
--- ash keys ---
--- bash keys ---
--- cmd keys ---
--- pdksh keys ---
--- tcsh keys ---
Directory menu item
&Tcsh Here
Directory command
D:\cygwin\bin\rxvt.exe -e /bin/tcsh.exe -f -c "if ( -f /etc/csh.login )
source /etc/csh.login; if ( -f /etc/csh.cshrc ) source /etc/csh.cshrc; if
( -f ~/.tcshrc ) source ~/.tcshrc; if ( -f ~/.login ) source ~/.login; cd
'%L'; exec /bin/tcsh.exe"
Drive menu item
&Tcsh Here
Drive command
D:\cygwin\bin\rxvt.exe -e /bin/tcsh.exe -f -c "if ( -f /etc/csh.login )
source /etc/csh.login; if ( -f /etc/csh.cshrc ) source /etc/csh.cshrc; if
( -f ~/.tcshrc ) source ~/.tcshrc; if ( -f ~/.login ) source ~/.login; cd
'%L'; exec /bin/tcsh.exe"
Uninstall description
Cygwin Tcsh Prompt Here
Uninstall command
D:\cygwin\bin\sh -c "/bin/chere -u -s tcsh"
--- zsh keys ---
--- passwd keys ---
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/