Page 1 of 1

issues with aliases (solved)

Posted: Sun Mar 10, 2024 6:10 pm
by darksun

Hi,
I am using the latest Vanilla Dpup 64-bit.

If I set aliases into .bashrc every time I open the terminal all those aliases are printed out , it should not happen and I do not know how to fix the issue.
I have used many linux distro and I always copy and paste my aliases >> .bashrc and this issue has never occurred.

I thank you in advance, whoever could help me.

DS


Re: issues with aliases

Posted: Sun Mar 10, 2024 6:26 pm
by williwaw

are you trying to edit .bashrc from the terminal to make the aliases persist? if so, what command are you using?

sorry your sentence runs on too much to understand well?

are you saying every time you open a new terminal, the alias command lists the previosly set alias?


Re: issues with aliases

Posted: Sun Mar 10, 2024 7:56 pm
by darksun

I apology.
My alias list is very long and by mistake there was a lonely line with just "alias" , below the incriminating part

Code: Select all


....

alias
ex () {
     if [ -f $1 ] ; then
         case $1 in
             *.tar.bz2)   tar xjf $1     ;;
             *.tar.gz)    tar xzf $1     ;;
             *.bz2)       bunzip2 $1     ;;
             *.rar)       rar x $1       ;;
             *.gz)        gunzip $1      ;;
             *.tar)       tar xf $1      ;;
             *.tbz2)      tar xjf $1     ;;
             *.tgz)       tar xzf $1     ;;
             *.zip)       unzip $1       ;;
             *.Z)         uncompress $1  ;;
             *.7z)        7z x $1    ;;
             *)           echo "'$1' cannot be extracted via extract()" ;;
         esac
     else
         echo "'$1' is not a valid file"
     fi
}

.....

I apology for the inconvenience and the waste of a topic.