Move most of the documentation to .rst format

This commit is contained in:
Noah Gorny
2020-10-25 14:51:02 +02:00
parent 6abb26c6c6
commit f7e295f691
15 changed files with 822 additions and 6 deletions

20
docs/commands/doctor.rst Normal file
View File

@@ -0,0 +1,20 @@
.. _doctor:
Bash-it doctor
^^^^^^^^^^^^^^
If you encounter problems with any part of Bash-it, run the following command:
.. code-block:: bash
bash-it doctor
This will reload your bash profile and print out logs of various parts in Bash-it.
Note that this command at default will print all logs, including debug logs.
You can call it like this:
.. code-block:: bash
bash-it doctor [errors/warnings/all]
In order to get wanted verbosity.

15
docs/commands/index.rst Normal file
View File

@@ -0,0 +1,15 @@
.. _commands:
Bash-it Commands
================
**Bash-it** boasts a wide range of available commands.
You should be familiar with them in order to fully utilize Bash-it.
.. toctree::
:maxdepth: 1
update
search
reload
doctor

10
docs/commands/reload.rst Normal file
View File

@@ -0,0 +1,10 @@
.. _reload:
Bash-it reload
^^^^^^^^^^^^^^
Bash-it creates a ``reload`` alias that makes it convenient to reload
your Bash profile when you make changes.
Additionally, if you export ``BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE`` as a non-null value,
Bash-it will automatically reload itself after activating or deactivating plugins, aliases, or completions.

59
docs/commands/search.rst Normal file
View File

@@ -0,0 +1,59 @@
.. _searching:
Bash-it search
--------------
If you need to quickly find out which of the plugins, aliases or completions are available for a specific framework, programming language, or an environment, you can *search* for multiple terms related to the commands you use frequently.
Search will find and print out modules with the name or description matching the terms provided.
Syntax
^^^^^^
.. code-block:: bash
bash-it search term1 [[-]term2] [[-]term3]....
As an example, a ruby developer might want to enable everything related to the commands such as ``ruby``\ , ``rake``\ , ``gem``\ , ``bundler``\ , and ``rails``.
Search command helps you find related modules so that you can decide which of them you'd like to use:
.. code-block:: bash
bash-it search ruby rake gem bundle irb rails
aliases: bundler rails
plugins: chruby chruby-auto ruby
completions: bundler gem rake
Currently enabled modules will be shown in green.
Searching with Negations
^^^^^^^^^^^^^^^^^^^^^^^^
You can prefix a search term with a "-" to exclude it from the results.
In the above example, if we wanted to hide ``chruby`` and ``chruby-auto``\ ,
we could change the command as follows:
.. code-block:: bash
bash-it search ruby rake gem bundle irb rails -chruby
aliases: bundler rails
plugins: ruby
completions: bundler gem rake
Using Search to Enable or Disable Components
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By adding a ``--enable`` or ``--disable`` to the search command, you can automatically enable all modules that come up as a result of a search query.
This could be quite handy if you like to enable a bunch of components related to the same topic.
Disabling ASCII Color
^^^^^^^^^^^^^^^^^^^^^
To remove non-printing non-ASCII characters responsible for the coloring of the search output, you can set environment variable ``NO_COLOR``.
Enabled components will then be shown with a checkmark:
.. code-block:: bash
NO_COLOR=1 bash-it search ruby rake gem bundle irb rails -chruby
aliases => ✓bundler ✓rails
plugins => ✓ruby
completions => bundler gem rake

38
docs/commands/update.rst Normal file
View File

@@ -0,0 +1,38 @@
.. _update:
Bash-it update
^^^^^^^^^^^^^^
To update Bash-it to the latest stable version, simply run:
.. code-block:: bash
bash-it update stable
If you want to update to the latest dev version (directly from master), run:
.. code-block:: bash
bash-it update dev
If you want to update automatically and unattended, you can add the optional
``-s/--silent`` flag, for example:
.. code-block:: bash
bash-it update dev --silent
.. _migrate:
Bash-it migrate
^^^^^^^^^^^^^^^
If you are using an older version of Bash-it, it's possible that some functionality has changed, or that the internal structure of how Bash-it organizes its functionality has been updated.
For these cases, we provide a ``migrate`` command:
.. code-block:: bash
bash-it migrate
This command will automatically migrate the Bash-it structure to the latest version.
The ``migrate`` command is run automatically if you run the ``update``\ , ``enable`` or ``disable`` commands.