aliases listed on terminal start

jon777

New Member
Joined
Aug 25, 2023
Messages
10
Reaction score
6
Credits
79
hello,
i changed the .bashrc file to make some aliases.
they all work as intended, but on a start of a terminal (bash)
i get a list of all the aliases in the .bashrc file and then a prompt.
it's kinda weird. any ideas how to get rid of it?
i run archlinux and bash in alacritty.
 


osprey

Well-Known Member
Joined
Apr 15, 2022
Messages
1,103
Reaction score
1,068
Credits
10,493
hello,
i changed the .bashrc file to make some aliases.
they all work as intended, but on a start of a terminal (bash)
i get a list of all the aliases in the .bashrc file and then a prompt.
it's kinda weird. any ideas how to get rid of it?
i run archlinux and bash in alacritty.
This can happen if the alias command itself is set in the .bashrc. For example, a single line in the .bashrc with the term: alias, would produce the output of the alias command for each terminal such as the following:
Code:
alias l.='ls -d .*'
alias ll='ls -lh'
alias ll.='ls -lhd .*'
alias ls='ls --color=auto'
<snip>
so it's worth checking the .bashrc file to see if such a line has been inadvertently set there, or anything similar that would run the alias command itself from that file.
 
OP
J

jon777

New Member
Joined
Aug 25, 2023
Messages
10
Reaction score
6
Credits
79
This can happen if the alias command itself is set in the .bashrc. For example, a single line in the .bashrc with the term: alias, would produce the output of the alias command for each terminal such as the following:
Code:
alias l.='ls -d .*'
alias ll='ls -lh'
alias ll.='ls -lhd .*'
alias ls='ls --color=auto'
<snip>
so it's worth checking the .bashrc file to see if such a line has been inadvertently set there, or anything similar that would run the alias command itself from that file.
That's right. On a careful examination of .bashrc file I found the line with a single word alias. Must've messed it up while setting up aliases and somehow couldn't see that when looking for errors. Thanks a lot.
 

Members online


Latest posts

Top