Date: Thu, 21 Mar 2002 02:36:39 +0000 From: Jamie Jones <jamie@host-811.news.bishopston.com> To: David Loszewski <davidl@metro2000.net>, freebsd-questions@freebsd.org Subject: Re: Aliasing problems Message-ID: <200203210236.g2L2ad36098446@catflap.bishopston.net> In-Reply-To: <3C9937AC.3080506@metro2000.net> References: <3C9937AC.3080506@metro2000.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 -- Jamie Jones <jamie@bishopston.com> http://www.bishopston.com/jamie/ --- 279 days to Christmas! Word of the day: "phototherapeutics" ---- "I'm not big, and I'm not clever. And I'm definitely not funny." ----------- The reply address on this posting expires in 7 days time. 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?200203210236.g2L2ad36098446>