mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
more docs
This commit is contained in:
parent
ab47bfd5bd
commit
50d76f9570
6 changed files with 50 additions and 3 deletions
|
@ -90,6 +90,7 @@ Contents
|
|||
|
||||
tutorial
|
||||
tutorial_hist
|
||||
tutorial_xontrib
|
||||
windows
|
||||
bash_to_xsh
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
33
docs/tutorial_xontrib.rst
Normal 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
|
|
@ -2,6 +2,7 @@
|
|||
"EDITOR": "xo",
|
||||
"PAGER": "more"
|
||||
},
|
||||
"xontribs": ["mpl"],
|
||||
"foreign_shells": [
|
||||
{"shell": "bash",
|
||||
"login": true,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue