Commit graph

1881 commits

Author SHA1 Message Date
Anthony Scopatz
87e5cf25f4 check correct env (denv may not persist some Python objects) 2016-01-10 16:15:23 -05:00
Anthony Scopatz
c18b10fabe Merge branch 'adqm-completer_quote_fix' 2016-01-10 15:12:32 -05:00
adam j hartz
0805527c40 fix for quotes in filenames when completing 2016-01-09 19:48:39 -05:00
Anthony Scopatz
93fa19d1ba minor docs 2016-01-07 15:49:35 -08:00
Anthony Scopatz
bd964ce552 Merge pull request #609 from gforsyth/multiline_fix
help `compile` not lose its mind
2016-01-07 15:38:57 -08:00
Gil Forsyth
e773a5e98e help compile not lose its mind 2016-01-07 18:15:47 -05:00
Anthony Scopatz
229b8cfb24 Merge pull request #608 from gforsyth/buf_reset
fix buffer reset in ptk history
2016-01-07 13:55:28 -08:00
Gil Forsyth
090558203e fix buffer reset in ptk history
If this is only `buf.reset()`, it's possible to begin entering text in a
new terminal window which is then cleared shortly after startup
(depending, I imagine, on how much history is being loaded and how long
that takes).  Passing in the current document as `initial_document`
fixes this and history is still accessible as before.
2016-01-07 16:18:08 -05:00
Anthony Scopatz
e02700fb56 Merge branch 'multiline' 2016-01-06 16:30:08 -08:00
Gil Forsyth
00c1fa43a3 update changelog with ptk multiline note 2016-01-06 19:04:13 -05:00
Gil Forsyth
7efa5948cd remove unused regexes 2016-01-06 19:02:40 -05:00
Gil Forsyth
1f2bdefc69 Merge pull request #1 from scopatz/multiline
multiline can-compile in ptk
2016-01-06 18:22:34 -05:00
Anthony Scopatz
09c3db6ff7 multiline can-compile in ptk 2016-01-06 15:16:00 -08:00
Gil Forsyth
fa369deccd Merge branch 'master' of https://github.com/scopatz/xonsh into multiline 2016-01-06 12:05:00 -05:00
Gil Forsyth
fca174ba97 fix indexing on multiline completion 2016-01-06 12:04:38 -05:00
Gil Forsyth
40c5dbed06 fix another bug in preliminary parser
There may be a way to simplify this, but for now it seems that two
checks need to occur to get the desired behavior:
1. The current line is empty (`len(line) == 0`)
or
2. The current line is only whitespace
2016-01-06 11:58:24 -05:00
Gil Forsyth
719439580b add multiline support to ptk history 2016-01-06 11:53:29 -05:00
Gil Forsyth
3b72a03a72 clean up formatting 2016-01-05 19:02:04 -05:00
Gil Forsyth
dde63dde22 fix dedent behavior 2016-01-05 18:58:14 -05:00
Gil Forsyth
251d8b1610 add dedent token support and fix exit conditions
`current_line.isspace()` is not the same as `len(current_line)==0`
2016-01-05 18:05:03 -05:00
Gil Forsyth
08137bfb88 Make quoted parens safe in multiline
This is... not the prettiest solution in the world.  I've been banging
my head against it and I can't figure out a way to gracefully exit the
keystroke event when using a `try: except:` snippet to test against `execer.compile`
2016-01-05 17:52:32 -05:00
Anthony Scopatz
2a84a2d20f added changelog 2016-01-05 11:32:38 -08:00
Anthony Scopatz
a4cfe706b6 refactor 2016-01-05 11:31:12 -08:00
Gil Forsyth
efc44cb2ad quick fix for colon indentation -- other issues remain 2016-01-05 13:45:13 -05:00
Anthony Scopatz
67db744acb made obtaining buffer in history thread safe. 2016-01-05 09:56:25 -08:00
Anthony Scopatz
ccf7500d8b Merge branch 'gforsyth-master' 2016-01-05 09:22:49 -08:00
Gil Forsyth
e7d85a8234 fix module import to return list instead of generator 2016-01-05 11:54:14 -05:00
Gil Forsyth
8b4c622051 cleanup unused imports and pep8 stuff 2016-01-05 11:09:55 -05:00
Gil Forsyth
9b8c6717ac update ptk completer to work in multiline env 2016-01-05 10:59:39 -05:00
Gil Forsyth
1b0fd03574 update and cleanup multiline preliminary parser
Preliminary parser to determine if 'Enter' key should send command to the
xonsh parser for execution or should insert a newline for continued
input.

Current 'triggers' for inserting a newline are:
- Not on first line of buffer and line is non-empty
- Previous character is a colon (covers if, for, etc...)
- User is in an open paren-block
- Line ends with backslash
- Any text exists below cursor position (relevant when editing previous
multiline blocks)
2016-01-04 15:34:24 -05:00
Gil Forsyth
85eb40fa2f remove cruft 2016-01-04 12:32:27 -05:00
Gil Forsyth
316c090cd7 bind 'Enter' to multiline 'Enter' routine 2016-01-04 12:28:56 -05:00
Gil Forsyth
c5802c769f add open paren-block check to multiline environment 2016-01-04 12:25:14 -05:00
Gil Forsyth
d9207ee0ac Merge branch 'master' of https://github.com/scopatz/xonsh into multiline 2016-01-04 12:00:56 -05:00
Gil Forsyth
0bbcc3f9eb Merge branch 'multiline' of github.com:gforsyth/xonsh into multiline 2016-01-04 11:58:51 -05:00
Gil Forsyth
41b144e37d rename carriage return event
better names make everything better
2016-01-04 08:36:31 -05:00
Anthony Scopatz
5caa9b7a76 Merge branch 'adqm-completer_dollar' 2016-01-02 12:17:16 -08:00
adam j hartz
b5c5de5925 better fix for dollar signs 2016-01-02 14:52:24 -05:00
adam j hartz
5bc784290b Merge branch 'ptk-hist' of https://github.com/scopatz/xonsh into scopatz-ptk-updates 2016-01-01 20:25:09 -05:00
adam j hartz
61e1ed3178 Merge branch 'ptk-prompt' of https://github.com/scopatz/xonsh into scopatz-ptk-updates 2016-01-01 20:25:05 -05:00
Anthony Scopatz
f1827e1d33 more docs 2016-01-01 12:00:55 -08:00
Anthony Scopatz
0d918ee9af Merge branch 'adqm-completer' 2016-01-01 11:33:36 -08:00
adam j hartz
fc7ae4a978 add space to 'from <tab>' completions 2016-01-01 10:01:03 -05:00
adam j hartz
a5bcf1a25c only quote those names that need quoting 2016-01-01 09:56:52 -05:00
adam j hartz
876cfd28be change characters that require quoting 2016-01-01 09:54:24 -05:00
adam j hartz
91aeb2fb9e don't resort result of inspect.getmembers 2016-01-01 09:49:51 -05:00
adam j hartz
13f599ba0c several fixes for python mode completions 2016-01-01 09:48:49 -05:00
adam j hartz
58a65ee08e pep8 fixes 2016-01-01 09:45:28 -05:00
adam j hartz
1ac51ef8f4 user import_module instead of __import__, and try/except 2016-01-01 09:15:26 -05:00
Anthony Scopatz
4ca6f1c0be Merge branch 'ptk-prompt' into ptk-hist 2015-12-31 21:57:00 -08:00