Commit 8ff4363e authored by adam j hartz's avatar adam j hartz

remove a bunhc of stuff

parent af1f01ce
......@@ -2,6 +2,7 @@
*.out
*.xcf
*.egg
*.egg-info
.eggs/
lexer_table.py
parser_table.py
......
This diff is collapsed.
This diff is collapsed.
include logo.txt
xonsh
=====
.. image:: https://badges.gitter.im/scopatz/xonsh.svg
:alt: Join the chat at https://gitter.im/scopatz/xonsh
:target: https://gitter.im/scopatz/xonsh?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. image:: https://travis-ci.org/xonsh/xonsh.svg?branch=master
:target: https://travis-ci.org/xonsh/xonsh
.. image:: https://ci.appveyor.com/api/projects/status/ufqtigii8ma3rctt/branch/master?svg=true
:target: https://ci.appveyor.com/project/rbrewer123/xonsh-unq93
.. image:: https://landscape.io/github/scopatz/xonsh/master/landscape.svg?style=flat
:target: https://landscape.io/github/scopatz/xonsh/master
:alt: Code Health
xonsh is a Python-ish, BASHwards-looking shell language and command prompt.
The language is a superset of Python 3.4+ with additional shell primitives.
xonsh (pronounced *conch*) is meant for the daily use of experts and novices
alike.
Please visit http://xon.sh for more information.
Projects that use xonsh
***********************
- `gitsome <https://github.com/donnemartin/gitsome>`_: A supercharged Git/shell autocompleter with GitHub integration.
.appveyor.yml
\ No newline at end of file
.binstar.yml
\ No newline at end of file
coverage:
status:
project:
default:
target: auto
threshold: 10
patch:
default:
target: 0%
╓██▄
╙██▀██╕
▐██4Φ█▀█▌
²██▄███▀██^██
-███╩▀ " ╒▄█████▀█
║██▀▀W╤▄▀ ▐║█╘ ╝█
▄m▀%Φ▀▀ ╝*" ,α█████▓▄,▄▀Γ"▀╕
"▀██¼" ▄═╦█╟║█▀ ╓ `^` ,▄ ╢╕
,▀╫M█▐j╓╟▀ ╔▓▄█▀ '║ ╔ ╣║▌ ▀▄
▄m▀▀███╬█╝▀ █▀^ "ÜM j▐╟╫╨▒ ╙▀≡═╤═m▀╗
█æsæ╓ ╕, ,▄Ä ▐'╕H LU ║║╠╫Å^2=⌐ █
▄æ%Å███╠█ª╙▄█▀ $1╙ ║║╟╫╩*T▄ ▌
╙╗%▄,╦██▌█▌█╢M ╕ M║║║║█═⌐ⁿ"^ ╫
╙╣▀████@█░█ ▌╕╕ ` ▌║▐▐║█D═≈⌐¬ⁿ s ║⌐
╙╬███▓║█` ▌╚ ╕ ╕▌║▐▐╣▌⌐*▒▒Dù` ▐▌
╙╬██╨U█ ╟ $ ▌ ▌▌▐▐▐M█▄═≤⌐% ╓⌐ ▌
║║█▄▌║ ╟ ▌ ▌M▐▐▐M█▀▒▒▒22, ▐▌
███╙^▌ ║ ▌ ⌐M▐▐▐M█≤⌐⌐¬── ▐M
║██ ▌╙ ╓ H║ ▌╒ M║▐▐M█"^^^^^"ⁿ ║
██╕╙@▓ ╕ ▌║ H' ║▐▐▐█══=.,,, █
╙█▓╔╚╚█ ╠ ▌└╒ ▌▐ ╚║║║▀****ⁿ - ╓▌
╙█▌¼V╚▌ ▌ ╕ ▌ ║╒ ║ ▌▒╠█▀≤≤≤≤≤⌐ █
╙█▌╔█╚▌ ┘ M ▌║ ╫ UUM██J^^" ▐▌
╙██╙█╙▌ ╕$j ▐⌐▌ ▌║╝╟█Å%%%≈═ █
╙╣█╣█^▌ ╠║▐ ║ ▌▐.DU██^[""ⁿ -╒▌
▀█▄█`▌ ░M▀ ▌▐ Å£╝╝█╜%≈═╓""w ⁿ⌐ █
`▀▄▀`▌ ▌█▐⌐║▐UW╖██%≤═░*─ =z ▄Γ
╙██╙▄▌█ ▌Å╛╣██╨%╤ƒⁿ= -` ▄┘
█▌╢▓▌▌ W £6█╤,"ⁿ ` ▄≡▀▀▀
█"█▌▌╟Å╓█╓█▀%` ▄▀
╙▌██`▒U▓U█%╗* █
▌╫║ ▌ÅÅ║▀╛¬` `"█
▌╫ ╫╟ █▄ ~╦%▒╥4^
▌▌ "M█ `▀╕ X╕"╗▄▀^
█▌ ╓M ╙▀e▀▀^
╙██▄▄▀
^^
**Added:**
* Tab completers can now raise ``StopIteration`` to prevent consideration of
remaining completers.
* Added tab completer for the ``completer`` alias.
* New ``Block`` and ``Functor`` context managers are now available as
part of the ``xonsh.contexts`` module.
* ``Block`` provides support for turning a context body into a non-executing
list of string lines. This is implmement via a syntax tree transformation.
This is useful for creating remote execution tools that seek to prevent
local execution.
* ``Functor`` is a subclass of the ``Block`` context manager that turns the
block into a callable object. The function object is available via the
``func()`` attribute. However, the ``Functor`` instance is itself callable
and will dispatch to ``func()``.
* New ``$VC_BRANCH_TIMEOUT`` environment variable is the time (in seconds)
of how long to spend attempting each individual version control branch
information command during ``$PROMPT`` formatting. This allows for faster
prompt resolution and faster startup times.
* New lazy methods added to CommandsCache allowing for testing and inspection
without the possibility of recomputing the cache.
* ``!(command)`` is now usefully iterable, yielding lines of stdout
* Added XonshCalledProcessError, which includes the relevant CompletedCommand.
Also handles differences between Py3.4 and 3.5 in CalledProcessError
* Tab completion of paths now includes zsh-style path expansion (subsequence
matching), toggleable with ``$SUBSEQUENCE_PATH_COMPLETION``
* Tab completion of paths now includes "fuzzy" matches that are accurate to
within a few characters, toggleable with ``$FUZZY_PATH_COMPLETION``
* Provide ``$XONSH_SOURCE`` for scripts in the environment variables pointing to
the currently running script's path
* Arguments '+' and '-' for the ``fg`` command (job control)
* Provide ``$XONSH_SOURCE`` for scripts in the environment variables pointing to
the currently running script's path
* ``!(command)`` is now usefully iterable, yielding lines of stdout
* Added XonshCalledProcessError, which includes the relevant CompletedCommand.
Also handles differences between Py3.4 and 3.5 in CalledProcessError
* XonshError and XonshCalledProcessError are now in builtins
**Changed:**
* Functions in ``Execer`` now take ``transform`` kwarg instead of
``wrap_subproc``.
* Provide ``$XONSH_SOURCE`` for scripts in the environment variables pointing to
the currently running script's path
* XonshError and XonshCalledProcessError are now in builtins
**Deprecated:** None
**Removed:**
* ``ensure_git()`` and ``ensure_hg()`` decorators removed.
* ``call_hg_command()`` function removed.
**Fixed:**
* Strip leading space in commands passed using the "-c" switch
* Fixed xonfig wizard failing on Windows due to colon in created filename.
* Ensured that the prompt_toolkit shell functions, even without a ``completer``
attribute.
* Fixed crash resulting from malformed ``$PROMPT`` or ``$TITLE``.
* xonsh no longer backgrounds itself after every command on Cygwin.
* Fixed an issue about ``os.killpg()`` on Cygwin which caused xonsh to crash
occasionally
* Fix crash on startup when Bash Windows Subsystem for Linux is on the Path.
**Security:** None
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None
**Added:** None
**Changed:**
* ``@()`` now passes through functions as well as strings, which allows for the
use of anonymous aliases and aliases not explicitly added to the ``aliases``
mapping.
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None
**Added:**
* Normal globbing is now available in Python mode via ``g````
* Backticks were expanded to allow searching using arbitrary functions, via
``@<func>````
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None
**Added:** None
**Changed:**
* Cleaned up argument parsing in ``xonsh.main.premain`` by removing the
``undo_args`` hack.
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:** None
* Fixed ``_list_completers`` such that it does not throw a ValueError if no completer is registered.
* Fixed ``_list_completers`` such that it does not throw an AttributeError if a completer has no docstring.
**Security:** None
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:**
* Fixed issue where input was directed to the last process in a pipeline,
rather than the first.
**Security:** None
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:**
* Bug where xonfig wizard can't find ENV docs
**Security:** None
**Added:** None
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:**
* Fixed ``xonsh.environ.locate_binary()`` to handle PATH variable are given as a tuple.
**Security:** None
**Added:** None
**Changed:**
* On Windows the ``PROMPT`` environment variable is reset to `$P$G` before starting
subprocesses. This prevents the unformatted xonsh ``PROMPT`` tempalte from showing up
when running batch files with ``ECHO ON```
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None
**Added:**
* ``xonsh.platform`` now has a new ``PATH_DEFAULT`` variable.
**Changed:**
* ``Env`` now guarantees that the ``$PATH`` is available and mutable when
initialized.
**Deprecated:** None
**Removed:**
* Bash is no longer loaded by default as a foreign shell for initial
configuration. This was done to increase stock startup times. This
behaviour can be recovered by adding ``{"shell": "bash"}`` to your
``"foreign_shells"`` in your config.json file. For more details,
see http://xon.sh/xonshconfig.html#foreign-shells
**Fixed:** None
**Security:** None
**Added:** None
**Changed:**
* ``__repr__`` on the environment only shows a short representation of the
object instead of printing the whole environment dictionary
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None
**Added:** None
**Changed:**
* On Windows the ``PROMPT`` environment variable is reset to `$P$G` before
sourcing *.bat files.
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None
**Added:** None
**Changed:**
* In ``VI_MODE``, the ``v`` key will enter character selection mode, not open
the editor. ``Ctrl-X Ctrl-E`` will still open an editor in any mode
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None
package:
name: xonsh
version: {{ environ.get('GIT_DESCRIBE_TAG', '0.0.0') }}
source:
git_url: ../
build:
script: python setup.py install --single-version-externally-managed --record=record.txt
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
skip: True # [py2k]
entry_points:
- xonsh = xonsh.main:main
requirements:
build:
- python
- ply
- setuptools
- jupyter
run:
- python
- ply
- prompt_toolkit
- setproctitle
- pygments
app:
entry: xonsh
icon: ../docs/_static/ascii_conch_part_color.png
about:
home: http://xon.sh/
license: BSD
summary: xonsh is a Python-ish, BASHwards-facing shell.
This diff was suppressed by a .gitattributes entry.
{
"menu_name": "Anaconda${PY_VER} ${PLATFORM}",
"menu_items":
[
{
"name": "xonsh",
"pyscript": "${PYTHON_SCRIPTS}/xonsh-script.py",
"icon": "${MENU_DIR}/xonsh.ico"
}
]
}
#!/usr/bin/env xonsh
"""Release helper script for xonsh."""
import os
import re
import sys
from argparse import ArgumentParser, Action
def replace_in_file(pattern, new, fname):
"""Replaces a given pattern in a file"""
with open(fname, 'r') as f:
raw = f.read()
lines = raw.splitlines()
ptn = re.compile(pattern)
for i, line in enumerate(lines):
if ptn.match(line):
lines[i] = new
upd = '\n'.join(lines) + '\n'
with open(fname, 'w') as f:
f.write(upd)
NEWS = [os.path.join('news', f) for f in os.listdir('news')
if f != 'TEMPLATE.rst']
NEWS_CATEGORIES = ['Added', 'Changed', 'Deprecated', 'Removed', 'Fixed',
'Security']
NEWS_RE = re.compile('\*\*({0}):\*\*'.format('|'.join(NEWS_CATEGORIES)),
flags=re.DOTALL)
def merge_news():
"""Reads news files and merges them."""
cats = {c: '' for c in NEWS_CATEGORIES}
for news in NEWS:
with open(news) as f:
raw = f.read()
raw = raw.strip()
parts = NEWS_RE.split(raw)
while len(parts) > 0 and parts[0] not in NEWS_CATEGORIES:
parts = parts[1:]
for key, val in zip(parts[::2], parts[1::2]):
val = val.strip()
if val == 'None':
continue
cats[key] += val + '\n'
for news in NEWS:
os.remove(news)
s = ''
for c in NEWS_CATEGORIES:
val = cats[c]
if len(val) == 0:
continue
s += '**' + c + ':**\n\n' + val + '\n\n'
return s
def version_update(ver):
"""Updates version strings in relevant files."""
fnews = ('.. current developments\n\n'
'v{0}\n'
'====================\n\n'
'{1}')
news = merge_news()
news = fnews.format(ver, news)
pnfs = [
('__version__\s*=.*', "__version__ = '{0}'".format(ver),
['xonsh', '__init__.py']),
('version:\s*', 'version: {0}.{{build}}'.format(ver), ['.appveyor.yml']),
('.. current developments', news, ['CHANGELOG.rst']),
]
for p, n, f in pnfs:
replace_in_file(p, n, os.path.join(*f))
def just_do_git(ns):
"""Commits and updates tags."""
git status
git commit -am @("version bump to " + ns.ver)
git push @(ns.upstream) @(ns.branch)
git tag @(ns.ver)
git push --tags @(ns.upstream)
def pipify():
"""Make and upload pip package."""
./setup.py sdist upload
def condaify(ver):
"""Make and upload conda packages."""
conda_dir = os.path.dirname(os.path.dirname($(which conda)))
conda_bld = os.path.join(conda_dir, 'conda-bld')
rm -f @(os.path.join(conda_bld, 'src_cache', 'xonsh.tar.gz'))
conda build --no-test recipe
pkgpath = os.path.join(conda_bld, '*', 'xonsh-{0}*.tar.bz2'.format(ver))
pkg = __xonsh_glob__(pkgpath)[0]
conda convert -p all -o @(conda_bld) @(pkg)
anaconda upload -u xonsh @(__xonsh_glob__(pkgpath))
def docser():
"""Create docs"""
# FIXME this should be made more general
./setup.py install --user
cd docs
make clean html push-root
cd ..
DOERS = ('do_version_bump', 'do_git', 'do_pip', 'do_conda', 'do_docs')
class OnlyAction(Action):
def __init__(self, option_strings, dest, **kwargs):
super().__init__(option_strings, dest, **kwargs)
def __call__(self, parser, namespace, values, option_string=None):
for doer in DOERS:
if doer == self.dest:
setattr(namespace, doer, True)
else:
setattr(namespace, doer, False)
def main(args=None):
parser = ArgumentParser('release')
parser.add_argument('--upstream',
default='git@github.com:scopatz/xonsh.git',
help='upstream repo')
parser.add_argument('-b', '--branch', default='master',
help='branch to commit / push to.')
for doer in DOERS:
base = doer[3:].replace('_', '-')
parser.add_argument('--do-' + base, dest=doer, default=True,
action='store_true',
help='runs ' + base)
parser.add_argument('--no-' + base, dest=doer, action='store_false',
help='does not run ' + base)
parser.add_argument('--only-' + base, dest=doer, action=OnlyAction,
help='only runs ' + base, nargs=0)
parser.add_argument('ver', help='target version string')
ns = parser.parse_args(args or $ARGS[1:])
# enable debugging
$RAISE_SUBPROC_ERROR = True
trace on
# run commands
if ns.do_version_bump:
version_update(ns.ver)
if ns.do_git:
just_do_git(ns)
if ns.do_pip:
pipify()
if ns.do_conda:
condaify(ns.ver)
if ns.do_docs:
docser()
# disable debugging
trace off
if __name__ == '__main__':
main()
cloud_sptheme
numpydoc==0.5
Sphinx
ply
nose
prompt-toolkit
pygments
coverage
codecov
export EMERALD="SWORD"
alias ll='ls -a -lF'
alias la='ls -A'
export MIGHTY=WARRIOR
alias l='ls -CF'
echo on
set ENV_TO_BE_ADDED=Hallo world
set ENV_TO_BE_REMOVED=
\ No newline at end of file
{"locs": [ 69, 3707, 3787, 3435],
"index": {"offsets": {"__total__": 0, "cmds": [{"__total__": 10, "inp": 18, "out": 52, "rtn": 83, "ts": [93, 113, 92]}, {"__total__": 137, "inp": 145, "rtn": 161, "ts": [171, 191, 170]}, 9], "env": {"BASH_COMPLETIONS": 245, "CASE_SENSITIVE_COMPLETIONS": 342, "CLUTTER_IM_MODULE": 368, "COLORTERM": 388, "CROSS_SECTIONS": 424, "DATAPATH": 489, "DBUS_SESSION_BUS_ADDRESS": 548, "DEFAULTS_PATH": 641, "DESKTOP_SESSION": 707, "DISPLAY": 735, "EDITOR": 751, "GDMSESSION": 771, "GDM_LANG": 800, "GIO_LAUNCHED_DESKTOP_FILE": 838, "GIO_LAUNCHED_DESKTOP_FILE_PID": 914, "GNOME_DESKTOP_SESSION_ID": 950, "GTEST_COLOR": 976, "GTK_IM_MODULE": 1000, "GTK_MODULES": 1023, "HOME": 1052, "INDENT": 1079, "LANG": 1095, "LANGUAGE": 1122, "LC_COLLATE": 1145, "LC_CTYPE": 1162, "LC_MESSAGES": 1192, "LC_MONETARY": 1212, "LC_NUMERIC": 1231, "LC_TIME": 1247, "LD_LIBRARY_PATH": 1271, "LESS": 1308, "LESSOPEN": 1328, "LOGNAME": 1398, "LSCUTOFF": 1421, "MANDATORY_PATH": 1446, "MULTILINE_PROMPT": 1515, "ORBIT_SOCKETDIR": 1539, "PATH": 1569, "PROMPT": 1751, "PWD": 1859, "QT4_IM_MODULE": 1893, "QT_IM_MODULE": 1916, "QT_QPA_PLATFORMTHEME": 1948, "SESSION_MANAGER": 1982, "SHELL": 2064, "SHELL_TYPE": 2091, "SHLVL": 2112, "SSH_AGENT_PID": 2134, "SSH_AUTH_SOCK": 2159, "TERM": 2203, "TERMINATOR_UUID": 2231, "TITLE": 2289, "USER": 2333, "WINDOWID": 2356, "XAUTHORITY": 2382, "XDG_CONFIG_DIRS": 2430, "XDG_CURRENT_DESKTOP": 2492, "XDG_DATA_DIRS": 2526, "XDG_GREETER_DATA_DIR": 2625, "XDG_MENU_PREFIX": 2677, "XDG_RUNTIME_DIR": 2706, "XDG_SEAT": 2736, "XDG_SEAT_PATH": 2762, "XDG_SESSION_DESKTOP": 2826, "XDG_SESSION_ID": 2861, "XDG_SESSION_PATH": 2887, "XDG_SESSION_TYPE": 2951, "XDG_VTNR": 2970, "XMODIFIERS": 2989, "XONSHRC": 3012, "XONSH_CONFIG_DIR": 3058, "XONSH_DATA_DIR": 3107, "XONSH_HISTORY_FILE": 3165, "XONSH_HISTORY_SIZE": 3224, "XONSH_STORE_STDOUT": 3263, "XONSH_VERSION": 3284, "_": 3298, "__total__": 224}, "locked": 3326, "sessionid": 3346, "ts": [3393, 3413, 3392]}, "sizes": {"__total__": 3435, "cmds": [{"__total__": 125, "inp": 25, "out": 22, "rtn": 1, "ts": [18, 18, 41]}, {"__total__": 76, "inp": 7, "rtn": 1, "ts": [18, 18, 41]}, 206], "env": {"BASH_COMPLETIONS": 65, "CASE_SENSITIVE_COMPLETIONS": 3, "CLUTTER_IM_MODULE": 5, "COLORTERM": 16, "CROSS_SECTIONS": 51, "DATAPATH": 29, "DBUS_SESSION_BUS_ADDRESS": 74, "DEFAULTS_PATH": 45, "DESKTOP_SESSION": 15, "DISPLAY": 4, "EDITOR": 4, "GDMSESSION": 15, "GDM_LANG": 7, "GIO_LAUNCHED_DESKTOP_FILE": 41, "GIO_LAUNCHED_DESKTOP_FILE_PID": 6, "GNOME_DESKTOP_SESSION_ID": 9, "GTEST_COLOR": 5, "GTK_IM_MODULE": 6, "GTK_MODULES": 19, "HOME": 15, "INDENT": 6, "LANG": 13, "LANGUAGE": 7, "LC_COLLATE": 3, "LC_CTYPE": 13, "LC_MESSAGES": 3, "LC_MONETARY": 3, "LC_NUMERIC": 3, "LC_TIME": 3, "LD_LIBRARY_PATH": 27, "LESS": 6, "LESSOPEN": 57, "LOGNAME": 9, "LSCUTOFF": 5, "MANDATORY_PATH": 47, "MULTILINE_PROMPT": 3, "ORBIT_SOCKETDIR": 20, "PATH": 170, "PROMPT": 99, "PWD": 15, "QT4_IM_MODULE": 5, "QT_IM_MODULE": 6, "QT_QPA_PLATFORMTHEME": 13, "SESSION_MANAGER": 71, "SHELL": 11, "SHELL_TYPE": 10, "SHLVL": 3, "SSH_AGENT_PID": 6, "SSH_AUTH_SOCK": 34, "TERM": 7, "TERMINATOR_UUID": 47, "TITLE": 34, "USER": 9, "WINDOWID": 10, "XAUTHORITY": 27, "XDG_CONFIG_DIRS": 37, "XDG_CURRENT_DESKTOP": 15, "XDG_DATA_DIRS": 73, "XDG_GREETER_DATA_DIR": 31, "XDG_MENU_PREFIX": 8, "XDG_RUNTIME_DIR": 16, "XDG_SEAT": 7, "XDG_SEAT_PATH": 39, "XDG_SESSION_DESKTOP": 15, "XDG_SESSION_ID": 4, "XDG_SESSION_PATH": 42, "XDG_SESSION_TYPE": 5, "XDG_VTNR": 3, "XMODIFIERS": 10, "XONSHRC": 24, "XONSH_CONFIG_DIR": 29, "XONSH_DATA_DIR": 34, "XONSH_HISTORY_FILE": 35, "XONSH_HISTORY_SIZE": 15, "XONSH_STORE_STDOUT": 2, "XONSH_VERSION": 7, "_": 14, "__total__": 3090}, "locked": 5, "sessionid": 38, "ts": [18, 18, 41]}},
"data": {"cmds": [{"inp": "echo and the bunnymen\n", "out": "and the bunnymen\r\n", "rtn": 0, "ts": [1440360782.5314634, 1440360782.5452716]
}
, {"inp": "EOF\n", "rtn": 0, "ts": [1440360785.7070692, 1440360785.7086098]
}
]
, "env": {"BASH_COMPLETIONS": "/etc/bash_completion:/usr/share/bash-completion/completions/git", "CASE_SENSITIVE_COMPLETIONS": "1", "CLUTTER_IM_MODULE": "xim", "COLORTERM": "gnome-terminal", "CROSS_SECTIONS": "/home/scopatz/openmc/data/nndc/cross_sections.xml", "DATAPATH": "/usr/share/MCNPX/v260/Data/", "DBUS_SESSION_BUS_ADDRESS": "unix:abstract=/tmp/dbus-mN1JNeR4P5,guid=4222f88e296fedba6528ff3055d9d809", "DEFAULTS_PATH": "/usr/share/gconf/awesome-gnome.default.path", "DESKTOP_SESSION": "awesome-gnome", "DISPLAY": ":0", "EDITOR": "xo", "GDMSESSION": "awesome-gnome", "GDM_LANG": "en_US", "GIO_LAUNCHED_DESKTOP_FILE": "/usr/share/applications/awesome.desktop", "GIO_LAUNCHED_DESKTOP_FILE_PID": "1894", "GNOME_DESKTOP_SESSION_ID": "Default", "GTEST_COLOR": "yes", "GTK_IM_MODULE": "ibus", "GTK_MODULES": "overlay-scrollbar", "HOME": "/home/scopatz", "INDENT": " ", "LANG": "en_US.UTF-8", "LANGUAGE": "en_US", "LC_COLLATE": "C", "LC_CTYPE": "en_US.UTF-8", "LC_MESSAGES": "C", "LC_MONETARY": "C", "LC_NUMERIC": "C", "LC_TIME": "C", "LD_LIBRARY_PATH": "/home/scopatz/.local/lib:", "LESS": " -R ", "LESSOPEN": "| /usr/share/source-highlight/src-hilite-lesspipe.sh %s", "LOGNAME": "scopatz", "LSCUTOFF": "100", "MANDATORY_PATH": "/usr/share/gconf/awesome-gnome.mandatory.path", "MULTILINE_PROMPT": ".", "ORBIT_SOCKETDIR": "/tmp/orbit-scopatz", "PATH": "/home/scopatz/.local/bin:/home/scopatz/sandbox/bin:/home/scopatz/miniconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games", "PROMPT": "{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch} {BOLD_BLUE}${NO_COLOR} ", "PWD": "/home/scopatz", "QT4_IM_MODULE": "xim", "QT_IM_MODULE": "ibus", "QT_QPA_PLATFORMTHEME": "appmenu-qt5", "SESSION_MANAGER": "local/athenaie:@/tmp/.ICE-unix/1729,unix/athenaie:/tmp/.ICE-unix/1729", "SHELL": "/bin/bash", "SHELL_TYPE": "readline", "SHLVL": "2", "SSH_AGENT_PID": "1788", "SSH_AUTH_SOCK": "/tmp/ssh-zI4rxe7ejkJG/agent.1729", "TERM": "xterm", "TERMINATOR_UUID": "urn:uuid:648fe1b7-d380-439b-bb8a-d79850a650bc", "TITLE": "{user}@{hostname}: {cwd} | xonsh", "USER": "scopatz", "WINDOWID": "67108868", "XAUTHORITY": "/home/scopatz/.Xauthority", "XDG_CONFIG_DIRS": "/etc/xdg/xdg-awesome-gnome:/etc/xdg", "XDG_CURRENT_DESKTOP": "Awesome GNOME", "XDG_DATA_DIRS": "/usr/share/awesome-gnome:/usr/share/gnome:/usr/local/share/:/usr/share/", "XDG_GREETER_DATA_DIR": "/var/lib/lightdm-data/scopatz", "XDG_MENU_PREFIX": "gnome-", "XDG_RUNTIME_DIR": "/run/user/1000", "XDG_SEAT": "seat0", "XDG_SEAT_PATH": "/org/freedesktop/DisplayManager/Seat0", "XDG_SESSION_DESKTOP": "awesome-gnome", "XDG_SESSION_ID": "c3", "XDG_SESSION_PATH": "/org/freedesktop/DisplayManager/Session0", "XDG_SESSION_TYPE": "x11", "XDG_VTNR": "7", "XMODIFIERS": "@im=ibus", "XONSHRC": "/home/scopatz/.xonshrc", "XONSH_CONFIG_DIR": "/home/scopatz/.config/xonsh", "XONSH_DATA_DIR": "/home/scopatz/.local/share/xonsh", "XONSH_HISTORY_FILE": "/home/scopatz/.xonsh_history.json", "XONSH_HISTORY_SIZE": "8128 commands", "XONSH_STORE_STDOUT": "", "XONSH_VERSION": "0.1.6", "_": "/usr/bin/env"}
, "locked": false, "sessionid": "67a24a96-b389-4aab-b2b6-6a0606d2ac65", "ts": [1440360773.6575115, 1440360785.7093797]
}
}
{"locs": [ 69, 3964, 4044, 3597],
"index": {"offsets": {"__total__": 0, "cmds": [{"__total__": 10, "inp": 18, "out": 51, "rtn": 75, "ts": [85, 105, 84]}, {"__total__": 128, "inp": 136, "rtn": 169, "ts": [179, 199, 178]}, {"__total__": 223, "inp": 231, "rtn": 247, "ts": [257, 277, 256]}, {"__total__": 301, "inp": 309, "rtn": 325, "ts": [335, 355, 334]}, 9], "env": {"BASH_COMPLETIONS": 408, "CASE_SENSITIVE_COMPLETIONS": 505, "CLUTTER_IM_MODULE": 531, "COLORTERM": 551, "CROSS_SECTIONS": 587, "DATAPATH": 652, "DBUS_SESSION_BUS_ADDRESS": 711, "DEFAULTS_PATH": 804, "DESKTOP_SESSION": 870, "DISPLAY": 898, "EDITOR": 914, "GDMSESSION": 934, "GDM_LANG": 963, "GIO_LAUNCHED_DESKTOP_FILE": 1001, "GIO_LAUNCHED_DESKTOP_FILE_PID": 1077, "GNOME_DESKTOP_SESSION_ID": 1113, "GTEST_COLOR": 1139, "GTK_IM_MODULE": 1163, "GTK_MODULES": 1186, "HOME": 1215, "INDENT": 1242, "LANG": 1258, "LANGUAGE": 1285, "LC_COLLATE": 1308, "LC_CTYPE": 1325, "LC_MESSAGES": 1355, "LC_MONETARY": 1375, "LC_NUMERIC": 1394, "LC_TIME": 1410, "LD_LIBRARY_PATH": 1434, "LESS": 1471, "LESSOPEN": 1491, "LOGNAME": 1561, "LSCUTOFF": 1584, "MANDATORY_PATH": 1609, "MULTILINE_PROMPT": 1678, "ORBIT_SOCKETDIR": 1702, "PATH": 1732, "PROMPT": 1914, "PWD": 2022, "QT4_IM_MODULE": 2056, "QT_IM_MODULE": 2079, "QT_QPA_PLATFORMTHEME": 2111, "SESSION_MANAGER": 2145, "SHELL": 2227, "SHELL_TYPE": 2254, "SHLVL": 2275, "SSH_AGENT_PID": 2297, "SSH_AUTH_SOCK": 2322, "TERM": 2366, "TERMINATOR_UUID": 2394, "TITLE": 2452, "USER": 2496, "WINDOWID": 2519, "XAUTHORITY": 2545, "XDG_CONFIG_DIRS": 2593, "XDG_CURRENT_DESKTOP": 2655, "XDG_DATA_DIRS": 2689, "XDG_GREETER_DATA_DIR": 2788, "XDG_MENU_PREFIX": 2840, "XDG_RUNTIME_DIR": 2869, "XDG_SEAT": 2899, "XDG_SEAT_PATH": 2925, "XDG_SESSION_DESKTOP": 2989, "XDG_SESSION_ID": 3024, "XDG_SESSION_PATH": 3050, "XDG_SESSION_TYPE": 3114, "XDG_VTNR": 3133, "XMODIFIERS": 3152, "XONSHRC": 3175, "XONSH_CONFIG_DIR": 3221, "XONSH_DATA_DIR": 3270, "XONSH_HISTORY_FILE": 3328, "XONSH_HISTORY_SIZE": 3387, "XONSH_STORE_STDOUT": 3426, "XONSH_VERSION": 3447, "_": 3461, "__total__": 387}, "locked": 3489, "sessionid": 3509, "ts": [3556, 3576, 3555]}, "sizes": {"__total__": 3597, "cmds": [{"__total__": 116, "inp": 24, "out": 15, "rtn": 1, "ts": [18, 17, 40]}, {"__total__": 93, "inp": 24, "rtn": 1, "ts": [18, 18, 41]}, {"__total__": 76, "inp": 7, "rtn": 1, "ts": [18, 18, 41]}, {"__total__": 75, "inp": 7, "rtn": 1, "ts": [18, 17, 40]}, 369], "env": {"BASH_COMPLETIONS": 65, "CASE_SENSITIVE_COMPLETIONS": 3, "CLUTTER_IM_MODULE": 5, "COLORTERM": 16, "CROSS_SECTIONS": 51, "DATAPATH": 29, "DBUS_SESSION_BUS_ADDRESS": 74, "DEFAULTS_PATH": 45, "DESKTOP_SESSION": 15, "DISPLAY": 4, "EDITOR": 4, "GDMSESSION": 15, "GDM_LANG": 7, "GIO_LAUNCHED_DESKTOP_FILE": 41, "GIO_LAUNCHED_DESKTOP_FILE_PID": 6, "GNOME_DESKTOP_SESSION_ID": 9, "GTEST_COLOR": 5, "GTK_IM_MODULE": 6, "GTK_MODULES": 19, "HOME": 15, "INDENT": 6, "LANG": 13, "LANGUAGE": 7, "LC_COLLATE": 3, "LC_CTYPE": 13, "LC_MESSAGES": 3, "LC_MONETARY": 3, "LC_NUMERIC": 3, "LC_TIME": 3, "LD_LIBRARY_PATH": 27, "LESS": 6, "LESSOPEN": 57, "LOGNAME": 9, "LSCUTOFF": 5, "MANDATORY_PATH": 47, "MULTILINE_PROMPT": 3, "ORBIT_SOCKETDIR": 20, "PATH": 170, "PROMPT": 99, "PWD": 15, "QT4_IM_MODULE": 5, "QT_IM_MODULE": 6, "QT_QPA_PLATFORMTHEME": 13, "SESSION_MANAGER": 71, "SHELL": 11, "SHELL_TYPE": 10, "SHLVL": 3, "SSH_AGENT_PID": 6, "SSH_AUTH_SOCK": 34, "TERM": 7, "TERMINATOR_UUID": 47, "TITLE": 34, "USER": 9, "WINDOWID": 10, "XAUTHORITY": 27, "XDG_CONFIG_DIRS": 37, "XDG_CURRENT_DESKTOP": 15, "XDG_DATA_DIRS": 73, "XDG_GREETER_DATA_DIR": 31, "XDG_MENU_PREFIX": 8, "XDG_RUNTIME_DIR": 16, "XDG_SEAT": 7, "XDG_SEAT_PATH": 39, "XDG_SESSION_DESKTOP": 15, "XDG_SESSION_ID": 4, "XDG_SESSION_PATH": 42, "XDG_SESSION_TYPE": 5, "XDG_VTNR": 3, "XMODIFIERS": 10, "XONSHRC": 24, "XONSH_CONFIG_DIR": 29, "XONSH_DATA_DIR": 34, "XONSH_HISTORY_FILE": 35, "XONSH_HISTORY_SIZE": 15, "XONSH_STORE_STDOUT": 2, "XONSH_VERSION": 7, "_": 14, "__total__": 3090}, "locked": 5, "sessionid": 38, "ts": [18, 17, 40]}},
"data": {"cmds": [{"inp": "print('The Turtles')\n", "out": "The Turtles\n", "rtn": 0, "ts": [1440371854.0424275, 1440371854.042462]
}
, {"inp": "def f():\n pass\n\n", "rtn": 0, "ts": [1440371868.8591268, 1440371868.8591323]
}
, {"inp": "f()\n", "rtn": 0, "ts": [1440371873.6370964, 1440371873.6371114]
}
, {"inp": "EOF\n", "rtn": 0, "ts": [1440371879.4418402, 1440371879.442938]
}
]
, "env": {"BASH_COMPLETIONS": "/etc/bash_completion:/usr/share/bash-completion/completions/git", "CASE_SENSITIVE_COMPLETIONS": "1", "CLUTTER_IM_MODULE": "xim", "COLORTERM": "gnome-terminal", "CROSS_SECTIONS": "/home/scopatz/openmc/data/nndc/cross_sections.xml", "DATAPATH": "/usr/share/MCNPX/v260/Data/", "DBUS_SESSION_BUS_ADDRESS": "unix:abstract=/tmp/dbus-mN1JNeR4P5,guid=4222f88e296fedba6528ff3055d9d809", "DEFAULTS_PATH": "/usr/share/gconf/awesome-gnome.default.path", "DESKTOP_SESSION": "awesome-gnome", "DISPLAY": ":0", "EDITOR": "xo", "GDMSESSION": "awesome-gnome", "GDM_LANG": "en_US", "GIO_LAUNCHED_DESKTOP_FILE": "/usr/share/applications/awesome.desktop", "GIO_LAUNCHED_DESKTOP_FILE_PID": "1894", "GNOME_DESKTOP_SESSION_ID": "Default", "GTEST_COLOR": "yes", "GTK_IM_MODULE": "ibus", "GTK_MODULES": "overlay-scrollbar", "HOME": "/home/scopatz", "INDENT": " ", "LANG": "en_US.UTF-8", "LANGUAGE": "en_US", "LC_COLLATE": "C", "LC_CTYPE": "en_US.UTF-8", "LC_MESSAGES": "C", "LC_MONETARY": "C", "LC_NUMERIC": "C", "LC_TIME": "C", "LD_LIBRARY_PATH": "/home/scopatz/.local/lib:", "LESS": " -R ", "LESSOPEN": "| /usr/share/source-highlight/src-hilite-lesspipe.sh %s", "LOGNAME": "scopatz", "LSCUTOFF": "100", "MANDATORY_PATH": "/usr/share/gconf/awesome-gnome.mandatory.path", "MULTILINE_PROMPT": ".", "ORBIT_SOCKETDIR": "/tmp/orbit-scopatz", "PATH": "/home/scopatz/.local/bin:/home/scopatz/sandbox/bin:/home/scopatz/miniconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games", "PROMPT": "{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch} {BOLD_BLUE}${NO_COLOR} ", "PWD": "/home/scopatz", "QT4_IM_MODULE": "xim", "QT_IM_MODULE": "ibus", "QT_QPA_PLATFORMTHEME": "appmenu-qt5", "SESSION_MANAGER": "local/athenaie:@/tmp/.ICE-unix/1729,unix/athenaie:/tmp/.ICE-unix/1729", "SHELL": "/bin/bash", "SHELL_TYPE": "readline", "SHLVL": "2", "SSH_AGENT_PID": "1788", "SSH_AUTH_SOCK": "/tmp/ssh-zI4rxe7ejkJG/agent.1729", "TERM": "xterm", "TERMINATOR_UUID": "urn:uuid:efa23cb0-4eed-4de0-9dbc-c9b9f2f78263", "TITLE": "{user}@{hostname}: {cwd} | xonsh", "USER": "scopatz", "WINDOWID": "67108868", "XAUTHORITY": "/home/scopatz/.Xauthority", "XDG_CONFIG_DIRS": "/etc/xdg/xdg-awesome-gnome:/etc/xdg", "XDG_CURRENT_DESKTOP": "Awesome GNOME", "XDG_DATA_DIRS": "/usr/share/awesome-gnome:/usr/share/gnome:/usr/local/share/:/usr/share/", "XDG_GREETER_DATA_DIR": "/var/lib/lightdm-data/scopatz", "XDG_MENU_PREFIX": "gnome-", "XDG_RUNTIME_DIR": "/run/user/1000", "XDG_SEAT": "seat0", "XDG_SEAT_PATH": "/org/freedesktop/DisplayManager/Seat0", "XDG_SESSION_DESKTOP": "awesome-gnome", "XDG_SESSION_ID": "c3", "XDG_SESSION_PATH": "/org/freedesktop/DisplayManager/Session0", "XDG_SESSION_TYPE": "x11", "XDG_VTNR": "7", "XMODIFIERS": "@im=ibus", "XONSHRC": "/home/scopatz/.xonshrc", "XONSH_CONFIG_DIR": "/home/scopatz/.config/xonsh", "XONSH_DATA_DIR": "/home/scopatz/.local/share/xonsh", "XONSH_HISTORY_FILE": "/home/scopatz/.xonsh_history.json", "XONSH_HISTORY_SIZE": "8128 commands", "XONSH_STORE_STDOUT": "", "XONSH_VERSION": "0.1.6", "_": "/usr/bin/env"}
, "locked": false, "sessionid": "c461668b-f650-4e17-8774-2b58384a1b9c", "ts": [1440371810.6295521, 1440371879.443467]
}
}
This diff was suppressed by a .gitattributes entry.
# I am a test module.
aliases['echo'] = lambda args, stdin=None: print(' '.join(args))
$WAKKA = "jawaka"
x = $(echo "hello mom" $WAKKA)
\ No newline at end of file
# -*- coding: utf-8 -*-
"""Testing built_ins.Aliases"""
from __future__ import unicode_literals, print_function
import os
import tempfile
import nose
from nose.plugins.skip import SkipTest
from nose.tools import assert_equal
import xonsh.built_ins as built_ins
from xonsh.aliases import Aliases
from xonsh.aliases import _which
from xonsh.environ import Env
from xonsh.tools import ON_WINDOWS
from tools import mock_xonsh_env
def cd(args, stdin=None):
return args
ALIASES = Aliases({'o': ['omg', 'lala']},
color_ls=['ls', '--color=true'],
ls="ls '- -'",
cd=cd,
indirect_cd='cd ..')
RAW = ALIASES._raw
def test_imports():
assert_equal(RAW, {
'o': ['omg', 'lala'],
'ls': ['ls', '- -'],
'color_ls': ['ls', '--color=true'],
'cd': cd,