iTerm2 3.0.15
OS X 10.11.6
I tried recently to configure my terminal, after a clean install. My problem is that when I do it, I get a weird error message. I go in my .bash directory; In it, I have several configuration files, named as follows: aliases, bash_profile, exports, extras, functions, inputrc, path and prompt.
When I do:
source bash_profile
I get this error message:
-bash: book: command not found
I get exactly the same error message with every configuration file.
I have 2 problems:
my bash_profile file isn't sourced, as any other configuration file I try
I'm pretty sure it's fundamental to configure my terminal but I don't understand what the error message really means. I get that there is an issue with that
book
command but I can't get any valuable info about it.
Things I tried:
Terminal commands:
man book
,book --help
, orhelp book
told me thebook
command doesn't exist or doesn't have a manual entry. Onlyinfo book
gave me a result but it looks like it's more related to theinfo
command than thebook
command. And no mention of anybook
in my configuration files too.Google search "bash: book: command not found" doesn't return much, of course lots of "command not found" but the only reference to
book
is a post on the Github repo of Bash-it. Most of the answers about command not found are about the PATH environment variable, but even if I input my path manually, like this (I hope this is the correct way):export PATH=~/.rbenv/shims:/usr/local/Cellar:/usr/local/bin:/usr/local/sbin:/usr/local/bin/flake8:/usr/local/bin/git:/usr/bin:/bin:/usr/sbin:/sbin
After that, when I try again a
source bash_profile
, I get the same result-bash: book: command not found
.Terminal.app has the same issue.
my bash_profile file:
#--------------------------------------------------------------------------#
# B A S H _ P R O F I L E
#--------------------------------------------------------------------------#
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc
# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.bash/{path,prompt,exports,aliases,functions,extra,inputrc}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;
# Enable iTerm 2 Shell Integration
source ~/.iterm2_shell_integration.`basename $SHELL`
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob;
# Append to the Bash history file, rather than overwriting it
shopt -s histappend;
# Autocorrect typos in path names when using `cd`
shopt -s cdspell;
# Do not autocomplete when accidentally pressing Tab on an empty line.
shopt -s no_empty_cmd_completion
# Enable tab completion for `g` by marking it as an alias for `git`
if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then
complete -o default -o nospace -F _git g;
fi;
# Add tab completion for many Bash commands
#if which brew > /dev/null && [ -f "$(brew --prefix)/share/bash-completion/#bash_completion" ]; then
# source "$(brew --prefix)/share/bash-completion/bash_completion";
#elif [ -f /etc/bash_completion ]; then
# source /etc/bash_completion;
#fi;
# Thanks to @tmoitie, adds more tab completion for bash,
# also when hitting tab twice it will show a list.
#if [ -f $(brew --prefix)/etc/bash_completion ]; then
# . $(brew --prefix)/etc/bash_completion
#fi
# R U B Y
# Ensure rbenv will be used first
# eval "$(rbenv init -)"
# test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
book
. You need to go find it. See Bash Reference Manual: Bash Startup Files for locations to search.