Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 2002 23:00:51 -0500
From:      David Loszewski <davidl@metro2000.net>
To:        Jamie Jones <jamie@host-811.news.bishopston.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Aliasing problems
Message-ID:  <3C995AF3.30209@metro2000.net>
References:  <3C9937AC.3080506@metro2000.net> <200203210236.g2L2ad36098446@catflap.bishopston.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Jamie Jones wrote:

> In muc.lists.freebsd.questions, you wrote:
> 
>>I seem to be having problems aliasing programs within just about any 
>>startup file.  If I try to do something as simple as:
>>
>>alias ls "ls -F"
>>
>>in the .xinitrc file and then try to sh it I get:
>>
>>alias: ls not found
>>alias: ls -F not found
>>
> 
> Firstly, the alias for you mention is for the csh/tcsh shells.
> The syntax for "sh" is:
> 
> alias ls="ls -F"
> 
> secondly, if you "sh" the file, the file will be run in a new shell,
> the alias will be setup, then subsequently lost when the shell exits..
> 
> You need to *source* the file, using "." instead of "sh" to load it:
> 
> . ./filename
>  
> 
>>why would this be happening? this happens with anything that I try to 
>>alias but if I try to alias it temporarily at the console it works fine.
>>
> 
> presumably, you are using the default shell on the console of "csh" ?
> 
> In which case, you "source" the file with:
> 
> source ./filename
> 
> Cheers,
> jamie
> 
> 

i have zsh, I don't know if that would make a difference, but I did it 
with the = instead and everything the way you said to do it and this 
time it didn't give me any errors but it also didn't do anything, if I 
type that command it doesn't come out right yet if I just do it on the 
command line instead of executing a file it works fine.

Dave

-- 
David Loszewski
G4 Communications Corp.
V: 603.296.4400 / F: 603.647.7576
E: support@g4.net / W3: www.G4communications.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C995AF3.30209>