Keep getting this error:
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: local: command not found
bash: export: command not found
bash: export: command not found
bash: ~/.bash_profile: No such file or directory
Here is my bash_profile:
When I comment out the prompt function, the error goes away except the last one!
alias ngrok=/Users/mmahalwy/Desktop/Code/ngrok
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
alias ls='ls -GFh'
function prompt {
local BLACK="\[\033[0;30m\]"
local BLACKBOLD="\[\033[1;30m\]"
local RED="\[\033[0;31m\]"
local REDBOLD="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local GREENBOLD="\[\033[1;32m\]"
local YELLOW="\[\033[0;33m\]"
local YELLOWBOLD="\[\033[1;33m\]"
local BLUE="\[\033[0;34m\]"
local BLUEBOLD="\[\033[1;34m\]"
local PURPLE="\[\033[0;35m\]"
local PURPLEBOLD="\[\033[1;35m\]"
local CYAN="\[\033[0;36m\]"
local CYANBOLD="\[\033[1;36m\]"
local WHITE="\[\033[0;37m\]"
local WHITEBOLD="\[\033[1;37m\]"
local RESETCOLOR="\[\e[00m\]"
export PS1="\n$RED\u $PURPLE@ $GREEN\w $BLUE[\#] → $RESETCOLOR"
export PS2="| → $RESETCOLOR"
}
# prompt
export PATH=/usr/local/bin:$PATH
source ~/.git-completion.bash
If local were genuinely not available (for instance, disabled with enable -n local), you would be seeing:
bash: local: command not found
Instead of:
bash: local: command not found
Those extra spaces are a clue. Look closely at your file (with a hex editor, if you have to), and figure out what those bytes that aren't either spaces or tabs actually are... and change them to genuine ASCII space characters.
There are several non-breaking space variants found in Unicode; I'm guessing that they somehow got into your script. Copy-and-pasting code from the web can be dangerous. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With