Commit graph

6083 commits

Author SHA1 Message Date
Hugo Wang
335fc71bc7 xonsh script.xsh should not fail over 2017-01-11 21:59:42 +08:00
Anthony Scopatz
c3ece749c5 Merge pull request #2062 from jb-leger/background_preditor_from_bin
Background predictor generator from binary analysis
2017-01-08 20:54:57 -05:00
Morten Enemark Lund
cfe0ceb94e Merge pull request #2070 from xonsh/bashwards
replace 'bashwards' from xonsh description
2017-01-08 13:59:00 +01:00
laerus
1b2107fb43 replace 'bashwards' from xonsh description 2017-01-08 11:07:43 +02:00
Anthony Scopatz
82cac3fff0 Merge pull request #2068 from xonsh/hist-tss-fix
History fix - use tss instead of buffer
2017-01-07 01:36:31 -08:00
Hugo Wang
a5b5ed9045 added a news item 2017-01-07 17:28:27 +08:00
Anthony Scopatz
9066d80f61 Merge pull request #2069 from jb-leger/elision_char_at_the_end_of_last
Add elision char at the end of cwd when the last dir is shortened
2017-01-07 01:13:24 -08:00
Anthony Scopatz
034d391532 Merge pull request #2059 from das-g/fix_anon_alias_fu_stdin_in_tutorial
Tutorial: fix stdin handling in anonymous aliases
2017-01-07 01:10:48 -08:00
Jean-Benoist Leger
62365577da Add elision char at the end of cwd when the last dir is shortened 2017-01-06 21:05:50 +01:00
Hugo Wang
a9e6ef6573 use tss instead of buffer 2017-01-06 22:37:10 +08:00
Jean-Benoist Leger
20d1a9647e Autodetect predictor for relative path outside PATH 2017-01-06 15:12:08 +01:00
Jean-Benoist Leger
6a1520d5e4 raise Exception, and check a filename is a regular file 2017-01-06 14:49:38 +01:00
Anthony Scopatz
9949e2c3b7 Merge pull request #2066 from tgoodlet/master
Add colored man page how to
2017-01-05 16:16:26 -08:00
Tyler Goodlet
39e4e7bf7a Add colored man page how to
Resolves #2055
2017-01-05 18:23:36 -05:00
Jean-Benoist Leger
cdfed3b349 new item, background predictor generator 2017-01-05 18:57:22 +01:00
Jean-Benoist Leger
0e5150bfac fix bug in predictor generator
When e.g. a directory is given, os.read raise a exception.
2017-01-05 18:53:33 +01:00
Jean-Benoist Leger
3e993c9de7 background predictor generator, tests 2017-01-05 18:52:33 +01:00
Jean-Benoist Leger
623749d67b details about the predictor generator
Following the review in PR #2062
 - calling lazy_locate_binary() instead of locate_binary()
 - no reason. I use now time.time()
 - Yes we don't have to check again a key already found.
2017-01-05 14:12:59 +01:00
Jean-Benoist Leger
900f7ed12c Merge branch 'master' into background_preditor_from_bin 2017-01-05 14:00:57 +01:00
Raphael Das Gupta
0e4cb0bbd9 un-generalize anonymous alias lambda 2017-01-05 10:58:26 +01:00
Anthony Scopatz
dfb05ca5aa version bump to 0.5.2 2017-01-05 01:18:35 -08:00
Anthony Scopatz
f1f19f791c Merge pull request #2047 from jonathanhogg/master
Ensure input to `commonprefix` is a list (now required by Python 3.6)
2017-01-04 17:47:31 -08:00
Anthony Scopatz
41488ae002 Merge pull request #2048 from jb-leger/ret_code_none
ret_code should return None not '' when rc==0
2017-01-04 17:44:18 -08:00
Jean-Benoist Leger
77d1ae09a3 Merge branch 'master' into background_preditor_from_bin 2017-01-05 02:30:35 +01:00
Jean-Benoist Leger
139d4f7afc Build a background predictor from analyzing the binary file.
This commit introduce a predictor generator from analyzing the binary of the
executable.
It works for emacs, weechat, vim, nano, mutt for example.
The main idea is to detect the use of ncurses or manual tty handling with
isatty, tcgetattr, and tcgetattr.
It should works on POSIX, fully tested on Linux, predictor generator function is
also tested on MacOS.
2017-01-05 02:30:18 +01:00
Anthony Scopatz
7d30c6a871 Merge pull request #2057 from xonsh/cache_weechat
add weechat to default predictors (ncurses based)
2017-01-04 17:00:17 -08:00
Anthony Scopatz
bd36793498 Merge pull request #2051 from jb-leger/dynamic_cwd_elision_char
Dynamic cwd elision char
2017-01-04 13:05:00 -08:00
Gil Forsyth
a83dc162b5 Merge pull request #2035 from xonsh/sig
fixed segfault regression
2017-01-04 13:54:28 -05:00
Raphael Das Gupta
0d1041d532 Tutorial: fix stdin handling in anonymous aliases
In Xonsh 0.5.1, an alias function's `stdin` argument receives a `_io.TextIOWrapper` object, which cannot be stripped or be treated as a string as-is. We have to `.read()` it first and then `.strip()` the resulting string instead.

Also, fix the second lambda to output the space and EOL correctly.
2017-01-04 14:17:05 +01:00
Gil Forsyth
f281fbd1fa add weechat to default predictors (ncurses based) 2017-01-04 06:31:15 -05:00
Jean-Benoist Leger
4c571d8436 news item, VarDocs, and tutorial for $DYNAMIC_CWD_ELISION_CHAR 2017-01-03 21:23:41 +01:00
Jean-Benoist Leger
1cab0702bb add news item for ret_code_none 2017-01-03 20:28:47 +01:00
Konstantinos Tsakiltzidis
8f3c8b0d45 Merge pull request #2053 from das-g/patch-2
Tutorial: Rephrase Bash/Xonsh comparison warning concerning backticks
2017-01-03 20:57:11 +02:00
Gil Forsyth
9a6918ceee Merge pull request #2054 from das-g/patch-3
Tutorial: replace regexpath by regexsearch
2017-01-03 13:42:41 -05:00
Konstantinos Tsakiltzidis
b32c359de3 Merge pull request #2050 from das-g/patch-1
escape backslash in Tutorial warning
2017-01-03 20:11:51 +02:00
Raphael Das Gupta
fb2c2a7c20 Tutorial: replace regexpath by regexsearch
`__xonsh_regexpath__` doesn't seem to exist in Xonsh 0.5.1, but `__xonsh_regexsearch__` has the mentioned implementation according to `??`

Also replaced `??` output with the actual (and user-agnostic) one from a Xonsh installed system-wide with `sudo pip install ...`
2017-01-03 17:58:28 +01:00
Raphael Das Gupta
7f31ca00bc be more explicit about Xonsh code snippet
in the tutorial's Bash/Xonsh comparison concerning backticks
2017-01-03 17:23:51 +01:00
Raphael Das Gupta
69ea35d2cd reflow tutorial source text 2017-01-03 17:20:38 +01:00
Raphael Das Gupta
3a3275d9a0 rephrase backtick xonsh/bash warning in tutorial
... again

(for more clarity)
2017-01-03 17:16:07 +01:00
Raphael Das Gupta
8e5051828f rephrase backticks xonsh/bash warning in tutorial 2017-01-03 17:13:55 +01:00
Raphael Das Gupta
a257f30c14 add missing verb in tutorial
to fix grammar
2017-01-03 17:06:18 +01:00
Jean-Benoist Leger
115254500a Use DYNAMIC_CWD_ELISION_CHAR as truncature_char if defined
The truncature is brand by '...' in the begining of the trucated cwd.

When DYNAMIC_CWD_ELISION_CHAR is non empty, DYNAMIC_CWD_ELISION_CHAR is used in
place of '...'. DYNAMIC_CWD_ELISION_CHAR is empty string by default, therefore
default behavior is not changed.
2017-01-03 16:43:39 +01:00
Jean-Benoist Leger
7c24a59fe1 Add a ellision caracter (empty by default) when the cwd is shortened by dynamic_cwd
By default the path as '/aaaaa/bbbbb/ccccc/ddddd' is shortened to obtain e.g.:
'/aaa/bbb/ccc/ddddd' which can be confusion.

This commit add a DYNAMIC_CWD_ELISION_CHAR env variable which default value
empty string, keeping the same behavior described before.

Setting DYNAMIC_CWD_ELISION_CHAR to '…', for the same path, we obtain
'/aa…/bb…/cc…/ddddd'.
2017-01-03 16:21:49 +01:00
Raphael Das Gupta
8b00202231 escape backslash in Tutorial warning
There is no notion of an escaping character in xonsh, but there is in reStructuredText
2017-01-03 12:56:44 +01:00
Jean-Benoist Leger
b6d339a825 ret_code should return None not '' when rc==0
When the return code is 0, nothing is displayed in the prompt. Empty string was
returned. Returning None have the same behavior, but allows user to use the
syntax "{retcode:{} }" in the prompt for different spacing.
2017-01-02 01:27:34 +01:00
Anthony Scopatz
682c115fea Merge branch 'master' into sig 2017-01-01 10:59:32 -08:00
Anthony Scopatz
ba3fa2a60f fixed os.WCOREDUMP() not on windows 2017-01-01 10:59:25 -08:00
Jonathan Hogg
6f556079de Ensure input to commonprefix is a list (now required by Python 3.6) 2017-01-01 13:28:37 +00:00
Anthony Scopatz
c4d2cc161e Merge pull request #2046 from xonsh/doctr_fixes
try latest version of doctr master
2016-12-31 12:13:05 -08:00
Gil Forsyth
4bed3b768a try latest version of doctr master
hoping this fixes the test failures on master re: doc deployment
2016-12-31 14:34:01 -05:00