diff --git a/docs/installation.rst b/docs/installation.rst index 9688af20..068f2da5 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -6,8 +6,8 @@ Installation #. Check out a clone of this repo to a location of your choice, such as ``git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it`` -#. Run ``~/.bash_it/install.sh`` (it automatically backs up your ``~/.bash_profile`` or ``~/.bashrc``\ , depending on your OS) -#. Edit your modified config (\ ``~/.bash_profile`` or ``~/.bashrc``\ ) file in order to customize Bash-it. +#. Run ``~/.bash_it/install.sh`` (it automatically backs up your ``~/.bashrc``\ ) +#. Edit your modified config (\ ``~/.bashrc``\ ) file in order to customize Bash-it. #. Check out available aliases, completions, and plugins and enable the ones you want to use (see the next section for more details). Install Options @@ -18,7 +18,7 @@ The install script can take the following options: * ``--interactive``\ : Asks the user which aliases, completions and plugins to enable. * ``--silent``\ : Ask nothing and install using default settings. -* ``--no-modify-config``\ : Do not modify the existing config file (\ ``~/.bash_profile`` or ``~/.bashrc``\ ). +* ``--no-modify-config``\ : Do not modify the existing config file (\ ``~/.bashrc``\ ). * ``--append-to-config``\ : Back up existing config file and append bash-it templates at the end. When run without the ``--interactive`` switch, Bash-it only enables a sane default set of functionality to keep your shell clean and to avoid issues with missing dependencies. @@ -28,16 +28,14 @@ When you run without the ``--no-modify-config`` switch, the Bash-it installer au Use the ``--no-modify-config`` switch to avoid unwanted modifications, e.g. if your Bash config file already contains the code that loads Bash-it. **NOTE**\ : Keep in mind how Bash loads its configuration files, -``.bash_profile`` for login shells (and in macOS in terminal emulators like `Terminal.app `_ or -`iTerm2 `_\ ) and ``.bashrc`` for interactive shells (default mode in most of the GNU/Linux terminal emulators), -to ensure that Bash-it is loaded correctly. +``.bash_profile`` for login shells and ``.bashrc`` for interactive shells, to ensure that Bash-it is loaded correctly. A good "practice" is sourcing ``.bashrc`` into ``.bash_profile`` to keep things working in all the scenarios. To achieve this, you can add this snippet in your ``.bash_profile``\ : .. code-block:: - if [ -f ~/.bashrc ]; then - . ~/.bashrc + if [[ $- == *"i"* && -f ~/.bashrc ]]; then + source ~/.bashrc fi Refer to the official `Bash documentation `_ to get more info. diff --git a/docs/themes-list/atomic.rst b/docs/themes-list/atomic.rst index 7d471ba9..73197c29 100644 --- a/docs/themes-list/atomic.rst +++ b/docs/themes-list/atomic.rst @@ -36,7 +36,6 @@ Automatically via terminal #. You can install the theme automatically using the ``sed`` command from your Linux or OSX Terminal. -#. On macOS, the ~/.bash_profile is used, not the ~/.bashrc. #. For installation on windows you should use `\ ``Git-Bash`` `_ or make sure the terminal emulator you use (ej: cygwin, mintty, etc) has the ``sed`` command installed. Command to execute For Windows and Linux: @@ -51,7 +50,7 @@ Command to execute for macOS: .. code-block:: bash # Set the "atomic" theme replacing the theme you are using of bash-it - sed -i '' 's/'"$BASH_IT_THEME"'/atomic/g' ~/.bash_profile + sed -i '' 's/'"$BASH_IT_THEME"'/atomic/g' ~/.bashrc Features -------- diff --git a/docs/themes-list/powerline-base.rst b/docs/themes-list/powerline-base.rst index faa1af34..3c791d4f 100644 --- a/docs/themes-list/powerline-base.rst +++ b/docs/themes-list/powerline-base.rst @@ -8,7 +8,7 @@ all powerline themes. **IMPORTANT:** This theme requires that `a font with the Powerline symbols `_ needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator. -**NOTICE:** The default behavior of this theme assumes that you have sudo privileges on your workstation. If that is not the case (e.g. if you are running on a corporate network where ``sudo`` usage is tracked), you can set the flag 'export THEME_CHECK_SUDO=false' in your ``~/.bashrc`` or ``~/.bash_profile`` to disable the Powerline theme's ``sudo`` check. This will apply to all ``powerline*`` themes. +**NOTICE:** The default behavior of this theme assumes that you have sudo privileges on your workstation. If that is not the case (e.g. if you are running on a corporate network where ``sudo`` usage is tracked), you can set the flag 'export THEME_CHECK_SUDO=false' in your ``~/.bashrc`` to disable the Powerline theme's ``sudo`` check. This will apply to all ``powerline*`` themes. Provided Information -------------------- diff --git a/docs/themes-list/powerline-multiline.rst b/docs/themes-list/powerline-multiline.rst index f525f022..2e9aeb36 100644 --- a/docs/themes-list/powerline-multiline.rst +++ b/docs/themes-list/powerline-multiline.rst @@ -19,7 +19,7 @@ To get the length of the left and right segments right, a *padding* value is use In most cases, the default value (\ *2*\ ) works fine, but on some operating systems, this needs to be adjusted. One example is *macOS High Sierra*\ , where the default padding causes the right segment to extend to the next line. On macOS High Sierra, the padding value needs to be changed to *3* to make the theme look right. -This can be done by setting the ``POWERLINE_PADDING`` variable before Bash-it is loaded, e.g. in your ``~/.bash_profile`` or ``~/.bashrc`` file: +This can be done by setting the ``POWERLINE_PADDING`` variable before Bash-it is loaded, e.g. in your ``~/.bashrc`` file: .. code-block:: bash diff --git a/docs/vcs_user.rst b/docs/vcs_user.rst index c6d31a57..1c082de7 100644 --- a/docs/vcs_user.rst +++ b/docs/vcs_user.rst @@ -10,7 +10,7 @@ Turn version control checking off to prevent slow directory navigation within la Controlling Flags ^^^^^^^^^^^^^^^^^ -Bash-it provides a flag (\ ``SCM_CHECK``\ ) within the ``~/.bash_profile`` file that turns off/on version control information checking and display within all themes. +Bash-it provides a flag (\ ``SCM_CHECK``\ ) within the ``~/.bashrc`` file that turns off/on version control information checking and display within all themes. Version control checking is on by default unless explicitly turned off. Set ``SCM_CHECK`` to 'false' to **turn off** version control checks for all themes: