Hi Users of Fedora
I added below line to last line fo my ~.bash_profile alias l='ls -la' I logout and login again then try issuing: $ l on command prompt but had no effect. Is there other way to make my custom alias (put in ~.bash_profile) work?
It has no problem if I make an alias in gnome-terminal : $ alias l='ls -la' $ l Issuing 'l' command on command prompt will produce the desired result.
Thank you yunus
On Mon, 2008-12-01 at 14:49 +0700, Yunus wrote:
Is there other way to make my custom alias (put in ~.bash_profile) work?
Just curious, but do they work if you put them in "~/.bashrc"?
Tim wrote:
On Mon, 2008-12-01 at 14:49 +0700, Yunus wrote:
Is there other way to make my custom alias (put in ~.bash_profile) work?
Just curious, but do they work if you put them in "~/.bashrc"?
Or in /etc/bashrc.
Unfortunately, exporting aliases is not supported by bash (neither in /etc/profile nor ~/.bash_profile) :-(
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Joachim Backes wrote:
Tim wrote:
On Mon, 2008-12-01 at 14:49 +0700, Yunus wrote:
Is there other way to make my custom alias (put in ~.bash_profile) work?
Just curious, but do they work if you put them in "~/.bashrc"?
Or in /etc/bashrc.
Unfortunately, exporting aliases is not supported by bash (neither in /etc/profile nor ~/.bash_profile) :-(
interesting, as i have in my ~/.bashrc;
# User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' alias d='ls' alias s='cd ..' alias p='cd -'
### added alias bye='sudo shutdown -h now' alias ca='clear;history -c' alias cs='clear' alias ch='history -c' alias dfs='df -B 1024|grep /dev/hd|sort' alias hm='cd -P' alias kde='startx' alias whom='who -HimqT'
and i get;
[geo@argosyiayia ~]$ alias alias bye='sudo shutdown -h now' alias ca='clear;history -c' alias ch='history -c' alias cp='cp -i' alias cs='clear' alias d='ls' alias dfs='df -B 1024|grep /dev/hd|sort' alias hm='cd -P' alias kde='startx' alias l.='ls -d .* --color=tty' alias ll='ls -l --color=tty' alias ls='ls --color=tty' alias mv='mv -i' alias p='cd -' alias rm='rm -i' alias s='cd ..' alias vi='vim' alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot \ --show-tilde' alias whom='who -HimqT' [geo@argosyiayia ~]$
something must be wrong with my systems, as this is what i have been doing from first use of linux.
also, executing '. .bashrc' will cause a rereading of '.bashrc' with out need of log out/in.
peace out.
tc,hago.
g .
**** in a free world without fences, who needs gates. ** to mess up a linux box, you need to work at it; to mess up an ms windows box, you just need to *look at* it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html.gz 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ ****
On Mon, 2008-12-01 at 13:48 +0000, g wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Joachim Backes wrote:
Tim wrote:
On Mon, 2008-12-01 at 14:49 +0700, Yunus wrote:
Is there other way to make my custom alias (put in ~.bash_profile) work?
Just curious, but do they work if you put them in "~/.bashrc"?
Or in /etc/bashrc.
Unfortunately, exporting aliases is not supported by bash (neither in /etc/profile nor ~/.bash_profile) :-(
interesting, as i have in my ~/.bashrc;
# User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' alias d='ls' alias s='cd ..' alias p='cd -'
### added alias bye='sudo shutdown -h now' alias ca='clear;history -c' alias cs='clear' alias ch='history -c' alias dfs='df -B 1024|grep /dev/hd|sort' alias hm='cd -P' alias kde='startx' alias whom='who -HimqT'
and i get;
[geo@argosyiayia ~]$ alias alias bye='sudo shutdown -h now' alias ca='clear;history -c' alias ch='history -c' alias cp='cp -i' alias cs='clear' alias d='ls' alias dfs='df -B 1024|grep /dev/hd|sort' alias hm='cd -P' alias kde='startx' alias l.='ls -d .* --color=tty' alias ll='ls -l --color=tty' alias ls='ls --color=tty' alias mv='mv -i' alias p='cd -' alias rm='rm -i' alias s='cd ..' alias vi='vim' alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot \ --show-tilde' alias whom='who -HimqT' [geo@argosyiayia ~]$
something must be wrong with my systems, as this is what i have been doing from first use of linux.
Same as everyone else. This is not exporting!
also, executing '. .bashrc' will cause a rereading of '.bashrc' with out need of log out/in.
Exactly. You do ". .bashrc", so the commands in .bashrc are executed *by the current shell*. Once again, this has nothing to do with exporting.
poc
On Mon, 2008-12-01 at 14:49 +0700, Yunus wrote:
Hi Users of Fedora
I added below line to last line fo my ~.bash_profile alias l='ls -la' I logout and login again then try issuing: $ l on command prompt but had no effect. Is there other way to make my custom alias (put in ~.bash_profile) work?
It has no problem if I make an alias in gnome-terminal : $ alias l='ls -la' $ l Issuing 'l' command on command prompt will produce the desired result.
Thank you yunus
Put the alias in .bashrc not .bash_profile -- ======================================================================= "I keep seeing spots in front of my eyes." "Did you ever see a doctor?" "No, just spots." ======================================================================= Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@sbcglobal.net
Yunus wrote:
Hi Users of Fedora
I added below line to last line fo my ~.bash_profile alias l='ls -la' I logout and login again then try issuing: $ l on command prompt but had no effect. Is there other way to make my custom alias (put in ~.bash_profile) work?
It has no problem if I make an alias in gnome-terminal : $ alias l='ls -la' $ l Issuing 'l' command on command prompt will produce the desired result.
Thank you yunus
If I remember correctly, you also need to export the alias. See if adding "export l" to .bash_profile helps.
Mikkel
You do not have to logout. You just got to 'source ~/.bash_profile' to make it work.
I am not using export after my aliases and it works.
:-)
On Mon, Dec 1, 2008 at 10:02 AM, Mikkel L. Ellertson < mikkel@infinity-ltd.com> wrote:
Yunus wrote:
Hi Users of Fedora
I added below line to last line fo my ~.bash_profile alias l='ls -la' I logout and login again then try issuing: $ l on command prompt but had no effect. Is there other way to make my custom alias (put in ~.bash_profile) work?
It has no problem if I make an alias in gnome-terminal : $ alias l='ls -la' $ l Issuing 'l' command on command prompt will produce the desired result.
Thank you yunus
If I remember correctly, you also need to export the alias. See if adding "export l" to .bash_profile helps.
Mikkel
Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup!
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
On Mon, 2008-12-01 at 12:02 -0600, Mikkel L. Ellertson wrote:
If I remember correctly, you also need to export the alias. See if adding "export l" to .bash_profile helps.
Once again, you cannot export aliases. They are not shell variables. Think of them as limited string macros (limited because they are only evaluated at the beginning of each line of shell input). The definitions contained in .bash_profile are not exported, they are *re-evaluated* by each new instance of the shell.
OTOH you *can* export functions.
poc