From owner-freebsd-questions Wed Mar 20 20: 1:51 2002 Delivered-To: freebsd-questions@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id 971A937B417 for ; Wed, 20 Mar 2002 20:01:43 -0800 (PST) Received: from metro2000.net ([24.128.40.215]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020321040143.JARI2626.rwcrmhc51.attbi.com@metro2000.net>; Thu, 21 Mar 2002 04:01:43 +0000 Message-ID: <3C995AF3.30209@metro2000.net> Date: Wed, 20 Mar 2002 23:00:51 -0500 From: David Loszewski User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.7) Gecko/20020111 X-Accept-Language: en-us MIME-Version: 1.0 To: Jamie Jones Cc: freebsd-questions@freebsd.org Subject: Re: Aliasing problems References: <3C9937AC.3080506@metro2000.net> <200203210236.g2L2ad36098446@catflap.bishopston.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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