Re: alias in tcsh
From: Bill Marcum (bmarcum_at_iglou.com.urgent)
Date: 12/03/03
- Next message: Jens Pedersen: "Re: "grep" several lines"
- Previous message: Ed Morton: "Re: Shell won't execute perfectly good file"
- In reply to: M: "alias in tcsh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 2 Dec 2003 22:20:08 -0500
On 1 Dec 2003 19:01:56 -0800, M
<greenandkind@yahoo.com> wrote:
> Hello all,
>
> I am trying to set a simple alias in my .profile
> The deafault shell we're working in is ksh. In .profile, I set it to
> tcsh that I am so used to and dearly love, and in the next line try to
> set simple alias, say: alias ls 'ls -l -a'. This, I understand should
> be the correct syntax for tcsh, but it seems that somehow, while
> executing tcsh from .profile, it is still doesn't recognize it at the
> point of execution of the next line. So it rejects the alias syntax.
> If I use ksh syntax for alias, it still doesn't work, because after
> execution of .profile, I'm already in tcsh.
> Could someone point me to a solution of this little nuisance?
>
If you wrote it like this:
tcsh
alias ls 'ls -l -a'
it won't work, because the alias command isn't seen until tcsh exits.
The proper way is (a) change your shell with "chsh", or (b) end your
.profile with "exec tcsh", and put the alias in .cshrc.
-- Thanks to Nigeria, any email with the word "urgent" in the subject or address will be deleted.
- Next message: Jens Pedersen: "Re: "grep" several lines"
- Previous message: Ed Morton: "Re: Shell won't execute perfectly good file"
- In reply to: M: "alias in tcsh"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|