From cf2df9e8965f4a672bd3dbaf5b65b0a2b03661e4 Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Mon, 14 Dec 2020 00:05:17 +0200 Subject: [PATCH 1/2] docs: Restructure sentence about adding screenshots --- docs/contributing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index 655d05bd..ba034b1f 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -104,7 +104,7 @@ Themes * When adding a new theme, please include a screenshot and a short description about what makes this theme unique in the Pull Request's description field. - Please do not add theme screenshots to the repo itself, as they will add unnecessary bloat to the repo. + Please do not add theme screenshots to the main PR itself, as they will add unnecessary bloat to the main branch in the repo. The project's docs has a `Themes page `_ where you should add a screenshot, see how :ref:`here`. * Ideally, you should add a ``.rst`` file describing the theme and its configuration options to ``docs/themes-list`` folder. From dca563e606efda5b900cb39aded94a88c4bfe33c Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Mon, 14 Dec 2020 00:12:07 +0200 Subject: [PATCH 2/2] docs: misc: Move help_screens and proxy_support into seperate pages --- docs/help_screens.rst | 13 ++++++++ docs/misc.rst | 74 +++--------------------------------------- docs/proxy_support.rst | 43 ++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 70 deletions(-) create mode 100644 docs/help_screens.rst create mode 100644 docs/proxy_support.rst diff --git a/docs/help_screens.rst b/docs/help_screens.rst new file mode 100644 index 00000000..e071f7df --- /dev/null +++ b/docs/help_screens.rst @@ -0,0 +1,13 @@ +.. _help_screens: + +Help Screens +^^^^^^^^^^^^ + +.. code-block:: bash + + bash-it show aliases # shows installed and available aliases + bash-it show completions # shows installed and available completions + bash-it show plugins # shows installed and available plugins + bash-it help aliases # shows help for installed aliases + bash-it help completions # shows help for installed completions + bash-it help plugins # shows help for installed plugins diff --git a/docs/misc.rst b/docs/misc.rst index c576d926..600fbc27 100644 --- a/docs/misc.rst +++ b/docs/misc.rst @@ -3,74 +3,8 @@ Misc ---- -Help Screens -^^^^^^^^^^^^ +.. toctree:: + :maxdepth: 2 -.. code-block:: bash - - bash-it show aliases # shows installed and available aliases - bash-it show completions # shows installed and available completions - bash-it show plugins # shows installed and available plugins - bash-it help aliases # shows help for installed aliases - bash-it help completions # shows help for installed completions - bash-it help plugins # shows help for installed plugins - -Pass function renamed to passgen -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The Bash-it ``pass`` function has been renamed to ``passgen`` in order to avoid a naming conflict with the `pass password manager `_. -In order to minimize the impact on users of the legacy Bash-it ``pass`` function, Bash-it will create the alias ``pass`` that calls the new ``passgen`` function if the ``pass`` password manager command is not found on the ``PATH`` (default behavior). - -This behavior can be overridden with the ``BASH_IT_LEGACY_PASS`` flag as follows: - -Set ``BASH_IT_LEGACY_PASS`` to 'true' to force Bash-it to always **create** the ``pass`` alias to ``passgen``\ : - - -* ``export BASH_IT_LEGACY_PASS=true`` - -Unset ``BASH_IT_LEGACY_PASS`` to have Bash-it **return to default behavior**\ : - - -* ``unset BASH_IT_LEGACY_PASS`` - -Proxy Support -^^^^^^^^^^^^^ - -If you are working in a corporate environment where you have to go through a proxy server for internet access, -then you know how painful it is to configure the OS proxy variables in the shell, -especially if you are switching between environments, e.g. office (with proxy) and home (without proxy). - -The Bash shell (and many shell tools) use the following variables to define the proxy to use: - - -* ``HTTP_PROXY`` (and ``http_proxy``\ ): Defines the proxy server for HTTP requests -* ``HTTPS_PROXY`` (and ``https_proxy``\ ): Defines the proxy server for HTTPS requests -* ``ALL_PROXY`` (and ``all_proxy``\ ): Used by some tools for the same purpose as above -* ``NO_PROXY`` (and ``no_proxy``\ ): Comma-separated list of hostnames that don't have to go through the proxy - -Bash-it's ``proxy`` plugin allows to enable and disable these variables with a simple command. -To start using the ``proxy`` plugin, run the following: - -.. code-block:: bash - - bash-it enable plugin proxy - -Bash-it also provides support for enabling/disabling proxy settings for various shell tools. -The following backends are currently supported (in addition to the shell's environment variables): Git, SVN, npm, ssh. -The ``proxy`` plugin changes the configuration files of these tools to enable or disable the proxy settings. - -Bash-it uses the following variables to set the shell's proxy settings when you call ``enable-proxy``. -These variables are best defined in a custom script in Bash-it's custom script folder (\ ``$BASH_IT/custom``\ ), e.g. ``$BASH_IT/custom/proxy.env.bash`` - - -* ``BASH_IT_HTTP_PROXY`` and `BASH_IT_HTTPS_PROXY`: Define the proxy URL to be used, e.g. 'http://localhost:1234' -* ``BASH_IT_NO_PROXY``\ : A comma-separated list of proxy exclusions, e.g. ``127.0.0.1,localhost`` - -Once you have defined these variables (and have run ``reload`` to load the changes), you can use the following commands to enable or disable the proxy settings in your current shell: - - -* ``enable-proxy``\ : This sets the shell's proxy environment variables and configures proxy support in your SVN, npm, and SSH configuration files. -* ``disable-proxy``\ : This unsets the shell's proxy environment variables and disables proxy support in your SVN, npm, and SSH configuration files. - -There are many more proxy commands, e.g. for changing the local Git project's proxy settings. -Run ``glossary proxy`` to show the available proxy functions with a short description. + help_screens + proxy_support diff --git a/docs/proxy_support.rst b/docs/proxy_support.rst new file mode 100644 index 00000000..038c8fd3 --- /dev/null +++ b/docs/proxy_support.rst @@ -0,0 +1,43 @@ +.. _proxy_support: + +Proxy Support +^^^^^^^^^^^^^ + +If you are working in a corporate environment where you have to go through a proxy server for internet access, +then you know how painful it is to configure the OS proxy variables in the shell, +especially if you are switching between environments, e.g. office (with proxy) and home (without proxy). + +The Bash shell (and many shell tools) use the following variables to define the proxy to use: + + +* ``HTTP_PROXY`` (and ``http_proxy``\ ): Defines the proxy server for HTTP requests +* ``HTTPS_PROXY`` (and ``https_proxy``\ ): Defines the proxy server for HTTPS requests +* ``ALL_PROXY`` (and ``all_proxy``\ ): Used by some tools for the same purpose as above +* ``NO_PROXY`` (and ``no_proxy``\ ): Comma-separated list of hostnames that don't have to go through the proxy + +Bash-it's ``proxy`` plugin allows to enable and disable these variables with a simple command. +To start using the ``proxy`` plugin, run the following: + +.. code-block:: bash + + bash-it enable plugin proxy + +Bash-it also provides support for enabling/disabling proxy settings for various shell tools. +The following backends are currently supported (in addition to the shell's environment variables): Git, SVN, npm, ssh. +The ``proxy`` plugin changes the configuration files of these tools to enable or disable the proxy settings. + +Bash-it uses the following variables to set the shell's proxy settings when you call ``enable-proxy``. +These variables are best defined in a custom script in Bash-it's custom script folder (\ ``$BASH_IT/custom``\ ), e.g. ``$BASH_IT/custom/proxy.env.bash`` + + +* ``BASH_IT_HTTP_PROXY`` and `BASH_IT_HTTPS_PROXY`: Define the proxy URL to be used, e.g. 'http://localhost:1234' +* ``BASH_IT_NO_PROXY``\ : A comma-separated list of proxy exclusions, e.g. ``127.0.0.1,localhost`` + +Once you have defined these variables (and have run ``reload`` to load the changes), you can use the following commands to enable or disable the proxy settings in your current shell: + + +* ``enable-proxy``\ : This sets the shell's proxy environment variables and configures proxy support in your SVN, npm, and SSH configuration files. +* ``disable-proxy``\ : This unsets the shell's proxy environment variables and disables proxy support in your SVN, npm, and SSH configuration files. + +There are many more proxy commands, e.g. for changing the local Git project's proxy settings. +Run ``glossary proxy`` to show the available proxy functions with a short description.