Giter Site home page Giter Site logo

xonsh / xonsh Goto Github PK

View Code? Open in Web Editor NEW
8.0K 8.0K 620.0 27.23 MB

:shell: Python-powered, cross-platform, Unix-gazing shell.

Home Page: http://xon.sh

License: Other

Python 99.52% Batchfile 0.01% Shell 0.02% HTML 0.05% PowerShell 0.01% Xonsh 0.41%
bash cli command-line console data-engineering data-science devops fish hacktoberfest iterm2 prompt python python-shell script security-automation shell terminal windows-terminal xonsh zsh

xonsh's Introduction

xonsh

xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.

The language is a superset of Python 3.6+ with additional shell primitives. xonsh (pronounced conch) is meant for the daily use of experts and novices alike.

What is xonsh?

If you like xonsh, โญ the repo, write a tweet and stay tuned by watching releases.

Join the chat at https://gitter.im/xonsh/xonsh

Travis

Appveyor

Open in Google Cloud Shell

codecov.io

repology.org

First steps

Install xonsh from pip:

python -m pip install 'xonsh[full]'

And visit https://xon.sh for more information:

Extensions

Xonsh has the certain term for extensions and additional materials - xontrib - the short version of "contribution" word.

Projects that use xonsh or compatible

  • gitsome: Supercharged Git/shell autocompleter with GitHub integration.
  • xxh: Using xonsh wherever you go through the SSH.
  • rever: Cross-platform software release tool.
  • Regro autotick bot: Regro Conda-Forge autoticker.
  • zoxide: A smarter cd command.
  • any-nix-shell: xonsh support for the nix run and nix-shell environments of the Nix package manager.

Jupyter-based interactive notebooks via xontrib-jupyter:

The xonsh shell community

The xonsh shell is developed by a community of volunteers. There are few ways to help the xonsh shell:

We welcome new contributors!

xonsh's People

Contributors

adqm avatar aig787 avatar anki-code avatar astraluma avatar blahgeek avatar byk avatar carmenbianca avatar carreau avatar chronitis avatar cj-wright avatar daniel-shimon avatar dannysepler avatar dotsdl avatar dyuri avatar ephyrian avatar gforsyth avatar guillaumeleclerc avatar jb-leger avatar jnoortheen avatar johnlunzer avatar kseistrup avatar laloch avatar melund avatar nicfit avatar pre-commit-ci[bot] avatar rbrewer123 avatar santagada avatar scopatz avatar virusbb001 avatar yaxollum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xonsh's Issues

Problem parsing a command ending with comment, like: $ ls # foo

$ ls # foo
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/xonsh/shell.py", line 92, in default
    self.execer.exec(code, mode='single', glbs=None, locs=self.ctx)
  File "/usr/local/lib/python3.4/site-packages/xonsh/execer.py", line 108, in exec
    return exec(code, glbs, locs)
  File "<xonsh-code>", line 1, in <module>
NameError: name 'ls' is not defined

Besides that, a very usable shell!

.xonshrc file

I am sorely missing a .xonshrc file or similar. Something like what the .bashrc is to BASH.
I could not find anything on the matter in the documentation or while googling.

I'd love to have something like the following:

$PROMPT = '{BLUE}{user}{WHITE}@{GREEN}{hostname}{WHITE}:{RED}{cwd}{YELLOW}{curr_branch}{WHITE}\n $ '
aliases['gits'] = ['git', 'status']
aliases['gitl'] = ['git', 'log']

So that when I open a terminal, this code is executed

flake8 to python code style (PEP8)

@scopatz , maybe you will like check flake8 to verify the python code style (PEP8)

https://www.python.org/dev/peps/pep-0008/

to install

pip install flake8

a use example:

$ flake8 xonsh/aliases.py
xonsh/aliases.py:8:1: E302 expected 2 blank lines, found 1
xonsh/aliases.py:28:1: E302 expected 2 blank lines, found 1
xonsh/aliases.py:34:1: E302 expected 2 blank lines, found 1
xonsh/aliases.py:43:69: W291 trailing whitespace

compatibility with zsh and bash-completions

Many programs ship some completion files, which are updated by the completed package itself. Parsing these files and providing zsh-like completion menus would be the killer feature.

Whole traceback thrown when subproc'ing to a non-existing command

This is how bash handles it:

^_^hfaran@_ ~
$ foobar
-bash: foobar: command not found

And here is xonsh:

hfaran@_ ~ $ foobar
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/xonsh/shell.py", line 109, in default
    self.execer.exec(code, mode='single', glbs=None, locs=self.ctx)
  File "/usr/local/lib/python3.4/site-packages/xonsh/execer.py", line 110, in exec
    return exec(code, glbs, locs)
  File "<xonsh-code>", line 1, in <module>
  File "/usr/local/lib/python3.4/site-packages/xonsh/built_ins.py", line 383, in subproc_uncaptured
    return run_subproc(cmds, captured=False)
  File "/usr/local/lib/python3.4/site-packages/xonsh/built_ins.py", line 355, in run_subproc
    stdin=stdin, stdout=stdout)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'foobar'

Ideally, I think it would be preferable not to see the raw exception.

Getting a name when using a global name inside a local scope without passing it in.

I'm brand new to xonsh and it's pretty freaking awesome. However, I've noticed something odd when attempting to use an imported class (haven't tried it with other things). All this code is run inside xonsh:

from markovchains.chain import MarkovChain

def make_chain(corpus):
    return MarkovChain.from_corpus(corpus.split(), order=2)

Simple enough.

make_chain("mary had a little lamb")
Traceback (most recent call last):
  File "/home/justanr/.virtualenvs/xonch/lib/python3.4/site-packages/xonsh/shell.py", line 109, in default
    self.execer.exec(code, mode='single', glbs=None, locs=self.ctx)
  File "/home/justanr/.virtualenvs/xonch/lib/python3.4/site-packages/xonsh/execer.py", line 110, in exec
    return exec(code, glbs, locs)
  File "<xonsh-code>", line 1, in <module>
  File "<xonsh-code>", line 258, in make_chain
NameError: name 'MarkovChain' is not defined

But...

MarkovChain.from_corups(corpus="mary had a little lamb".split(), order=2)
# output: MarkovChain(order=2)

It seems like my imported class is in a quantum state of defined and not defined, only collapsing once xonsh tries to invoke it.

Any ideas what could be going on?

Relevant (Maybe?) details:

  • Python 3.4.0
  • xonsh 0.1.2
  • Inside of venv
  • Installed by pip
  • No xonshrc
  • markovchains repo -- in case something here is causing it

Add an example .xonshrc to the docs or repo

I tryed creating my multiplatform .xonshrc but perhaps I failed understending the syntax is allowed inside (weird errors defining e function inside it).

I think an example .xonshrc with some best practices (like putting in a pure python module some utility functions? Where?) could be very usefull.

Make tab work in multi-line input?

It would be nice if I could use the tab key to indent four spaces if the first line of multiline input is something like a for loop. Even better, things could be automatically indented (like IPython).

Symbol not found: rl_completion_suppress_append

$ xonsh 
Traceback (most recent call last):
  File "~/.local/bin/xonsh", line 3, in <module>
    main()
  File "~/.local/venvs/xonsh/lib/python3.4/site-packages/xonsh/main.py", line 14, in main
    shell = Shell()
  File "~/.local/venvs/xonsh/lib/python3.4/site-packages/xonsh/shell.py", line 76, in __init__
    setup_readline()
  File "~/.local/venvs/xonsh/lib/python3.4/site-packages/xonsh/shell.py", line 30, in setup_readline
    'rl_completion_suppress_append')
ValueError: dlsym(0x1007a7a30, rl_completion_suppress_append): symbol not found

$ nm ~/.local/venvs/xonsh/lib/python3.4/lib-dynload/readline.so
00000000000024e6 s  stub helpers
                 U _PyArg_ParseTuple
                 U _PyBytes_AsString
                 U _PyCallable_Check
                 U _PyErr_CheckSignals
                 U _PyErr_Clear
                 U _PyErr_Format
                 U _PyErr_NoMemory
                 U _PyErr_Occurred
                 U _PyErr_SetFromErrno
                 U _PyErr_SetString
                 U _PyEval_RestoreThread
                 U _PyEval_SaveThread
                 U _PyExc_IOError
                 U _PyExc_TypeError
                 U _PyExc_ValueError
                 U _PyGILState_Ensure
                 U _PyGILState_Release
0000000000001690 T _PyInit_readline
                 U _PyList_New
                 U _PyList_SetItem
                 U _PyLong_AsLong
                 U _PyLong_FromLong
                 U _PyMem_Free
                 U _PyMem_Malloc
                 U _PyMem_RawMalloc
                 U _PyModule_Create2
                 U _PyModule_GetState
                 U _PyOS_InputHook
                 U _PyOS_ReadlineFunctionPointer
                 U _PyOS_snprintf
                 U _PyObject_CallFunction
                 U _PyState_FindModule
                 U _PyUnicode_AsUTF8
                 U _PyUnicode_FSConverter
                 U _PyUnicode_FromString
                 U _Py_FatalError
                 U __PyOS_ReadlineTState
                 U __Py_NoneStruct
                 U ___error
                 U ___stack_chk_fail
                 U ___stack_chk_guard
0000000000003714 d __history_length
0000000000000000 t __mh_bundle_header
                 U _add_history
0000000000001bf0 t _call_readline
                 U _clear_history
0000000000004290 b _completed_input_string
0000000000004288 b _completer_word_break_characters
0000000000003e78 d _doc_add_history
0000000000004240 d _doc_clear_history
0000000000003d70 d _doc_get_begidx
0000000000003cd8 d _doc_get_completer
0000000000003f78 d _doc_get_completer_delims
0000000000003d20 d _doc_get_completion_type
0000000000003a68 d _doc_get_current_history_length
0000000000003dc8 d _doc_get_endidx
0000000000003a10 d _doc_get_history_item
00000000000037b8 d _doc_get_line_buffer
0000000000003808 d _doc_insert_text
0000000000003718 d _doc_module
00000000000036c8 d _doc_module_le
0000000000003760 d _doc_parse_and_bind
0000000000003938 d _doc_read_history_file
00000000000038b8 d _doc_read_init_file
0000000000003848 d _doc_redisplay
0000000000003eb8 d _doc_remove_history
0000000000003f08 d _doc_replace_history
0000000000003be0 d _doc_set_completer
0000000000003e18 d _doc_set_completer_delims
0000000000003fd0 d _doc_set_completion_display_matches_hook
0000000000004160 d _doc_set_pre_input_hook
00000000000040b8 d _doc_set_startup_hook
00000000000039a0 d _doc_write_history_file
                 U _emacs_meta_keymap
                 U _fileno
00000000000018c0 t _flex_complete
                 U _free
0000000000000ad0 t _get_begidx
0000000000000a20 t _get_completer
0000000000000df0 t _get_completer_delims
0000000000001210 t _get_completion_type
0000000000001250 t _get_current_history_length
0000000000000a90 t _get_endidx
0000000000001b40 t _get_history_item
0000000000001230 t _get_history_length
0000000000003b70 d _get_history_length_doc
0000000000000dd0 t _get_line_buffer
                 U _history_get
                 U _history_get_history_state
                 U _history_truncate_file
00000000000015c0 t _insert_text
0000000000004284 b _libedit_history_start
0000000000002311 s _libedit_version_tag
                 U _memset
0000000000001a00 t _on_completion
0000000000000e90 t _on_completion_display_matches_hook
0000000000000e10 t _on_hook
0000000000001000 t _on_pre_input_hook
0000000000001050 t _on_startup_hook
0000000000001600 t _parse_and_bind
0000000000001150 t _py_add_history
0000000000000a00 t _py_clear_history
00000000000010a0 t _py_remove_history
0000000000001ee0 t _py_replace_history
                 U _read_history
00000000000013c0 t _read_history_file
00000000000014b0 t _read_init_file
00000000000008b0 t _readline_clear
00000000000009f0 t _readline_free
0000000000003380 d _readline_methods
00000000000007f0 t _readline_traverse
0000000000003300 d _readlinemodule
00000000000015a0 t _redisplay
                 U _remove_history
                 U _replace_history_entry
                 U _rl_attempted_completion_function
                 U _rl_attempted_completion_over
                 U _rl_bind_key
                 U _rl_bind_key_in_map
                 U _rl_callback_handler_install
                 U _rl_callback_handler_remove
                 U _rl_callback_read_char
                 U _rl_cleanup_after_signal
                 U _rl_complete
                 U _rl_completer_word_break_characters
                 U _rl_completion_append_character
                 U _rl_completion_display_matches_hook
                 U _rl_completion_matches
                 U _rl_completion_type
                 U _rl_free_line_state
                 U _rl_initialize
                 U _rl_insert
                 U _rl_insert_text
                 U _rl_instream
                 U _rl_library_version
                 U _rl_line_buffer
                 U _rl_outstream
                 U _rl_parse_and_bind
                 U _rl_pre_input_hook
                 U _rl_prep_terminal
                 U _rl_read_init_file
                 U _rl_readline_name
                 U _rl_redisplay
                 U _rl_startup_hook
0000000000001b20 t _rlhandler
                 U _select$DARWIN_EXTSN
0000000000000ca0 t _set_completer
0000000000001190 t _set_completer_delims
0000000000000d60 t _set_completion_display_matches_hook
0000000000000b10 t _set_history_length
0000000000003ac8 d _set_history_length_doc
0000000000000b60 t _set_hook
0000000000000ce0 t _set_pre_input_hook
0000000000000d20 t _set_startup_hook
                 U _setlocale
                 U _strcmp
                 U _strcpy
                 U _strdup
                 U _strlen
                 U _strncmp
                 U _strncpy
                 U _using_history
0000000000004280 b _using_libedit_emulation
                 U _write_history
0000000000001280 t _write_history_file
                 U dyld_stub_binder

Replace readline and rlcompleter

In order to massively boost the autocompletion awesomeness, the standard readline completion used in bash and rlcompleter has to be replaced by something more sophisticated.

I can once again point at zsh providing a grid of possible choices, even showing documentation for available options temporarily.

An idea would be creating this grid dynamically using ncurses-stuff, without ever using the rlcompleter.

This would also solve the completion for something like:

$ import math
$ math.<tab>

BUG: some multi-line input crashes xonsh

I just installed off of master:

[email protected] ~/dev/xonsh $ for _ in range(3):
.....................................     pass
..................................... pass
.....................................
Traceback (most recent call last):
  File "/Users/shoyer/miniconda/envs/xonsh/bin/xonsh", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/shoyer/dev/xonsh/scripts/xonsh", line 3, in <module>
    main()
  File "/Users/shoyer/dev/xonsh/xonsh/main.py", line 15, in main
    shell.cmdloop()
  File "/Users/shoyer/dev/xonsh/xonsh/shell.py", line 142, in cmdloop
    super(Shell, self).cmdloop(intro=intro)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/cmd.py", line 204, in onecmd
    return self.emptyline()
  File "/Users/shoyer/dev/xonsh/xonsh/shell.py", line 86, in emptyline
    self.default('')
  File "/Users/shoyer/dev/xonsh/xonsh/shell.py", line 95, in default
    code = self.push(line)
  File "/Users/shoyer/dev/xonsh/xonsh/shell.py", line 116, in push
    locs=self.ctx)
  File "/Users/shoyer/dev/xonsh/xonsh/execer.py", line 82, in compile
    tree = self.parse(input, ctx, mode=mode)
  File "/Users/shoyer/dev/xonsh/xonsh/execer.py", line 62, in parse
    tree = self._parse_ctx_free(input, mode=mode)
  File "/Users/shoyer/dev/xonsh/xonsh/execer.py", line 116, in _parse_ctx_free
    mode=mode, debug_level=self.debug_level)
  File "/Users/shoyer/dev/xonsh/xonsh/parser.py", line 268, in parse
    debug=debug_level)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/site-packages/ply/yacc.py", line 265, in parse
    return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/site-packages/ply/yacc.py", line 971, in parseopt_notrack
    p.callable(pslice)
  File "/Users/shoyer/dev/xonsh/xonsh/parser.py", line 394, in p_file_stmts
    p[0] = p[1] + p[2]
TypeError: can only concatenate list (not "str") to list

Installation failed using pip

$ pip3 install xonsh
Collecting xonsh
  Downloading xonsh-0.1.0.tar.gz (70kB)
    100% |################################| 73kB 747kB/s 
                               \u2553\u2588\u2588\u2584
                              \u2559\u2588\u2588\u2580\u2588\u2588\u2555
                             \u2590\u2588\u25884\u03a6\u2588\u2580\u2588\u258c
                           ยฒ\u2588\u2588\u2584\u2588\u2588\u2588\u2580\u2588\u2588^\u2588\u2588
                         -\u2588\u2588\u2588\u2569\u2580 " \u2552\u2584\u2588\u2588\u2588\u2588\u2588\u2580\u2588
                          \u2551\u2588\u2588\u2580\u2580W\u2564\u2584\u2580 \u2590\u2551\u2588\u2558 \u255d\u2588
                     \u2584m\u2580%\u03a6\u2580\u2580  \u255d*"    ,\u03b1\u2588\u2588\u2588\u2588\u2588\u2593\u2584,\u2584\u2580\u0393"\u2580\u2555
                     "\u2580\u2588\u2588ยผ"     \u2584\u2550\u2566\u2588\u255f\u2551\u2588\u2580 \u2553 `^`   ,\u2584 \u2562\u2555
                      ,\u2580\u256bM\u2588\u2590j\u2553\u255f\u2580 \u2554\u2593\u2584\u2588\u2580  '\u2551 \u2554    \u2563\u2551\u258c  \u2580\u2584
                   \u2584m\u2580\u2580\u2588\u2588\u2588\u256c\u2588\u255d\u2580  \u2588\u2580^      "รœM  j\u2590\u255f\u256b\u2568\u2592   \u2559\u2580\u2261\u2550\u2564\u2550m\u2580\u2557
                   \u2588รฆsรฆ\u2553  \u2555, ,\u2584ร„   \u2590'\u2555H   LU  \u2551\u2551\u2560\u256bร…^2=\u2310         \u2588
                \u2584รฆ%ร…\u2588\u2588\u2588\u2560\u2588ยช\u2559\u2584\u2588\u2580      $1\u2559       \u2551\u2551\u255f\u256b\u2569*T\u2584           \u258c
               \u2559\u2557%\u2584,\u2566\u2588\u2588\u258c\u2588\u258c\u2588\u2562M         \u2555      M\u2551\u2551\u2551\u2551\u2588\u2550\u2310\u207f"^         \u256b
                 \u2559\u2563\u2580\u2588\u2588\u2588\u2588@\u2588\u2591\u2588    \u258c\u2555\u2555   `      \u258c\u2551\u2590\u2590\u2551\u2588D\u2550\u2248\u2310ยฌ\u207f      s \u2551\u2310
                   \u2559\u256c\u2588\u2588\u2588\u2593\u2551\u2588`     \u258c\u255a     \u2555   \u2555\u258c\u2551\u2590\u2590\u2563\u258c\u2310*\u2592\u2592Dรน`       \u2590\u258c
                    \u2559\u256c\u2588\u2588\u2568U\u2588      \u255f      $ \u258c \u258c\u258c\u2590\u2590\u2590M\u2588\u2584\u2550\u2264\u2310%       \u2553\u2310 \u258c
                     \u2551\u2551\u2588\u2584\u258c\u2551             \u255f \u258c \u258cM\u2590\u2590\u2590M\u2588\u2580\u2592\u2592\u259222,       \u2590\u258c
                      \u2588\u2588\u2588\u2559^\u258c            \u2551 \u258c \u2310M\u2590\u2590\u2590M\u2588\u2264\u2310\u2310ยฌ\u2500\u2500        \u2590M
                      \u2551\u2588\u2588 \u258c\u2559   \u2553       H\u2551 \u258c\u2552 M\u2551\u2590\u2590M\u2588"^^^^^"\u207f      \u2551
                       \u2588\u2588\u2555\u2559@\u2593   \u2555      \u258c\u2551 H'  \u2551\u2590\u2590\u2590\u2588\u2550\u2550=.,,,       \u2588
                       \u2559\u2588\u2593\u2554\u255a\u255a\u2588     \u2560   \u258c\u2514\u2552 \u258c\u2590 \u255a\u2551\u2551\u2551\u2580****\u207f -      \u2553\u258c
                        \u2559\u2588\u258cยผV\u255a\u258c   \u258c  \u2555 \u258c \u2551\u2552 \u2551 \u258c\u2592\u2560\u2588\u2580\u2264\u2264\u2264\u2264\u2264\u2310       \u2588
                         \u2559\u2588\u258c\u2554\u2588\u255a\u258c     \u2518 M \u258c\u2551 \u256b UUM\u2588\u2588J^^"        \u2590\u258c
                          \u2559\u2588\u2588\u2559\u2588\u2559\u258c  \u2555$j  \u2590\u2310\u258c \u258c\u2551\u255d\u255f\u2588ร…%%%\u2248\u2550        \u2588
                           \u2559\u2563\u2588\u2563\u2588^\u258c \u2560\u2551\u2590  \u2551 \u258c\u2590.DU\u2588\u2588^[""\u207f       -\u2552\u258c
                             \u2580\u2588\u2584\u2588`\u258c \u2591M\u2580 \u258c\u2590 ร…ยฃ\u255d\u255d\u2588\u255c%\u2248\u2550\u2553""w   \u207f\u2310 \u2588
                              `\u2580\u2584\u2580`\u258c \u258c\u2588\u2590\u2310\u2551\u2590UW\u2556\u2588\u2588%\u2264\u2550\u2591*\u2500    =z \u2584\u0393
                                \u2559\u2588\u2588\u2559\u2584\u258c\u2588  \u258cร…\u255b\u2563\u2588\u2588\u2568%\u2564\u0192\u207f=    -` \u2584\u2518
                                  \u2588\u258c\u2562\u2593\u258c\u258c W ยฃ6\u2588\u2564,"\u207f `   \u2584\u2261\u2580\u2580\u2580
                                   \u2588"\u2588\u258c\u258c\u255fร…\u2553\u2588\u2553\u2588\u2580%`    \u2584\u2580
                                   \u2559\u258c\u2588\u2588`\u2592U\u2593U\u2588%\u2557*     \u2588
                                    \u258c\u256b\u2551 \u258cร…ร…\u2551\u2580\u255bยฌ`      `"\u2588
                                    \u258c\u256b  \u256b\u255f \u2588\u2584     ~\u2566%\u2592\u25654^
                                    \u258c\u258c  "M\u2588 `\u2580\u2555 X\u2555"\u2557\u2584\u2580^
                                    \u2588\u258c   \u2553M   \u2559\u2580e\u2580\u2580^
                                    \u2559\u2588\u2588\u2584\u2584\u2580
                                      ^^
    Remove xonsh/lexer_table.py
    Remove xonsh/parser_table.py
    Building lexer and parser tables.
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-tr2gsevu/xonsh/setup.py", line 95, in <module>
        main()
      File "/tmp/pip-build-tr2gsevu/xonsh/setup.py", line 34, in main
        build_tables()
      File "/tmp/pip-build-tr2gsevu/xonsh/setup.py", line 26, in build_tables
        from xonsh.parser import Parser
      File "/tmp/pip-build-tr2gsevu/xonsh/xonsh/parser.py", line 7, in <module>
        from ply import yacc
    ImportError: No module named 'ply'
    Complete output from command python setup.py egg_info:


                               \u2553\u2588\u2588\u2584

                              \u2559\u2588\u2588\u2580\u2588\u2588\u2555

                             \u2590\u2588\u25884\u03a6\u2588\u2580\u2588\u258c

                           ยฒ\u2588\u2588\u2584\u2588\u2588\u2588\u2580\u2588\u2588^\u2588\u2588

                         -\u2588\u2588\u2588\u2569\u2580 " \u2552\u2584\u2588\u2588\u2588\u2588\u2588\u2580\u2588

                          \u2551\u2588\u2588\u2580\u2580W\u2564\u2584\u2580 \u2590\u2551\u2588\u2558 \u255d\u2588

                     \u2584m\u2580%\u03a6\u2580\u2580  \u255d*"    ,\u03b1\u2588\u2588\u2588\u2588\u2588\u2593\u2584,\u2584\u2580\u0393"\u2580\u2555

                     "\u2580\u2588\u2588ยผ"     \u2584\u2550\u2566\u2588\u255f\u2551\u2588\u2580 \u2553 `^`   ,\u2584 \u2562\u2555

                      ,\u2580\u256bM\u2588\u2590j\u2553\u255f\u2580 \u2554\u2593\u2584\u2588\u2580  '\u2551 \u2554    \u2563\u2551\u258c  \u2580\u2584

                   \u2584m\u2580\u2580\u2588\u2588\u2588\u256c\u2588\u255d\u2580  \u2588\u2580^      "รœM  j\u2590\u255f\u256b\u2568\u2592   \u2559\u2580\u2261\u2550\u2564\u2550m\u2580\u2557

                   \u2588รฆsรฆ\u2553  \u2555, ,\u2584ร„   \u2590'\u2555H   LU  \u2551\u2551\u2560\u256bร…^2=\u2310         \u2588

                \u2584รฆ%ร…\u2588\u2588\u2588\u2560\u2588ยช\u2559\u2584\u2588\u2580      $1\u2559       \u2551\u2551\u255f\u256b\u2569*T\u2584           \u258c

               \u2559\u2557%\u2584,\u2566\u2588\u2588\u258c\u2588\u258c\u2588\u2562M         \u2555      M\u2551\u2551\u2551\u2551\u2588\u2550\u2310\u207f"^         \u256b

                 \u2559\u2563\u2580\u2588\u2588\u2588\u2588@\u2588\u2591\u2588    \u258c\u2555\u2555   `      \u258c\u2551\u2590\u2590\u2551\u2588D\u2550\u2248\u2310ยฌ\u207f      s \u2551\u2310

                   \u2559\u256c\u2588\u2588\u2588\u2593\u2551\u2588`     \u258c\u255a     \u2555   \u2555\u258c\u2551\u2590\u2590\u2563\u258c\u2310*\u2592\u2592Dรน`       \u2590\u258c

                    \u2559\u256c\u2588\u2588\u2568U\u2588      \u255f      $ \u258c \u258c\u258c\u2590\u2590\u2590M\u2588\u2584\u2550\u2264\u2310%       \u2553\u2310 \u258c

                     \u2551\u2551\u2588\u2584\u258c\u2551             \u255f \u258c \u258cM\u2590\u2590\u2590M\u2588\u2580\u2592\u2592\u259222,       \u2590\u258c

                      \u2588\u2588\u2588\u2559^\u258c            \u2551 \u258c \u2310M\u2590\u2590\u2590M\u2588\u2264\u2310\u2310ยฌ\u2500\u2500        \u2590M

                      \u2551\u2588\u2588 \u258c\u2559   \u2553       H\u2551 \u258c\u2552 M\u2551\u2590\u2590M\u2588"^^^^^"\u207f      \u2551

                       \u2588\u2588\u2555\u2559@\u2593   \u2555      \u258c\u2551 H'  \u2551\u2590\u2590\u2590\u2588\u2550\u2550=.,,,       \u2588

                       \u2559\u2588\u2593\u2554\u255a\u255a\u2588     \u2560   \u258c\u2514\u2552 \u258c\u2590 \u255a\u2551\u2551\u2551\u2580****\u207f -      \u2553\u258c

                        \u2559\u2588\u258cยผV\u255a\u258c   \u258c  \u2555 \u258c \u2551\u2552 \u2551 \u258c\u2592\u2560\u2588\u2580\u2264\u2264\u2264\u2264\u2264\u2310       \u2588

                         \u2559\u2588\u258c\u2554\u2588\u255a\u258c     \u2518 M \u258c\u2551 \u256b UUM\u2588\u2588J^^"        \u2590\u258c

                          \u2559\u2588\u2588\u2559\u2588\u2559\u258c  \u2555$j  \u2590\u2310\u258c \u258c\u2551\u255d\u255f\u2588ร…%%%\u2248\u2550        \u2588

                           \u2559\u2563\u2588\u2563\u2588^\u258c \u2560\u2551\u2590  \u2551 \u258c\u2590.DU\u2588\u2588^[""\u207f       -\u2552\u258c

                             \u2580\u2588\u2584\u2588`\u258c \u2591M\u2580 \u258c\u2590 ร…ยฃ\u255d\u255d\u2588\u255c%\u2248\u2550\u2553""w   \u207f\u2310 \u2588

                              `\u2580\u2584\u2580`\u258c \u258c\u2588\u2590\u2310\u2551\u2590UW\u2556\u2588\u2588%\u2264\u2550\u2591*\u2500    =z \u2584\u0393

                                \u2559\u2588\u2588\u2559\u2584\u258c\u2588  \u258cร…\u255b\u2563\u2588\u2588\u2568%\u2564\u0192\u207f=    -` \u2584\u2518

                                  \u2588\u258c\u2562\u2593\u258c\u258c W ยฃ6\u2588\u2564,"\u207f `   \u2584\u2261\u2580\u2580\u2580

                                   \u2588"\u2588\u258c\u258c\u255fร…\u2553\u2588\u2553\u2588\u2580%`    \u2584\u2580

                                   \u2559\u258c\u2588\u2588`\u2592U\u2593U\u2588%\u2557*     \u2588

                                    \u258c\u256b\u2551 \u258cร…ร…\u2551\u2580\u255bยฌ`      `"\u2588

                                    \u258c\u256b  \u256b\u255f \u2588\u2584     ~\u2566%\u2592\u25654^

                                    \u258c\u258c  "M\u2588 `\u2580\u2555 X\u2555"\u2557\u2584\u2580^

                                    \u2588\u258c   \u2553M   \u2559\u2580e\u2580\u2580^

                                    \u2559\u2588\u2588\u2584\u2584\u2580

                                      ^^



    Remove xonsh/lexer_table.py

    Remove xonsh/parser_table.py

    Building lexer and parser tables.

    Traceback (most recent call last):

      File "<string>", line 20, in <module>

      File "/tmp/pip-build-tr2gsevu/xonsh/setup.py", line 95, in <module>

        main()

      File "/tmp/pip-build-tr2gsevu/xonsh/setup.py", line 34, in main

        build_tables()

      File "/tmp/pip-build-tr2gsevu/xonsh/setup.py", line 26, in build_tables

        from xonsh.parser import Parser

      File "/tmp/pip-build-tr2gsevu/xonsh/xonsh/parser.py", line 7, in <module>

        from ply import yacc

    ImportError: No module named 'ply'

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-tr2gsevu/xonsh

2015-03-09 09:04:51 [alanb@moon:~] [2.7.5] 4s 1 $ 
$ pip3 install ply
Collecting ply
  Downloading ply-3.4.tar.gz (138kB)
    100% |################################| 139kB 716kB/s 
Installing collected packages: ply
  Running setup.py install for ply
Successfully installed ply-3.4

2015-03-09 09:05:04 [alanb@moon:~] [2.7.5] 13s $ 
$ pip3 install xonsh
Collecting xonsh
  Using cached xonsh-0.1.0.tar.gz
                               \u2553\u2588\u2588\u2584
                              \u2559\u2588\u2588\u2580\u2588\u2588\u2555
                             \u2590\u2588\u25884\u03a6\u2588\u2580\u2588\u258c
                           ยฒ\u2588\u2588\u2584\u2588\u2588\u2588\u2580\u2588\u2588^\u2588\u2588
                         -\u2588\u2588\u2588\u2569\u2580 " \u2552\u2584\u2588\u2588\u2588\u2588\u2588\u2580\u2588
                          \u2551\u2588\u2588\u2580\u2580W\u2564\u2584\u2580 \u2590\u2551\u2588\u2558 \u255d\u2588
                     \u2584m\u2580%\u03a6\u2580\u2580  \u255d*"    ,\u03b1\u2588\u2588\u2588\u2588\u2588\u2593\u2584,\u2584\u2580\u0393"\u2580\u2555
                     "\u2580\u2588\u2588ยผ"     \u2584\u2550\u2566\u2588\u255f\u2551\u2588\u2580 \u2553 `^`   ,\u2584 \u2562\u2555
                      ,\u2580\u256bM\u2588\u2590j\u2553\u255f\u2580 \u2554\u2593\u2584\u2588\u2580  '\u2551 \u2554    \u2563\u2551\u258c  \u2580\u2584
                   \u2584m\u2580\u2580\u2588\u2588\u2588\u256c\u2588\u255d\u2580  \u2588\u2580^      "รœM  j\u2590\u255f\u256b\u2568\u2592   \u2559\u2580\u2261\u2550\u2564\u2550m\u2580\u2557
                   \u2588รฆsรฆ\u2553  \u2555, ,\u2584ร„   \u2590'\u2555H   LU  \u2551\u2551\u2560\u256bร…^2=\u2310         \u2588
                \u2584รฆ%ร…\u2588\u2588\u2588\u2560\u2588ยช\u2559\u2584\u2588\u2580      $1\u2559       \u2551\u2551\u255f\u256b\u2569*T\u2584           \u258c
               \u2559\u2557%\u2584,\u2566\u2588\u2588\u258c\u2588\u258c\u2588\u2562M         \u2555      M\u2551\u2551\u2551\u2551\u2588\u2550\u2310\u207f"^         \u256b
                 \u2559\u2563\u2580\u2588\u2588\u2588\u2588@\u2588\u2591\u2588    \u258c\u2555\u2555   `      \u258c\u2551\u2590\u2590\u2551\u2588D\u2550\u2248\u2310ยฌ\u207f      s \u2551\u2310
                   \u2559\u256c\u2588\u2588\u2588\u2593\u2551\u2588`     \u258c\u255a     \u2555   \u2555\u258c\u2551\u2590\u2590\u2563\u258c\u2310*\u2592\u2592Dรน`       \u2590\u258c
                    \u2559\u256c\u2588\u2588\u2568U\u2588      \u255f      $ \u258c \u258c\u258c\u2590\u2590\u2590M\u2588\u2584\u2550\u2264\u2310%       \u2553\u2310 \u258c
                     \u2551\u2551\u2588\u2584\u258c\u2551             \u255f \u258c \u258cM\u2590\u2590\u2590M\u2588\u2580\u2592\u2592\u259222,       \u2590\u258c
                      \u2588\u2588\u2588\u2559^\u258c            \u2551 \u258c \u2310M\u2590\u2590\u2590M\u2588\u2264\u2310\u2310ยฌ\u2500\u2500        \u2590M
                      \u2551\u2588\u2588 \u258c\u2559   \u2553       H\u2551 \u258c\u2552 M\u2551\u2590\u2590M\u2588"^^^^^"\u207f      \u2551
                       \u2588\u2588\u2555\u2559@\u2593   \u2555      \u258c\u2551 H'  \u2551\u2590\u2590\u2590\u2588\u2550\u2550=.,,,       \u2588
                       \u2559\u2588\u2593\u2554\u255a\u255a\u2588     \u2560   \u258c\u2514\u2552 \u258c\u2590 \u255a\u2551\u2551\u2551\u2580****\u207f -      \u2553\u258c
                        \u2559\u2588\u258cยผV\u255a\u258c   \u258c  \u2555 \u258c \u2551\u2552 \u2551 \u258c\u2592\u2560\u2588\u2580\u2264\u2264\u2264\u2264\u2264\u2310       \u2588
                         \u2559\u2588\u258c\u2554\u2588\u255a\u258c     \u2518 M \u258c\u2551 \u256b UUM\u2588\u2588J^^"        \u2590\u258c
                          \u2559\u2588\u2588\u2559\u2588\u2559\u258c  \u2555$j  \u2590\u2310\u258c \u258c\u2551\u255d\u255f\u2588ร…%%%\u2248\u2550        \u2588
                           \u2559\u2563\u2588\u2563\u2588^\u258c \u2560\u2551\u2590  \u2551 \u258c\u2590.DU\u2588\u2588^[""\u207f       -\u2552\u258c
                             \u2580\u2588\u2584\u2588`\u258c \u2591M\u2580 \u258c\u2590 ร…ยฃ\u255d\u255d\u2588\u255c%\u2248\u2550\u2553""w   \u207f\u2310 \u2588
                              `\u2580\u2584\u2580`\u258c \u258c\u2588\u2590\u2310\u2551\u2590UW\u2556\u2588\u2588%\u2264\u2550\u2591*\u2500    =z \u2584\u0393
                                \u2559\u2588\u2588\u2559\u2584\u258c\u2588  \u258cร…\u255b\u2563\u2588\u2588\u2568%\u2564\u0192\u207f=    -` \u2584\u2518
                                  \u2588\u258c\u2562\u2593\u258c\u258c W ยฃ6\u2588\u2564,"\u207f `   \u2584\u2261\u2580\u2580\u2580
                                   \u2588"\u2588\u258c\u258c\u255fร…\u2553\u2588\u2553\u2588\u2580%`    \u2584\u2580
                                   \u2559\u258c\u2588\u2588`\u2592U\u2593U\u2588%\u2557*     \u2588
                                    \u258c\u256b\u2551 \u258cร…ร…\u2551\u2580\u255bยฌ`      `"\u2588
                                    \u258c\u256b  \u256b\u255f \u2588\u2584     ~\u2566%\u2592\u25654^
                                    \u258c\u258c  "M\u2588 `\u2580\u2555 X\u2555"\u2557\u2584\u2580^
                                    \u2588\u258c   \u2553M   \u2559\u2580e\u2580\u2580^
                                    \u2559\u2588\u2588\u2584\u2584\u2580
                                      ^^
    Remove xonsh/lexer_table.py
    Remove xonsh/parser_table.py
    Building lexer and parser tables.
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-z0uet8y1/xonsh/setup.py", line 95, in <module>
        main()
      File "/tmp/pip-build-z0uet8y1/xonsh/setup.py", line 35, in main
        with open('readme.rst', 'r') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'readme.rst'
    Complete output from command python setup.py egg_info:


                               \u2553\u2588\u2588\u2584

                              \u2559\u2588\u2588\u2580\u2588\u2588\u2555

                             \u2590\u2588\u25884\u03a6\u2588\u2580\u2588\u258c

                           ยฒ\u2588\u2588\u2584\u2588\u2588\u2588\u2580\u2588\u2588^\u2588\u2588

                         -\u2588\u2588\u2588\u2569\u2580 " \u2552\u2584\u2588\u2588\u2588\u2588\u2588\u2580\u2588

                          \u2551\u2588\u2588\u2580\u2580W\u2564\u2584\u2580 \u2590\u2551\u2588\u2558 \u255d\u2588

                     \u2584m\u2580%\u03a6\u2580\u2580  \u255d*"    ,\u03b1\u2588\u2588\u2588\u2588\u2588\u2593\u2584,\u2584\u2580\u0393"\u2580\u2555

                     "\u2580\u2588\u2588ยผ"     \u2584\u2550\u2566\u2588\u255f\u2551\u2588\u2580 \u2553 `^`   ,\u2584 \u2562\u2555

                      ,\u2580\u256bM\u2588\u2590j\u2553\u255f\u2580 \u2554\u2593\u2584\u2588\u2580  '\u2551 \u2554    \u2563\u2551\u258c  \u2580\u2584

                   \u2584m\u2580\u2580\u2588\u2588\u2588\u256c\u2588\u255d\u2580  \u2588\u2580^      "รœM  j\u2590\u255f\u256b\u2568\u2592   \u2559\u2580\u2261\u2550\u2564\u2550m\u2580\u2557

                   \u2588รฆsรฆ\u2553  \u2555, ,\u2584ร„   \u2590'\u2555H   LU  \u2551\u2551\u2560\u256bร…^2=\u2310         \u2588

                \u2584รฆ%ร…\u2588\u2588\u2588\u2560\u2588ยช\u2559\u2584\u2588\u2580      $1\u2559       \u2551\u2551\u255f\u256b\u2569*T\u2584           \u258c

               \u2559\u2557%\u2584,\u2566\u2588\u2588\u258c\u2588\u258c\u2588\u2562M         \u2555      M\u2551\u2551\u2551\u2551\u2588\u2550\u2310\u207f"^         \u256b

                 \u2559\u2563\u2580\u2588\u2588\u2588\u2588@\u2588\u2591\u2588    \u258c\u2555\u2555   `      \u258c\u2551\u2590\u2590\u2551\u2588D\u2550\u2248\u2310ยฌ\u207f      s \u2551\u2310

                   \u2559\u256c\u2588\u2588\u2588\u2593\u2551\u2588`     \u258c\u255a     \u2555   \u2555\u258c\u2551\u2590\u2590\u2563\u258c\u2310*\u2592\u2592Dรน`       \u2590\u258c

                    \u2559\u256c\u2588\u2588\u2568U\u2588      \u255f      $ \u258c \u258c\u258c\u2590\u2590\u2590M\u2588\u2584\u2550\u2264\u2310%       \u2553\u2310 \u258c

                     \u2551\u2551\u2588\u2584\u258c\u2551             \u255f \u258c \u258cM\u2590\u2590\u2590M\u2588\u2580\u2592\u2592\u259222,       \u2590\u258c

                      \u2588\u2588\u2588\u2559^\u258c            \u2551 \u258c \u2310M\u2590\u2590\u2590M\u2588\u2264\u2310\u2310ยฌ\u2500\u2500        \u2590M

                      \u2551\u2588\u2588 \u258c\u2559   \u2553       H\u2551 \u258c\u2552 M\u2551\u2590\u2590M\u2588"^^^^^"\u207f      \u2551

                       \u2588\u2588\u2555\u2559@\u2593   \u2555      \u258c\u2551 H'  \u2551\u2590\u2590\u2590\u2588\u2550\u2550=.,,,       \u2588

                       \u2559\u2588\u2593\u2554\u255a\u255a\u2588     \u2560   \u258c\u2514\u2552 \u258c\u2590 \u255a\u2551\u2551\u2551\u2580****\u207f -      \u2553\u258c

                        \u2559\u2588\u258cยผV\u255a\u258c   \u258c  \u2555 \u258c \u2551\u2552 \u2551 \u258c\u2592\u2560\u2588\u2580\u2264\u2264\u2264\u2264\u2264\u2310       \u2588

                         \u2559\u2588\u258c\u2554\u2588\u255a\u258c     \u2518 M \u258c\u2551 \u256b UUM\u2588\u2588J^^"        \u2590\u258c

                          \u2559\u2588\u2588\u2559\u2588\u2559\u258c  \u2555$j  \u2590\u2310\u258c \u258c\u2551\u255d\u255f\u2588ร…%%%\u2248\u2550        \u2588

                           \u2559\u2563\u2588\u2563\u2588^\u258c \u2560\u2551\u2590  \u2551 \u258c\u2590.DU\u2588\u2588^[""\u207f       -\u2552\u258c

                             \u2580\u2588\u2584\u2588`\u258c \u2591M\u2580 \u258c\u2590 ร…ยฃ\u255d\u255d\u2588\u255c%\u2248\u2550\u2553""w   \u207f\u2310 \u2588

                              `\u2580\u2584\u2580`\u258c \u258c\u2588\u2590\u2310\u2551\u2590UW\u2556\u2588\u2588%\u2264\u2550\u2591*\u2500    =z \u2584\u0393

                                \u2559\u2588\u2588\u2559\u2584\u258c\u2588  \u258cร…\u255b\u2563\u2588\u2588\u2568%\u2564\u0192\u207f=    -` \u2584\u2518

                                  \u2588\u258c\u2562\u2593\u258c\u258c W ยฃ6\u2588\u2564,"\u207f `   \u2584\u2261\u2580\u2580\u2580

                                   \u2588"\u2588\u258c\u258c\u255fร…\u2553\u2588\u2553\u2588\u2580%`    \u2584\u2580

                                   \u2559\u258c\u2588\u2588`\u2592U\u2593U\u2588%\u2557*     \u2588

                                    \u258c\u256b\u2551 \u258cร…ร…\u2551\u2580\u255bยฌ`      `"\u2588

                                    \u258c\u256b  \u256b\u255f \u2588\u2584     ~\u2566%\u2592\u25654^

                                    \u258c\u258c  "M\u2588 `\u2580\u2555 X\u2555"\u2557\u2584\u2580^

                                    \u2588\u258c   \u2553M   \u2559\u2580e\u2580\u2580^

                                    \u2559\u2588\u2588\u2584\u2584\u2580

                                      ^^



    Remove xonsh/lexer_table.py

    Remove xonsh/parser_table.py

    Building lexer and parser tables.

    Traceback (most recent call last):

      File "<string>", line 20, in <module>

      File "/tmp/pip-build-z0uet8y1/xonsh/setup.py", line 95, in <module>

        main()

      File "/tmp/pip-build-z0uet8y1/xonsh/setup.py", line 35, in main

        with open('readme.rst', 'r') as f:

    FileNotFoundError: [Errno 2] No such file or directory: 'readme.rst'

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-z0uet8y1/xonsh

Path auto complition for vim returns error

Hi, thanks for this new cool shell, I realy like it! The only problem I've got so far is when I type 'vim ' and then press tab button it prints error message "/usr/share/bash-completion/bash_completion: line 1856: compopt: not currently executing completion function" instead of list of files in a directory. If I press tab again, it shows files as usual, but the error message is still printed to command line, so path becomes unreadable. Example:

pablo@alien /some/path branch $ vim /usr/share/bash-completion/bash_completion: line 1856: compopt: not currently executing completion function
/usr/share/bash-completion/bash_completion: line 1856: compopt: not currently executing completion function

.git/                 AUTHORS               GPATH                 MinSizeRel/           benchmark/            dependencies/

Aliases return repr output (also pipes do not work properly)

I added a function which returns a simple string into the aliases, aliases["hello"] = lambda arg, stdin=None: ("Hello World!", None) returns 'Hello World!' and not Hello World! as expected.

Piping this output to cat gives an error AttributeError: 'str' object has no attribute 'fileno'

Whitespace-only input crashes xonsh

Entering only spaces and pressing enter crashes xonsh:

bollmann@bollmann-VirtualBox ~ >>>  
Traceback (most recent call last):
  File "/home/bollmann/repositories/xonsh/xonsh/execer.py", line 118, in _parse_ctx_free
    mode=mode, debug_level=self.debug_level)
  File "/home/bollmann/repositories/xonsh/xonsh/parser.py", line 271, in parse
    debug=debug_level)
  File "/usr/local/lib/python3.4/dist-packages/ply-3.4-py3.4.egg/ply/yacc.py", line 265, in parse
  File "/usr/local/lib/python3.4/dist-packages/ply-3.4-py3.4.egg/ply/yacc.py", line 1047, in parseopt_notrack
  File "/home/bollmann/repositories/xonsh/xonsh/parser.py", line 2120, in p_error
    column=self.lexer.token_col(p)))
  File "/home/bollmann/repositories/xonsh/xonsh/parser.py", line 341, in _parse_error
    raise err
SyntaxError: <xonsh-code>:1:1: ('code:  ',)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/xonsh", line 12, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/bollmann/repositories/xonsh/scripts/xonsh", line 3, in <module>
    main()
  File "/home/bollmann/repositories/xonsh/xonsh/main.py", line 15, in main
    shell.cmdloop()
  File "/home/bollmann/repositories/xonsh/xonsh/shell.py", line 144, in cmdloop
    super(Shell, self).cmdloop(intro=intro)
  File "/usr/lib/python3.4/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python3.4/cmd.py", line 211, in onecmd
    return self.default(line)
  File "/home/bollmann/repositories/xonsh/xonsh/shell.py", line 97, in default
    code = self.push(line)
  File "/home/bollmann/repositories/xonsh/xonsh/shell.py", line 118, in push
    locs=self.ctx)
  File "/home/bollmann/repositories/xonsh/xonsh/execer.py", line 84, in compile
    tree = self.parse(input, ctx, mode=mode)
  File "/home/bollmann/repositories/xonsh/xonsh/execer.py", line 62, in parse
    tree = self._parse_ctx_free(input, mode=mode)
  File "/home/bollmann/repositories/xonsh/xonsh/execer.py", line 126, in _parse_ctx_free
    lines[idx] = subproc_line(lines[idx])
  File "/home/bollmann/repositories/xonsh/xonsh/tools.py", line 31, in subproc_line
    tok = line.split(None, 1)[0]
IndexError: list index out of range
Exception ignored in: <bound method Shell.__del__ of <xonsh.shell.Shell object at 0x7ff7874cb8d0>>
Traceback (most recent call last):
  File "/home/bollmann/repositories/xonsh/xonsh/shell.py", line 83, in __del__
  File "/home/bollmann/repositories/xonsh/xonsh/shell.py", line 49, in teardown_readline
  File "<frozen importlib._bootstrap>", line 2214, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2199, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 2132, in _find_spec
TypeError: 'NoneType' object is not iterable

The same happens in multi-line input, e.g. if you separate parts of an indented block (say, in .xonshrc) with an empty line, and that line happens to contain whitespace.

More complete history

I suggest that each command executed in xonsh should create an history object, some of whose attributes could be

  1. The command which ended up being run
  2. stdout
  3. stderr
  4. return status
  5. timestamp

History should be stored in a normal, text based, configuration file, e.g. ~/.xonsh_history, or ~/.config/xonsh/history, and (Unlike bash) history should be unlimited by default

A function, or command, should be provided to recall history items by index, or by searching on command text or output text

Handle paths with spaces

When you tab complete folders with spaces in them, the spaces are not delimited with \, so you have to instead put quotes around them:

jesse@rmbp13 ~/xonsh $ mkdir "folder with spaces"
jesse@rmbp13 ~/xonsh $ ls
folder with spaces
jesse@rmbp13 ~/xonsh $ cd folder with spaces/
                             ^ Hit tab to complete
cd takes 0 or 1 arguments, not 3
jesse@rmbp13 ~/xonsh $ ls folder with spaces/
                             ^ Hit tab to complete
ls: folder: No such file or directory
ls: spaces/: No such file or directory
ls: with: No such file or directory
jesse@rmbp13 ~/xonsh $ cd "folder with spaces"
jesse@rmbp13 ~/xonsh/folder with spaces $

Adding the the \ instead doesn't work either (maybe why they aren't added during tab completion?):

jesse@rmbp13 ~ $ cd folder\ with\ spaces/
................
...
SyntaxError: <xonsh-code>:1:10: Invalid token '\\'

This is on OSX with xonsh 0.1.2.

Exception on startup on MacOS X 10.10.2

After installing via pip3 on MacOS, I get an exception and stack trace whenever I try to start the shell:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/bin/xonsh", line 3, in <module>
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/xonsh/main.py", line 14, in main
    shell = Shell()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/xonsh/shell.py", line 76, in __init__
    setup_readline()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/xonsh/shell.py", line 30, in setup_readline
    'rl_completion_suppress_append')
ValueError: dlsym(0x10069fd20, rl_completion_suppress_append): symbol not found

MacOS X 10.10.2
Python 3.4.3

reverse search not interrupted by ^C

When i press ctrl+r to search my command history, I sometimes want to cancel that search. In Bash, I do so by hitting ctrl+c (^C).

In xonsh, the ctrl+c stroke returns my to a fresh prompt, but as I type, it continues the search from before:

ruben@krogan:~ 
(failed reverse-i-search)`entr': cd workspace/contract_management/
ruben@krogan:~ 
(failed reverse-i-search)`entrs': 

Tab Completion on OS X

Tab completion does not work. Instead it appears an actual tab character is inserted.

Python 3.4.3
OS X 10.10.2 (14C1510)
14.1.0 Darwin Kernel Version 14.1.0
xonsh master as of now...

"TypeError: 'NoneType' object is not iterable" on first run

2015-03-09 09:06:37 [alanb@moon:~/src/git/hub] [2.7.5] 50s $ 
$ git clone https://github.com/scopatz/xonsh.git
Cloning into 'xonsh'...
remote: Counting objects: 1471, done.
remote: Compressing objects: 100% (31/31), done.
Receiving objects: 100% (1471/1471), 855.02 KiB | 655.00 KiB/s, done.
remote: Total 1471 (delta 12), reused 0 (delta 0), pack-reused 1439
Resolving deltas: 100% (901/901), done.
Checking connectivity... done.

2015-03-09 09:06:44 [alanb@moon:~/src/git/hub] [2.7.5] 7s $ 
$ cd xonsh

2015-03-09 09:07:09 [alanb@moon:~/src/git/hub/xonsh] [2.7.5] master 8s 1 ยฑ 
$ sudo python3 setup.py install

                           โ•“โ–ˆโ–ˆโ–„                                              
                          โ•™โ–ˆโ–ˆโ–€โ–ˆโ–ˆโ••                                            
                         โ–โ–ˆโ–ˆ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โ–€โ–€^                             
                                โ•™โ–ˆโ–ˆโ–„โ–„โ–€                                       
                                  ^^                                         

Remove xonsh/lexer_table.py
Remove xonsh/parser_table.py
Building lexer and parser tables.
running install
Checking .pth file support in /usr/local/lib/python3.4/dist-packages/
/usr/bin/python3 -E -c pass
TEST PASSED: /usr/local/lib/python3.4/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing top-level names to xonsh.egg-info/top_level.txt
writing dependency_links to xonsh.egg-info/dependency_links.txt
writing xonsh.egg-info/PKG-INFO
reading manifest file 'xonsh.egg-info/SOURCES.txt'
writing manifest file 'xonsh.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying xonsh/parser_table.py -> build/lib/xonsh
copying xonsh/lexer_table.py -> build/lib/xonsh
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/main.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/execer.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/parser_table.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/environ.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/lexer_table.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/ast.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/shell.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/completer.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/lexer.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/tools.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/built_ins.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/__init__.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/aliases.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/inspectors.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/parser.py -> build/bdist.linux-x86_64/egg/xonsh
copying build/lib/xonsh/openpy.py -> build/bdist.linux-x86_64/egg/xonsh
byte-compiling build/bdist.linux-x86_64/egg/xonsh/main.py to main.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/execer.py to execer.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/parser_table.py to parser_table.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/environ.py to environ.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/lexer_table.py to lexer_table.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/ast.py to ast.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/shell.py to shell.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/completer.py to completer.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/lexer.py to lexer.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/tools.py to tools.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/built_ins.py to built_ins.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/aliases.py to aliases.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/inspectors.py to inspectors.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/parser.py to parser.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/xonsh/openpy.py to openpy.cpython-34.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.4/xonsh -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/xonsh to 755
copying xonsh.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying xonsh.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying xonsh.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying xonsh.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
xonsh.__pycache__.inspectors.cpython-34: module MAY be using inspect.getsource
xonsh.__pycache__.inspectors.cpython-34: module MAY be using inspect.getabsfile
xonsh.__pycache__.execer.cpython-34: module MAY be using inspect.stack
xonsh.__pycache__.shell.cpython-34: module references __file__
creating 'dist/xonsh-0.1-py3.4.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing xonsh-0.1-py3.4.egg
removing '/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg' (and everything under it)
creating /usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg
Extracting xonsh-0.1-py3.4.egg to /usr/local/lib/python3.4/dist-packages
xonsh 0.1 is already the active version in easy-install.pth
Installing xonsh script to /usr/local/bin

Installed /usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg
Processing dependencies for xonsh==0.1
Finished processing dependencies for xonsh==0.1

2015-03-09 09:07:14 [alanb@moon:~/src/git/hub/xonsh] [2.7.5] master 5s ยฑ 
$ xonsh
Traceback (most recent call last):
  File "/usr/local/bin/xonsh", line 4, in <module>
    __import__('pkg_resources').run_script('xonsh==0.1', 'xonsh')
  File "/usr/local/lib/python3.4/dist-packages/setuptools-14.0-py3.4.egg/pkg_resources/__init__.py", line 698, in run_script
  File "/usr/local/lib/python3.4/dist-packages/setuptools-14.0-py3.4.egg/pkg_resources/__init__.py", line 1616, in run_script
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/EGG-INFO/scripts/xonsh", line 3, in <module>
    main()
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/main.py", line 14, in main
    shell = Shell()
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/shell.py", line 68, in __init__
    self.execer = Execer()
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/execer.py", line 34, in __init__
    load_builtins(execer=self)
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/built_ins.py", line 318, in load_builtins
    builtins.__xonsh_env__ = ENV = Env(default_env())
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/environ.py", line 121, in default_env
    ctx.update(bash_env())
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/environ.py", line 95, in bash_env
    env = dict(items)
ValueError: dictionary update sequence element #0 has length 1; 2 is required
Exception ignored in: <bound method Execer.__del__ of <xonsh.execer.Execer object at 0x7feb369314a8>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/execer.py", line 37, in __del__
    unload_builtins()
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/built_ins.py", line 340, in unload_builtins
    ENV.undo_replace_env()
AttributeError: 'NoneType' object has no attribute 'undo_replace_env'
Exception ignored in: <bound method Shell.__del__ of <xonsh.shell.Shell object at 0x7feb36878a20>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/shell.py", line 79, in __del__
    teardown_readline()
  File "/usr/local/lib/python3.4/dist-packages/xonsh-0.1-py3.4.egg/xonsh/shell.py", line 45, in teardown_readline
    import readline
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2222, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 2164, in _find_spec
  File "<frozen importlib._bootstrap>", line 1940, in find_spec
  File "<frozen importlib._bootstrap>", line 1908, in _get_spec
TypeError: 'NoneType' object is not iterable

Semicolon not able to separate shell commands?

The semicolon works fine to separate Python statements, e.g.:

~ $ x = 7; print(x)
7

But it does not seem to work to separate shell commands. For example:

~ $ ls ; echo "hey"
ls: cannot access ;: No such file or directory
ls: cannot access echo: No such file or directory
ls: cannot access hey: No such file or directory

or

~ $ cd Desktop; echo "hello"
cd takes 0 or 1 arguments, not 3

Crash after error in multi-line input

So if I'm entering something stupid, I usually get some kind of exception. For example, for a non-existant command:

>>> xyz
Traceback (most recent call last):
  [...]
FileNotFoundError: [Errno 2] No such file or directory: 'xyz'
>>>

However, the same thing in multi-line input causes xonsh to crash completely, sending me back to my default shell:

>>> if True:
...     xyz
...
Traceback (most recent call last):
  File "/usr/local/bin/xonsh", line 3, in <module>
    main()
  File "/usr/local/lib/python3.4/dist-packages/xonsh/main.py", line 15, in main
    shell.cmdloop()
  File "/usr/local/lib/python3.4/dist-packages/xonsh/shell.py", line 139, in cmdloop
    super(Shell, self).cmdloop(intro=intro)
  File "/usr/lib/python3.4/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python3.4/cmd.py", line 204, in onecmd
    return self.emptyline()
  File "/usr/local/lib/python3.4/dist-packages/xonsh/shell.py", line 86, in emptyline
    self.default('')
  File "/usr/local/lib/python3.4/dist-packages/xonsh/shell.py", line 95, in default
    code = self.push(line)
  File "/usr/local/lib/python3.4/dist-packages/xonsh/shell.py", line 117, in push
    locs=self.ctx)
  File "/usr/local/lib/python3.4/dist-packages/xonsh/execer.py", line 82, in compile
    tree = self.parse(input, ctx, mode=mode)
  File "/usr/local/lib/python3.4/dist-packages/xonsh/execer.py", line 70, in parse
    tree = self.ctxtransformer.ctxvisit(tree, input, ctx, mode=mode)
  File "/usr/local/lib/python3.4/dist-packages/xonsh/ast.py", line 80, in ctxvisit
    node = self.visit(node)
  File "/usr/lib/python3.4/ast.py", line 245, in visit
    return visitor(node)
  File "/usr/lib/python3.4/ast.py", line 301, in generic_visit
    value = self.visit(value)
  File "/usr/lib/python3.4/ast.py", line 245, in visit
    return visitor(node)
  File "/usr/lib/python3.4/ast.py", line 301, in generic_visit
    value = self.visit(value)
  File "/usr/lib/python3.4/ast.py", line 245, in visit
    return visitor(node)
  File "/usr/local/lib/python3.4/dist-packages/xonsh/ast.py", line 137, in visit_Expr
    newnode = self.try_subproc_line(node)
  File "/usr/local/lib/python3.4/dist-packages/xonsh/ast.py", line 101, in try_subproc_line
    spline = subproc_line(self.lines[node.lineno - 1])
  File "/usr/local/lib/python3.4/dist-packages/xonsh/tools.py", line 31, in subproc_line
    tok = line.split(None, 1)[0]
IndexError: list index out of range
$ 

Shouldn't it at least fail in a way that allows me to continue my current session?
(I was experimenting with what I can or can't do in xonsh, and having to restart it and losing any variables etc. I've set up is tiresome.)

It doesn't seem to matter what kind of error occurs within the multi-line input, and it happens both in a if-conditional and a for-loop.

Add auto-indentation on multiline function/loops/if statements

Starting a multineline command, ie:
if True:

should preferably start the new line indented accordingly, currently it requires me to manually enter spaces which confused me quite a bit at first because my multiline commands just didn't go through (until I realized my mistake).

Multi-line input never terminates

When starting a multi-line input, I can't seem to ever get out of multi-line mode no matter how many times I press 'enter'.

I tried to do some good old print-debugging in shell.py, outputting the contents of col and buf immediately after line 106, and col is always zero no matter what I entered before. So it seems that buf.pop() gets called for every line I enter after the first, which means that the buffer never holds a syntactically valid input.

For reference, the output of my print-debugging:

>>> if True:
col is 0, buf is ['if True:\n']
Try executing:
if True:

SyntaxError!
...   print(1)
col is 0, buf is ['if True:\n', '  print(1)\n']
Try executing:
if True:

SyntaxError!
... 
col is 0, buf is ['if True:\n', '  print(1)\n']
Try executing:
if True:

SyntaxError!
...   print(2)
col is 0, buf is ['if True:\n', '  print(2)\n']
Try executing:
if True:

SyntaxError!
... 

Let me know if I can help debug this problem in any way; I don't understand enough of the code so far to know how to proceed from here.

curr_branch not showing up

I have curr_branch in my prompt however the branch doesn't seem to be showing up.

Here is my git version:

glenbot@Glens-Air ~/Code/budget/personal_finance $ git --version
git version 1.9.5 (Apple Git-50.3)

My prompt (which is the default prompt):

$PROMPT = '{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{BOLD_RED}{curr_branch} {BOLD_BLUE}${NO_COLOR} '

any ideas?

Dependencies should be declared by package metadata

xonsh requires ply both at runtime and install-time. It makes hard to install xonsh using pipsi. There are install_requires (runtime dependencies) and setup_requires (dependencies for invoking setup.py script) keywords provided by setuptools. It would be better if dependencies are declared using these keywords.

Couldn't install with pip or pip3

Error with pip

    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip_build_root/xonsh/setup.py", line 111, in <module>
        main()
      File "/tmp/pip_build_root/xonsh/setup.py", line 46, in main
        print(logo)
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 28-39: ordinal not in range(128)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip_build_root/xonsh/setup.py", line 111, in <module>

    main()

  File "/tmp/pip_build_root/xonsh/setup.py", line 46, in main

    print(logo)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 28-39: ordinal not in range(128)

Error with pip3

Building lexer and parser tables.

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "/tmp/pip_build_root/xonsh/setup.py", line 111, in <module>

    main()

  File "/tmp/pip_build_root/xonsh/setup.py", line 68, in main

    setup(**skw)

  File "/usr/lib/python3.3/distutils/core.py", line 148, in setup

    dist.run_commands()

  File "/usr/lib/python3.3/distutils/dist.py", line 929, in run_commands

    self.run_command(cmd)

  File "/usr/lib/python3.3/distutils/dist.py", line 948, in run_command

    cmd_obj.run()

  File "/tmp/pip_build_root/xonsh/setup.py", line 36, in run

    build_tables()

  File "/tmp/pip_build_root/xonsh/setup.py", line 28, in build_tables

    from xonsh.parser import Parser

  File "/tmp/pip_build_root/xonsh/xonsh/parser.py", line 9, in <module>

    from xonsh import ast

  File "/tmp/pip_build_root/xonsh/xonsh/ast.py", line 3, in <module>

    from ast import Module, Num, Expr, Str, Bytes, UnaryOp, UAdd, USub, Invert, \

ImportError: cannot import name NameConstant

Line wrap covers up prompt

I haven't yet figured out exactly when/why this happens, but sometimes the input line wraps around to cover the prompt, rather than wrapping onto a different line. Even when making the terminal much larger, the input seems to want to wrap around the original size of ther terminal or something like that, rather than wrapping at the current size.

xonsh_wraparound

xonsh_wraparound2

Make it work with Python 2.7

Would you accept a pull request to make this work with Python 2.7 (from a single-source code base)? If so, how much work do you think it would be?

implement dirstack

cd - and cd -%d would be awesome.

This allows switching to some previous directory.

Take over bash aliases?

Custom bash aliases (eg. in ~/.bash_aliases) do not work after starting xonsh from bash.

Maybe documenting how to best port them to xonsh-aliases ist enough.

Virtual Terminal Prompt Issues

Running with xonsh as my shell (set via chsh rather than starting from within bash), some virtual terminals seem to have trouble with the PROMPT environment variable being a Python function rather than a string, leading it to display, e.g., the following as its prompt:

<function default_prompt at 0x7f5ffba65400>

Tested with lxterminal, terminator, and gnome-terminal on Ubuntu 14.04 64-bit.

Complaints about missing bash_completion on startup

I've installed xonsh using setup.py from a git clone. When I start xonsh I first see some noise about /etcc/bash_completion:

austinbingham@TK421% xonsh                                                                                                                                                                                                                                                                                                                                               ~ 
bash: line 1: /etc/bash_completion: No such file or directory
bash: line 1: /etc/bash_completion: No such file or directory

This is on OS X Yosemite, python 3.4 installed via homebrew.

xonsh goes crazy when calling itself

icarito@aiki ~ $ xonsh --help
<function default_prompt at 0xb6cefb6c> # wtf?
.......................................
.......................................
.......................................exit
.....................................................................................................................

FileNotFoundError while install xonsh via pip

$ pip install xonsh throw me a error.

  Remove xonsh/lexer_table.py

    Remove xonsh/parser_table.py

    Building lexer and parser tables.

    Traceback (most recent call last):

      File "<string>", line 20, in <module>

      File "/private/var/folders/5h/8ys4czvj0qx270tbhljfpvg40000gn/T/pip-build-tseve78h/xonsh/setup.py", line 95, in <module>

        main()

      File "/private/var/folders/5h/8ys4czvj0qx270tbhljfpvg40000gn/T/pip-build-tseve78h/xonsh/setup.py", line 35, in main

        with open('readme.rst', 'r') as f:

    FileNotFoundError: [Errno 2] No such file or directory: 'readme.rst'

    ----------------------------------------

can't install xonsh on Mac OS X: UnicodeEncodeError

[user@maccie user #2092]$ sudo pip install xonsh                                        
Downloading/unpacking xonsh
  Downloading xonsh-0.1.1.tar.gz (72kB): 72kB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/xonsh/setup.py) egg_info for package xonsh
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/private/tmp/pip_build_root/xonsh/setup.py", line 111, in <module>
        main()
      File "/private/tmp/pip_build_root/xonsh/setup.py", line 46, in main
        print(logo)
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 28-39: ordinal not in range(128)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/private/tmp/pip_build_root/xonsh/setup.py", line 111, in <module>

    main()

  File "/private/tmp/pip_build_root/xonsh/setup.py", line 46, in main

    print(logo)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 28-39: ordinal not in range(128)

[user@maccie user #2094]$ pip --version                                                 
pip 1.5.6 from /usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg (python 2.7)

[user@maccie user #2095]$ python --version                                              
Python 2.7.8

Using Mac OS X Yosemite

Multiline input does not work on OS X/iterm2

Unless I'm missing something obvious, multiline input does not seem to work:
image

I cannot get the command to execute. Hitting enter just creates another line. I have to Ctrl-C to break back to a normal prompt.

This is on OS X with iterm2. The same behavior occurs with Terminal.

xonsh equivalent of "source"?

I'd like to use conda environments with xonsh. These are usually invoked with source activate my-environment, but that doesn't work with xonsh:

[email protected] ~ $ source activate my-env
Traceback (most recent call last):
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/site-packages/xonsh/shell.py", line 142, in cmdloop
    super(Shell, self).cmdloop(intro=intro)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/cmd.py", line 126, in cmdloop
    line = input(self.prompt)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/site-packages/xonsh/shell.py", line 92, in default
    self.execer.exec(code, mode='single', glbs=None, locs=self.ctx)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/site-packages/xonsh/execer.py", line 108, in exec
    return exec(code, glbs, locs)
  File "<xonsh-code>", line 0, in <module>
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/site-packages/xonsh/built_ins.py", line 343, in subproc_uncaptured
    return run_subproc(cmds, captured=False)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/site-packages/xonsh/built_ins.py", line 313, in run_subproc
    stdin=stdin, stdout=stdout)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/Users/shoyer/miniconda/envs/xonsh/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'source'

`ls` doesn't work

I've installed xonsh using setup.py from a git clone. When I start xonsh I first see some noise about /etcc/bash_completion:

austinbingham@TK421% xonsh                                                                                                                                                                                                                                                                                                                                               ~ 
bash: line 1: /etc/bash_completion: No such file or directory
bash: line 1: /etc/bash_completion: No such file or directory

I can live with this. A much bigger problem (and surprise) is that ls doesn't seem to work:

[email protected] ~ $ ls
ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

which ls reports that it's using /bin/ls. This is on OS X Yosemite, python 3.4 installed via homebrew.

Crash on parsing list nested in dict

When parsing a line containing a dict that has a list (or tuple) as a value, xonsh crashes.

bollmann@underberg ~/repositories/xonsh master >>> {'foo': ['a', 'b']}
Traceback (most recent call last):
  File "/usr/local/bin/xonsh", line 12, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/bollmann/repositories/xonsh/scripts/xonsh", line 3, in <module>
    main()
  File "/home/bollmann/repositories/xonsh/xonsh/main.py", line 25, in main
    shell.cmdloop()
  File "/home/bollmann/repositories/xonsh/xonsh/shell.py", line 152, in cmdloop
    super(Shell, self).cmdloop(intro=intro)
  File "/usr/lib/python3.4/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python3.4/cmd.py", line 211, in onecmd
    return self.default(line)
  File "/home/bollmann/repositories/xonsh/xonsh/shell.py", line 105, in default
    code = self.push(line)
  File "/home/bollmann/repositories/xonsh/xonsh/shell.py", line 126, in push
    locs=self.ctx)
  File "/home/bollmann/repositories/xonsh/xonsh/execer.py", line 87, in compile
    code = compile(tree, self.filename, mode)
ValueError: Dict doesn't have the same number of keys as values
bollmann@underberg ~/repositories/xonsh (master) $ 

Other nested structures seem to work fine. Putting the list in a variable first and then constructing the dict also works fine.

bollmann@underberg ~/repositories/xonsh master >>> x = ['a', 'b']
bollmann@underberg ~/repositories/xonsh master >>> {'foo': x}
{'foo': ['a', 'b']}
bollmann@underberg ~/repositories/xonsh master >>> {'a': {'b': 'c', 'd': 'e'}}
{'a': {'b': 'c', 'd': 'e'}}
bollmann@underberg ~/repositories/xonsh master >>> [{'a': 'b', 'c': 'd'}]
[{'a': 'b', 'c': 'd'}]
bollmann@underberg ~/repositories/xonsh master >>> [{'a': 'b'}, {'c': 'd'}]
[{'a': 'b'}, {'c': 'd'}]
bollmann@underberg ~/repositories/xonsh master >>> {'a': {'b': 'c', 'd': 'e'}}
{'a': {'b': 'c', 'd': 'e'}}

.xonshrc parse error when function arguments are on new line

If my .xonshrc looks like this:

def prompt():
    return '{user}'.format(user='me')

$PROMPT = prompt

then it works as expected. (BTW, I'm mostly guessing as to how .xonshrc is supposed to work.)

However, if I put user='me') on a new line like this:

def prompt():
    return '{user}'.format(
        user='me')

$PROMPT = prompt

then I get an error on xonsh startup:

austinbingham@TK421% python3 -m xonsh.main
/Users/austinbingham/projects/xonsh/xonsh/environ.py:118: RuntimeWarning: syntax error in xonsh run control file '/Users/austinbingham/.xonshrc'
  RuntimeWarning)
[email protected] ~/projects/xonsh $

xonsh still starts as you can see, but my prompt is ignored.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.