diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 000000000..43c7f2fe0 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,9 @@ +version: 0.1.6.{build} +os: Windows Server 2012 R2 +install: +- C:\Python34\Scripts\pip install ply pyreadline nose prompt_toolkit +build_script: +- C:\Python34\python setup.py install +test_script: +- C:\Python34\Scripts\nosetests + diff --git a/.gitignore b/.gitignore index bebf3160a..e43e21949 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,13 @@ dist/ xonsh.egg-info/ docs/_build/ +# temporary files from vim and emacs +*~ +*# +.#* +*.swp +*.swo + # Virtualenv pip-selfcheck.json bin/ @@ -23,4 +30,4 @@ lib/ include/ # Mac -.DS_Store \ No newline at end of file +.DS_Store diff --git a/README.rst b/README.rst index 8d1fbf733..54e3e39bb 100644 --- a/README.rst +++ b/README.rst @@ -4,6 +4,9 @@ xonsh .. image:: https://travis-ci.org/scopatz/xonsh.svg?branch=master :target: https://travis-ci.org/scopatz/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 diff --git a/docs/api/proc.rst b/docs/api/proc.rst index 16917526a..789871c1e 100644 --- a/docs/api/proc.rst +++ b/docs/api/proc.rst @@ -1,8 +1,8 @@ .. _xonsh_proc: -****************************************************** +********************************************************** Python Procedures as Subprocess Commands (``xonsh.proc``) -****************************************************** +********************************************************** .. automodule:: xonsh.proc :members: diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 1ea4ac6f4..28d197459 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: xonsh - version: "0.1.5" + version: "0.1.6" source: fn: xonsh.tar.gz diff --git a/xonsh/__init__.py b/xonsh/__init__.py index 66a87bb6e..2fb25139f 100644 --- a/xonsh/__init__.py +++ b/xonsh/__init__.py @@ -1 +1 @@ -__version__ = '0.1.5' +__version__ = '0.1.6' diff --git a/xonsh/aliases.py b/xonsh/aliases.py index 1ceddf16f..17078f402 100644 --- a/xonsh/aliases.py +++ b/xonsh/aliases.py @@ -47,6 +47,12 @@ def source_bash(args, stdin=None): return +def source_alias(args, stdin=None): + """Executes the contents of the provided files in the current context.""" + for fname in args: + execx(open(fname).read(), 'exec', builtins.__xonsh_ctx__) + + def xexec(args, stdin=None): """ Replaces current process with command specified and passes in the @@ -99,6 +105,7 @@ DEFAULT_ALIASES = { 'exit': exit, 'quit': exit, 'xexec': xexec, + 'source': source_alias, 'timeit': timeit_alias, 'source-bash': source_bash, 'scp-resume': ['rsync', '--partial', '-h', '--progress', '--rsh=ssh'], diff --git a/xonsh/parser.py b/xonsh/parser.py index a8989e731..bb3018369 100644 --- a/xonsh/parser.py +++ b/xonsh/parser.py @@ -2260,6 +2260,7 @@ class Parser(object): col=self.col) p0._cliarg_action = 'extend' else: + p0.s = os.path.expanduser(p0.s) p0._cliarg_action = 'append' elif isinstance(p1, ast.AST): p0 = p1 @@ -2305,7 +2306,7 @@ class Parser(object): if len(p) == 2: p0 = p1 else: - p0 = os.path.expanduser(p1 + p[2]) + p0 = p1 + p[2] p[0] = p0 def p_subproc_arg_part(self, p):