more docs

This commit is contained in:
Anthony Scopatz 2016-05-11 01:55:53 -04:00
parent ab47bfd5bd
commit 50d76f9570
6 changed files with 50 additions and 3 deletions

View file

@ -90,6 +90,7 @@ Contents
tutorial
tutorial_hist
tutorial_xontrib
windows
bash_to_xsh

View file

@ -1161,6 +1161,7 @@ For example, consider a slight variation of the example script from above that
operates on a given argument, rather than on the string ``'xonsh'`` (notice how
``$ARGS`` and ``$ARG1`` are used):
.. code-block:: xonsh
#!/usr/bin/env xonsh
@ -1182,6 +1183,7 @@ operates on a given argument, rather than on the string ``'xonsh'`` (notice how
print($(ls).replace('\n', ' '))
print()
.. code-block:: bash
bash $ xonsh test2.xsh snails

View file

@ -1,7 +1,7 @@
.. _tutorial_hist:
************************************
Tutorial [Advanced]: Living History
Tutorial: History
************************************
Import your best Leonard Nimoy documentary voice and get ready for the xonsh tutorial
on ``history``.

33
docs/tutorial_xontrib.rst Normal file
View file

@ -0,0 +1,33 @@
.. _tutorial_xontrib:
************************************
Tutorial: Xonsh Extensions
************************************
Take a deep breath and prepare for some serious Show & Tell; it's time to
learn about xonsh extentions!
Overview
================================
Xontributions, or ``xontribs``, are a set of tools and conventions for
extending the functionality of xonsh beyond what is provided by default. This
allows 3rd party developers and users to improve thier xonsh experiance without
having to go through the xonsh development and release cycle.
Many tools anbd libraries have extension capabilities. Here are some that we
took inspiration from for xonsh:
* `Sphinx <http://sphinx-doc.org/>`_: Extensions are just Python modules,
bundles some entensions with the main package, interface is a list of
string names.
* `Oh My Zsh <http://ohmyz.sh/>`_: Centralized registry, autoloading, and
for a shell.
* `ESLint <http://eslint.org/>`_: Ability to use language package manager
to install/remove extensions.
Structure
==========
x
Tell Us About Your Xontrib!
===========================
x

View file

@ -2,9 +2,10 @@
"EDITOR": "xo",
"PAGER": "more"
},
"xontribs": ["mpl"],
"foreign_shells": [
{"shell": "bash",
"login": true,
{"shell": "bash",
"login": true,
"extra_args": ["--rcfile", "/path/to/rcfile"]
},
{"shell": "zsh"}

View file

@ -24,6 +24,16 @@ variables. For example,
}
``xontribs``
------------
This is a list (JSON array) of xontrib names (strings) to load prior to
loading any run control files. For example,
.. code:: json
{"xontribs": ["mpl", "example"]}
``foreign_shells``
--------------------
This is a list (JSON Array) of dicts (JSON objects) that represent the