Ho modificato il mio $ Home .bash_profile per includere alcuni comandi git alias. Sono piuttosto nuovo a questo e non riesco a capire cosa è andato storto.Aggiunta di git alias a .bash_profile non funzionante
Bash_profile
alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias go='git checkout '
alias gk='gitk --all&'
alias gx='gitx --all'
alias got='git '
alias get='git '
PS1="\u$ "
alias ll="ls -lahG"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && \
. "$HOME/.rvm/scripts/rvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && \
. "$HOME/.rvm/scripts/rvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && \
. "$HOME/.rvm/scripts/rvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && \
. "$HOME/.rvm/scripts/rvm"
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && \
. "$HOME/.rvm/scripts/rvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && \
. "$HOME/.rvm/scripts/rvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
Non riesco a capire cosa ho sbagliato. Qualche idea?
[EDIT] Volevo solo dire che la parte che ho aggiunto proviene da PS1. Ad esempio, alias ll = "ls -lahG"
funziona correttamente. Quelli sopra non lo fanno.
[EDIT2] Ho provato a utente gs() {git status "$ *"; } invece, ma quello non sembrava fare il trucco.
[EDIT3] Il problema era che dovevo generare ~/.profile. Quello che ho finito è metterlo nel file ~/.bashrc e dare origine a quel file alla raccomandazione di Sputnick.
fare si riavvia il terminale o eseguire. ~/.bash_profile. Non vedo errori al primo sguardo. – Burntime
Ciò che è andato storto è che hai usato un alias. Usa invece le funzioni. ad esempio: 'gs() {git status" $ * "; } ' –
se si digita' alias' nel prompt cosa restituisce il prompt? – Burntime