Commit graph

1873 commits

Author SHA1 Message Date
Anthony Scopatz
692572a1d6 prompt toolkit windows changes 2015-11-15 09:35:57 -05:00
Anthony Scopatz
356a4da17a Merge pull request #498 from nicfit/ignoreeof
Added IGNOREEOF env variable to disable CTRL-D shell exit.
2015-11-15 08:13:51 -05:00
Kurtis Rader
7ccfb171aa Make history module mostly lint clean.
This fixes most of the lint errors in the history code. It also fixes
two bugs that were found by pylint due to misnamed variables. This patch
does not make any functional changes. I'll fix the remaining lint errors
in a subsequent patch when I tackle cross-module issues.
2015-11-14 19:56:26 -08:00
Kurtis Rader
40034d7315 Replace run_tests bash script with xsh script.
This replaces the bash script I originally proposed as a way to safely invoke
unit tests with a xonsh script (we need to eat our own dog food). This also
udpates the documentation.
2015-11-14 19:20:00 -08:00
Anthony Scopatz
538f1ec0c1 Merge pull request #468 from uranusjr/console_scripts
Use console_scripts to generate entry point
2015-11-14 12:49:57 -05:00
Gil Forsyth
b69e4dd251 Merge branch 'master' of https://github.com/scopatz/xonsh into vi_mode_config 2015-11-14 12:34:35 -05:00
Anthony Scopatz
8fc6757131 Merge pull request #494 from gforsyth/pt_deprec_fix
replace `get_input` with `prompt`
2015-11-14 11:11:16 -05:00
Anthony Scopatz
41c398412b Merge pull request #483 from scopatz/prevpost
modifies source-foriegn to accept code
2015-11-14 11:09:39 -05:00
Anthony Scopatz
47a3b753c8 Merge pull request #490 from gforsyth/open_in_editor
add open in editor to prompt_toolkit_shell
2015-11-14 10:43:35 -05:00
Travis Shirk
925c65c995 Added IGNOREEOF env variable to disable CTRL-D shell exit. 2015-11-13 21:50:50 -07:00
Kurtis Rader
333468d719 Ensure lexer/parser table module is current
Ensure lexer/parser table module is current before running any tests.
2015-11-12 17:51:06 -08:00
Gil Forsyth
8adab63723 allow user to enable vi_mode in prompt_toolkit
This adds the envvar `VI_MODE`, (default `False`).  If it is set to `True`,
either in a `.xonshrc` or dynamically, then the prompt is switched to
`vi_mode`.

`vi_mode` defaults to an `--insert--` environment, then user can hit ESC
to enter command mode, etc...
2015-11-12 16:15:32 -05:00
Gil Forsyth
ca8f9eb8e2 replace get_input with prompt
Quick change removing the deprecated `get_input` and replacing it with
`prompt`
2015-11-12 15:52:23 -05:00
Anthony Scopatz
c9ec8199b0 check prevcmd 2015-11-12 08:23:24 -05:00
Kurtis Rader
27132bb999 Add a makefile defining some common tasks.
This makefile makes it easier to run things like unit tests and pylint
against the code. Especially before doing a commit. It also helps ensure
unit tests are not affected by local config files (e.g., ~/.xonshrc).
2015-11-11 18:05:17 -08:00
Gil Forsyth
a0018500c5 add open in editor to prompt_toolkit_shell
h/t @jonathanslenders

When using the prompt_toolkit shell, user can press Ctrl-X Ctrl-E to
open the current line in $EDITOR.

Limitations -- it can only open the _current_ line, so if you are
already in a multiline prompt, you can't edit what is already entered in
lines above.

However, you can enter multiline commands in the editor and these are
correctly interpreted by xonsh (assuming correct syntax, etc)
2015-11-11 13:53:24 -05:00
Anthony Scopatz
dd7d761656 modifies source-foriegn to accept code 2015-11-09 00:50:48 -05:00
Anthony Scopatz
0762ff5433 Merge pull request #482 from migueldvb/index
Mention where the Arch linux package can be found
2015-11-08 23:13:40 -05:00
Miguel de Val-Borro
d6dc6c08ed Mention explicitly where the Arch package can be found 2015-11-08 22:32:28 -05:00
Anthony Scopatz
208d8f73e9 Merge pull request #480 from Dundee/master
installation of jupyter hook to given destination
2015-11-08 16:15:50 -05:00
Anthony Scopatz
eeaec0d649 Merge pull request #481 from emacs18/master
Prevent garbled prompt for shells within emacs
2015-11-08 16:13:57 -05:00
Richard Kim
a604806374 Prevent garbled prompt for shells within emacs 2015-11-08 12:56:15 -08:00
Daniel Milde
c650bc8a2b installation of jupyter hook to given destination 2015-11-08 21:15:08 +01:00
Anthony Scopatz
0af49af6c4 version 0.2.3 bump 2015-11-06 21:40:52 -05:00
Anthony Scopatz
a764975cd1 Merge branch 'krader1961-negative-history-slices' 2015-11-06 21:29:49 -05:00
Anthony Scopatz
06086d7458 Merge branch 'negative-history-slices' of https://github.com/krader1961/xonsh into krader1961-negative-history-slices 2015-11-06 21:28:53 -05:00
Kurtis Rader
4be4509a2e Modify the code to comply with the alias API. 2015-11-06 17:38:08 -08:00
Anthony Scopatz
17f52ff3af Merge branch 'jupyter' 2015-11-06 19:15:32 -05:00
Anthony Scopatz
25cc8fb845 fixed minor conflict 2015-11-06 19:12:33 -05:00
Kurtis Rader
5cc784a721 Correct function names to follow PEP8. 2015-11-06 15:12:33 -08:00
Kurtis Rader
a14a9a6f4d Correct handling of negative history indexes.
Fix the handling of negative history indexes where a slice specification
is involved. Negative indexes not part of a slice specification worked by
accident because the argparse module (see section "16.4.4.3 Arguments
containing --") treats such values as positional arguments (which is a
misfeature of argparse in my opinion). I've also added unit tests for
"history show" to keep this from being broken in the future.
2015-11-05 19:35:41 -08:00
Anthony Scopatz
7a71221c17 Merge branch 'BYK-is_root' 2015-11-05 12:22:23 -05:00
Anthony Scopatz
78cf7e83be Merge branch 'is_root' of https://github.com/BYK/xonsh into BYK-is_root 2015-11-05 12:21:46 -05:00
Burak Yigit Kaya
0564ec6547 Add equivalent of \$ in bash as prompt_end
Adds a new `prompt_end` formatter variable for prompt. The value is `$`
for normal users and `#` for root users.
2015-11-05 20:18:36 +03:00
Anthony Scopatz
6a3345efd1 Merge pull request #472 from scopatz/strexpand
call expand_path() in more places
2015-11-04 22:45:19 -05:00
Anthony Scopatz
a5fe1c154c call expand_path() in more places 2015-11-04 20:29:52 -05:00
Anthony Scopatz
655bfcc33c Merge pull request #470 from gforsyth/fix_pt_completion
set prompt_toolkit completion to trigger on tab
2015-11-04 18:24:28 -05:00
Gil Forsyth
acf478fcbc set prompt_toolkit completion to trigger on tab
prompt_toolkit completion wasn't triggering for command arguments unless
the first letter was entered.  now it shows all the options when the
user hits tab, which matches the readline functionality and also the
default behavior in bash, zsh, fish, etc...
2015-11-04 17:57:38 -05:00
Tzu-ping Chung
f36d04a758 Use console_scripts to generate entry point
This is better than writing platform-dependant scripts to provide
an entry point. The old way is kept as a fallback when setuptools
is not available.

Reference:

http://python-packaging.readthedocs.org/en/latest/command-line-scripts.html#the-console-scripts-entry-point
2015-11-04 17:40:01 +08:00
Anthony Scopatz
c3a84510a1 Merge pull request #444 from scopatz/win-bat
Updated the windows script for command line args
2015-11-04 00:46:05 -05:00
Anthony Scopatz
7e0fc6d42a Merge branch 'gforsyth-master' 2015-11-03 18:33:00 -05:00
Anthony Scopatz
3552d4b04d changed AUTO_CD order to not thrash file system as much 2015-11-03 18:32:44 -05:00
Anthony Scopatz
4c4eb2d705 Merge branch 'master' of https://github.com/gforsyth/xonsh into gforsyth-master 2015-11-03 18:29:27 -05:00
Gil Forsyth
e3323169e3 replace recursive subproc call with alias assignment 2015-11-03 16:41:20 -05:00
Gil Forsyth
e858b009cf add autocd functionality to run_subproc
relocated from base_shell.

Checks the following:
$AUTO_CD=True
cmd is a directory
cmd is not in $PATH
no other arguments

If so, it prepends 'cd' and reruns
2015-11-03 16:03:00 -05:00
Gil Forsyth
6ed178446e add AUTO_CD to envvars docs 2015-11-03 15:23:25 -05:00
Anthony Scopatz
53a20d1925 Merge pull request #461 from mdraw/completions-display
Make prompt_toolkit Python completions configurable
2015-11-03 15:06:47 -05:00
mdraw
7bf7c4686b Merge branch 'completions-display' of https://github.com/mdraw/xonsh into completions-display 2015-11-03 20:59:26 +01:00
mdraw
4e9290fdb7 Minor cleanups for $COMPLETIONS_DISPLAY handling 2015-11-03 20:56:05 +01:00
Anthony Scopatz
8b63dc1bac Merge pull request #465 from selepo/win-docs
Added info to windows.rst
2015-11-03 14:55:39 -05:00