Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

escape to shell from vi - which shell? 2

Status
Not open for further replies.

kasparov

Programmer
Feb 13, 2002
203
GB
I log onto my system & am forced into csh. I always change this to ksh. When I subsequently run a shell command from within vi (e.g. by doing :!pwd) then the command is executed using csh. I know this because (a) some commands don't work as I'd like them to & (b) if I do :!ps -f I see a csh process which I don't want.

My question is how can I change the shell which is executed when I escape from vi. I am assuming it's chosen csh because that is my login's first shell - but I may be wrong there. I don't want to change my login's default shell because this may affect other things we do with my ID.

Perhaps there is a .exrc setting? A general system wide solution would be good but this may not be advisable as it may also have unwanted knock on effects.

Thanks, Chris
 

Try:

:!ksh <command>

[3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Hi LKBrwnDBA - Yes - I could do that as a one off but is there a way to set my escaped shell permanently?

Cheers
 
Use the SHELL environment variable.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV & ZaSter - both solutions are useful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top