cygwin - tcsh
Started by TheUsualAlex, Dec 01 2003 02:27 PM
16 replies to this topic
#1
Posted 01 December 2003 - 02:27 PM
Hi,
Does anyone here know how to get tcsh to launch by default with all the shell functionality in tact? When I set the tcsh to be the default launch in the cygwin.bat file, I can't even do things like "ls" and such. Only when I launch bash by default first and invoke the tcsh shell -- then that'd work.
I guess I just like to launch tcsh by default first on the fly instead of typing tcsh and 2 exits afterwards...
Thanks.
Alex
Does anyone here know how to get tcsh to launch by default with all the shell functionality in tact? When I set the tcsh to be the default launch in the cygwin.bat file, I can't even do things like "ls" and such. Only when I launch bash by default first and invoke the tcsh shell -- then that'd work.
I guess I just like to launch tcsh by default first on the fly instead of typing tcsh and 2 exits afterwards...
Thanks.
Alex
#2
Posted 01 December 2003 - 08:21 PM
Here's how I setup a unix environment on Windows.
1. Download cygwin from http://www.cygwin.com I can't remember what packages I downloaded but the default ones should be good. Install it to c:/cygwin
2. Create the c:/bin directory. Copy the csh.exe from your latest Houdini distribution and put it into c:/bin.
3. Now set up a HOME environment variable to point to your home directory (eg. c:/home).
4. Inside $HOME, create a .login file. In the first lines, do something like this:
install to c:/Vim. Which means my .login has:
6. To launch, click on shortcut.
After this, you can further modify your .login file. A good start is to launch this csh and then do "printrc >> .login" which gives you a nice starting point. I generally comment out the lines "set correct=all" and "set autocorrect" as I find those features annoying. I dislike having my aliases stored in my .login file so I extracted those lines at the end out and put it into a separate file and use "source ~/.alias" instead.
Here's what I currently have in my ~/.alias file at home:
1. Download cygwin from http://www.cygwin.com I can't remember what packages I downloaded but the default ones should be good. Install it to c:/cygwin
2. Create the c:/bin directory. Copy the csh.exe from your latest Houdini distribution and put it into c:/bin.
3. Now set up a HOME environment variable to point to your home directory (eg. c:/home).
4. Inside $HOME, create a .login file. In the first lines, do something like this:
setenv PATH '.;'$HOME'/bin;c:/bin;c:/cygwin/bin;'$PATHOn my home system, I use the Windows version of vim and gvim (download from http://www.vim.org) which I
install to c:/Vim. Which means my .login has:
setenv PATH '.;'$HOME'/bin;c:/Vim/vim61;c:/bin;c:/cygwin/bin;'$PATH setenv EDITOR vim.exe setenv VISUAL gvim.exe5. Copy a shortcut from c:/bin/csh.exe to your desktop (and/or quicklaunch bar). Right-click on the new shortcut and choose Properties... In the Target name add the -l option after csh.exe. This tells csh.exe to source your .login file when it starts.
6. To launch, click on shortcut.
After this, you can further modify your .login file. A good start is to launch this csh and then do "printrc >> .login" which gives you a nice starting point. I generally comment out the lines "set correct=all" and "set autocorrect" as I find those features annoying. I dislike having my aliases stored in my .login file so I extracted those lines at the end out and put it into a separate file and use "source ~/.alias" instead.
Here's what I currently have in my ~/.alias file at home:
alias ls ls-F alias l ls-F alias ll ls-F -l alias h history alias rm rm -i alias rd rmdir alias md mkdir alias mv mv -i alias cp cp -i alias pwd 'echo $cwd' alias env printenv alias unsave unset savehist savedirs alias ali 'gvim ~/.alias; source ~/.alias'
don't panic!
#3
Posted 04 December 2003 - 02:05 PM
Hi Edward, Thanks so much for your info. Unfortunately, I am still unable to do it. I guess that's quite all right. I can just get by when what I have now.
Cheers,
Alex
Cheers,
Alex
#4
Posted 04 December 2003 - 06:26 PM
What's the problem?
don't panic!
#5
Posted 06 December 2003 - 07:44 PM
Hi Edward,
Well, in the cygwin.bat file, I specify it to launch tcsh by default (rem-ed the line on bash). tcsh launched just fine. But, default command such as ls, grep, pwd, etc. will not work. It's just a command not found. The strange thing is that it's fine if I launch bash shell first, and lauch tcsh from within bash shell. Not sure how to fix this, but I guess I'll just deal with bash-tcsh instead.
Thanks, Edward.
Alex
Well, in the cygwin.bat file, I specify it to launch tcsh by default (rem-ed the line on bash). tcsh launched just fine. But, default command such as ls, grep, pwd, etc. will not work. It's just a command not found. The strange thing is that it's fine if I launch bash shell first, and lauch tcsh from within bash shell. Not sure how to fix this, but I guess I'll just deal with bash-tcsh instead.
Thanks, Edward.
Alex
#6
Posted 06 December 2003 - 08:58 PM
That's because your path is not set up correctly. Notice how in my instructions I said to install cygwin into c:/cygwin which then my in .login script, I add c:/cygwin/bin to the PATH environment variable.
don't panic!
#7
Posted 18 December 2003 - 04:55 PM
Hi Edward, I finally got it to work last night. What I didn't do in the past was that I forgot to specify "tcsh -l" in the cygwin.bat file, hence the ls stuff wouldn't even work. Now everything worked. I guess emulation still has no match for the real UNIX environment still. But, I am happy. 
Thanks, Edward!
Thanks, Edward!
#8
Posted 18 December 2003 - 10:30 PM
Ah I see. You forgot step 5. Happy shell-scripting on Windows land! (and holidays too
don't panic!
#9
Posted 19 October 2005 - 03:14 PM
I use tcsh as well and everything works fine for me. I don't even really remember how I set things up, it's been a while. I did back-up all the configuration files, but I don't remember what I changed originally.
To think of it: The Cygwin toolset is one of the few things that makes Windows still, quite, worthwhile. I wonder if Microsoft realizes this, amidst all the 'new' and 'modern' (read: useless) features for each and - more hardware-demanding - release of Windows...
To think of it: The Cygwin toolset is one of the few things that makes Windows still, quite, worthwhile. I wonder if Microsoft realizes this, amidst all the 'new' and 'modern' (read: useless) features for each and - more hardware-demanding - release of Windows...
I approve of this message!
#10
Posted 16 October 2008 - 02:37 AM
hey guys,
gonna revive the thread from 2005 a little
i set up everything like edward described, and it works fine so far, but i'm having a problem with external editors.. i'm trying to use crimson editor(some windows editor) which apparently doesn't understand the unixy path houdini sends from the .tmp.str file it creates.
everything works fine with gvim but crimson complains about an invalid path which looks something like 'C:\bin\C:\Users\Aearon\AppData\Local\Temp\hfsblabla.tmp.str' while in gvim it shows up correctly as '~\AppData\Local\Temp\hfsblabla.tmp.str' and opens the file just fine
where the C:\bin at the start of the path is wherever y run houdini from in the shell
is there maybe some way to change the string houdini sends to the editor or anything i can change in my shell setup?
gonna revive the thread from 2005 a little
i set up everything like edward described, and it works fine so far, but i'm having a problem with external editors.. i'm trying to use crimson editor(some windows editor) which apparently doesn't understand the unixy path houdini sends from the .tmp.str file it creates.
everything works fine with gvim but crimson complains about an invalid path which looks something like 'C:\bin\C:\Users\Aearon\AppData\Local\Temp\hfsblabla.tmp.str' while in gvim it shows up correctly as '~\AppData\Local\Temp\hfsblabla.tmp.str' and opens the file just fine
where the C:\bin at the start of the path is wherever y run houdini from in the shell
is there maybe some way to change the string houdini sends to the editor or anything i can change in my shell setup?
#11
Posted 16 October 2008 - 05:20 AM
and another beginner question:
running csh.exe like this, how do you get key bindings as with cygwin? e.g. for the arrow keys (char back, char forward, up-history)
things like bindkey <ctrl-v>HOME beginning-of-line on the shell don't seem to have any effect? same for anything i tried in .login
running csh.exe like this, how do you get key bindings as with cygwin? e.g. for the arrow keys (char back, char forward, up-history)
things like bindkey <ctrl-v>HOME beginning-of-line on the shell don't seem to have any effect? same for anything i tried in .login
#12
Posted 16 October 2008 - 03:53 PM
Here's the .loginbindkeys file that I source from .login
#Bind keys for tcsh # Set vi bindings for keys #bindkey -v bindkey -b ^W backward-delete-word bindkey -b ^U backward-kill-line bindkey -b ^R complete-word-fwd bindkey -b M-g list-glob bindkey -b M-* expand-glob bindkey -b M-v expand-variables bindkey -b M-w normalize-command bindkey -b M-/ which-command bindkey -b N-up up-history bindkey -b N-down down-history bindkey -b N-right forward-char bindkey -b N-left backward-char bindkey -b N-del delete-char bindkey -b N-ins overwrite-mode bindkey -b N-1 which-command bindkey -b N-2 expand-history bindkey -b N-3 complete-word-raw bindkey -b N-home beginning-of-line bindkey -b N-end end-of-line
don't panic!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











