Re: Setting up aliases outside .bashrc
From: Roy Schestowitz (newsgroups_at_schestowitz.com)
Date: 07/14/05
- Next message: Mustang: "Suse 9.2 and toshiba A30-614 working ?"
- Previous message: mbjj: "Flashdrive/Traveldrive"
- In reply to: houghi: "Re: Setting up aliases outside .bashrc"
- Next in thread: houghi: "Re: Setting up aliases outside .bashrc"
- Reply: houghi: "Re: Setting up aliases outside .bashrc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 14 Jul 2005 14:40:43 +0100
houghi wrote:
> Arne Schmitz wrote:
>> Roy Schestowitz schrieb:
>>
>>> Is there some scope
>>> limitation? Do they expire when scripts apart from .bashrc end?
>>
>> You have to source the script, not execute it from .bashrc. Sourcing is
>> done like this:
>>
>> . yourscript.sh
>>
>> Without the leading tab, of course.
>
> I have the following in my bashrc:
> test -s ~/.alias && . ~/.alias
>
> Then I put my aliasses in `.alias`
> alias newspost="newspost -v -e /home/houghi/newspost.txt"
> alias ldir='ls -l|grep "^d"'
> alias r90="mogrify -rotate 90 "
> alias r270="mogrify -rotate 270 "
> alias r180="mogrify -rotate 180 "
> <snip>
>
> That line is in there by default. No idea what the OP wants to put in as
> script, because aliasses are aliasses. A script is something different.
Thank you Houghi and Arne for the quick response.
I have used the first solution as it was simpler. I also learned something
new. *smile*
I am aware that aliases should not be put in a script. I have done it ever
since I started using Linux and it never broke so I carried on with these
tactless definitions. I am now at the stage where I 'clean up' my bad Linux
practices because stupidity is costly.
Roy
-- Roy S. Schestowitz http://Schestowitz.com
- Next message: Mustang: "Suse 9.2 and toshiba A30-614 working ?"
- Previous message: mbjj: "Flashdrive/Traveldrive"
- In reply to: houghi: "Re: Setting up aliases outside .bashrc"
- Next in thread: houghi: "Re: Setting up aliases outside .bashrc"
- Reply: houghi: "Re: Setting up aliases outside .bashrc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|