0

I have created a file "~/.aliases" file with the content:

# git stuff
alias ga="git add"
alias gaa="git add ."

in "~/.bashrc" at the top I have this code.

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

. ~/.aliases

I thought this should work but when I run, for example, gaa in the command line, I get an error.

No command 'gaa' found, did you mean:
 Command 'gav' from package 'gav' (universe)
 Command 'gap' from package 'gap-core' (universe)
 Command 'gpa' from package 'gpa' (universe)
 Command 'aa' from package 'astronomical-almanac' (universe)
 Command 'gac' from package 'gap-dev' (universe)
 Command 'gak' from package 'gui-apt-key' (universe)
gaa: command not found
3
  • Have you run . ~/.bashrc or reopened the terminal afterwards?
    – kos
    Nov 3, 2015 at 10:11
  • Yep, that was the problem. Thank you for the fast reply @kos Nov 3, 2015 at 10:13
  • You're welcome. I found a duplicate question which contains this answer already, please accept the closure so that people finding this question will be redirected to that answer.
    – kos
    Nov 3, 2015 at 10:18

0

Browse other questions tagged .