Skip to main content
Post Closed as "Duplicate" by jesse_b, jordanm, Vlastimil Burián, muru bash
major refactoring of the whole structure / spelling / practically everything was looked at
Source Link
Vlastimil Burián
  • 31.1k
  • 66
  • 208
  • 357

unable to use What am I doing wrong with my own alias in ~/.bash_aliases?

~/.bashrc

My .bashrc has~/.bashrc contains the following -(by default):

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

~/.bash_aliases

myMy .bash_aliases has~/.bash_aliases contains the following -(my definition):

alias define="curl dict://dict.org/d:$1"
alias define="curl dict://dict.org/d:$1"

Expectation

The define heredefine in there is THE alias or the keywordalias so I could use something like the following directly in my shell -(terminal):

$ define internet 
define internet

andWhile I expect it should go onto look at dict.org and look up definition of internet and display it to me.

forFor some reason whenever I run it I get the following -

http://paste.debian.net/1130359/I get the following (hosted on paste.debian.net, might disappear in time).

 

Just to see if I'm doing anything wrong. I did sourcetried sourcing the .bash_aliases~/.bash_aliases in the bashbash session.


Shell

FWIW, I'm running bashbash version 5.0.11 inon Debian Bullseye (currently testing, and planned major upcoming release).


What am I do have dictd but that shouldn't interfere here.doing wrong with my own alias in ~/.bash_aliases?

unable to use .bash_aliases

My .bashrc has the following -

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

my .bash_aliases has the following -

alias define="curl dict://dict.org/d:$1"

The define here is THE alias or the keyword so I could use something like -

$ define internet 

and it should go on dict.org and look up definition of internet and display it to me.

for some reason whenever I run it I get the following -

http://paste.debian.net/1130359/

Just to see if I'm doing anything wrong. I did source .bash_aliases in the bash session.

FWIW, I'm running bash 5.0.11 in Debian testing. I do have dictd but that shouldn't interfere here.

What am I doing wrong with my own alias in ~/.bash_aliases?

~/.bashrc

My ~/.bashrc contains the following (by default):

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

~/.bash_aliases

My ~/.bash_aliases contains the following (my definition):

alias define="curl dict://dict.org/d:$1"

Expectation

The define in there is the alias so I could use something like the following directly in my shell (terminal):

define internet

While I expect it to look at dict.org and look up definition of internet and display it to me.

For some reason whenever I run it I get the following (hosted on paste.debian.net, might disappear in time).

 

I tried sourcing the ~/.bash_aliases in the bash session.


Shell

I'm running bash version 5.0.11 on Debian Bullseye (currently testing, and planned major upcoming release).


What am I doing wrong with my own alias in ~/.bash_aliases?

added 248 characters in body
Source Link
shirish
  • 13k
  • 35
  • 122
  • 209

My .bashrc has the following -

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

my .bash_aliases has the following -

alias define="curl dict://dict.org/d:$1"

The define here is THE alias or the keyword so I could use something like -

$ define internet 

and it should go on dict.org and look up definition of internet and display it to me.

for some reason whenever I run it I get the following -

http://paste.debian.net/1130359/

Just to see if I'm doing anything wrong. I did source .bash_aliases in the bash session.

FWIW, I'm running bash 5.0.11 in Debian testing. I do have dictd but that shouldn't interfere here.

My .bashrc has the following -

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

my .bash_aliases has the following -

alias define="curl dict://dict.org/d:$1"

for some reason whenever I run it I get the following -

http://paste.debian.net/1130359/

Just to see if I'm doing anything wrong. I did source .bash_aliases in the bash session.

FWIW, I'm running bash 5.0.11 in Debian testing

My .bashrc has the following -

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

my .bash_aliases has the following -

alias define="curl dict://dict.org/d:$1"

The define here is THE alias or the keyword so I could use something like -

$ define internet 

and it should go on dict.org and look up definition of internet and display it to me.

for some reason whenever I run it I get the following -

http://paste.debian.net/1130359/

Just to see if I'm doing anything wrong. I did source .bash_aliases in the bash session.

FWIW, I'm running bash 5.0.11 in Debian testing. I do have dictd but that shouldn't interfere here.

Source Link
shirish
  • 13k
  • 35
  • 122
  • 209

unable to use .bash_aliases

My .bashrc has the following -

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

my .bash_aliases has the following -

alias define="curl dict://dict.org/d:$1"

for some reason whenever I run it I get the following -

http://paste.debian.net/1130359/

Just to see if I'm doing anything wrong. I did source .bash_aliases in the bash session.

FWIW, I'm running bash 5.0.11 in Debian testing