Python-powered, cross-platform, Unix-gazing shell.
OTHER License
Bot releases are visible (Hide)
Published by scopatz over 5 years ago
Added:
sh?
Changed:
XonshSession.link_builtins
to set a DynamicAccessProxy
for each builtin
linkevents
is now unlinked from builtins
Removed:
DeprecationWarningProxy
; no longer neededload_proxies
and unload_proxies
; moved functionality to XonshSession.link_builtins
, XonshSession.unlink_builtins
, respectively.builtin.__xonsh_*__
alises, please use builtins.__xonsh__.*
instead.Fixed:
__dir__
method to DynamicAccessProxy
to restoreevents
)inspect.getsource
now works correctly and the __xonsh__.execer
resets<filename>
correctly. This was causing several very strange buggyEnter
while $VI_MODE=True
now executes the current code blockAuthors:
Published by scopatz over 5 years ago
Fixed:
delare -F
containedread
command that followed it would onlyecho
is used to normalizeAuthors:
Published by scopatz over 5 years ago
Added:
Changed:
Fixed:
Authors:
Published by scopatz over 5 years ago
Fixed:
$MULTILINE_PROMPT
None
or an empty string.$XONSH_STDERR_PREFIX
and $XONSH_STDERR_POSTFIX
xonshrc
file would throw an error.Authors:
Published by scopatz over 5 years ago
Fixed:
get_predictor_threadable
on windows when try to run not exist commandpip
completer no longer fires when pip
happens to appear within a wordbagpipes
history gc
command not running properly.Authors:
Published by scopatz over 5 years ago
Added:
%d
for avoid overwriting in run-tests.xsh
Changed:
Xonsh now does not attempt to expand raw strings, so now::
$ echo "$HOME"
/home/user
$ echo r"$HOME"
$HOME
sudoedit now runs unthreaded
Fixed:
$INTENSIFY_COLORS_ON_WIN
in certain situations.Authors:
Published by scopatz over 5 years ago
Deprecated:
Authors:
Published by scopatz over 5 years ago
Changed:
Fixed:
python_requires
keyword.Authors:
Published by scopatz over 5 years ago
Changed:
setup.py
,python_requires
feature.Fixed:
Authors:
Published by scopatz over 5 years ago
Added:
!$
, $*
, !^
,!<str>
. These are in addition to !!
, which was alreadycolor_tools.KNOWN_XONSH_COLORS
frozenset.pyghooks.PYGMENTS_MODIFIERS
mapping from color modifier names topyghooks.color_name_to_pygments_code()
function for convertingChanged:
Circle now runs black
checks on contents of bundled xontribs
The black
checks no longer skip some files buried deeper in the directory
tree.
Errors while formatting the prompt are highlighted for easier debugging.
Pygments styles only define the standard set of colors, by default.
Additional colors are computed as needed.
PTYs created for running threadable command have now size set to same size
than main terminal.
Update documentation pointing to the minimal required version of
Python (3.5).
Deprecated:
Removed:
pyghooks.KNOWN_COLORS
is no longer needed or useful as pygments colorsstyle_tools.KNOWN_COLORS
was never used, redundant withpyghooks.KNOWN_COLORS
and has thus been removed.Fixed:
black
formatted all xontribscat
empty fileptk2
.pkg_resources
stty
Authors:
Published by scopatz over 5 years ago
Added:
ansi_tools.ansi_color_name_to_escape_code()
function forcolor_tools.RE_XONSH_COLOR
is a regular expression for matchingcolor_tools.iscolor()
is a simple function for testing whether atools.all_permutations()
function yeilds all possible permutationsChanged:
SET_FOREGROUND_3INTS_
renamed to SET_FOREGROUND_FAINT_
,SET_BACKGROUND_3INTS_
renamed to SET_BACKGROUND_FAINT_
,SET_FOREGROUND_SHORT_
renamed to SET_FOREGROUND_SLOWBLINK_
, andSET_BACKGROUND_SHORT_
renamed to SET_BACKGROUND_SLOWBLINK_
.Removed:
ansi_tools.ANSI_REVERSE_COLOR_NAME_TRANSLATIONS
removed, as it isFixed:
$LS_COLORS
could not convert valid ANSI colors.Authors:
Published by scopatz over 5 years ago
Added:
xonsh.color_tools.short_to_ints()
function for directlyxonsh.ansi_colors.ansi_reverse_style()
function forxonsh.ansi_colors.ansi_color_escape_code_to_name()
functionxonsh.events.EventManager.exists()
method enables the checkingon_pre_spec_run_<cmd-name>
on_post_spec_run_<cmd-name>
will be fired before and afterSubpocSpec.run()
is called. This allows for command specificon_pre_spec_run_ls
wouldls
.xonsh.environ.LsColors
class for managing the $LS_COLORS
ls
command respects the$XONSH_COLOR_STYLE
setting. An instance of this class is added to the$LS_COLORS
class is first accessed orls
command is executed.on_pre_spec_run_ls
event is initialized with a default handler$LS_COLORS
is set in the actual environment priorls
command.xonsh.tools.detype()
function that simply calls an objects owndetype()
method in order to detype it.xonsh.tools.always_none()
function that simply returns None.Env.set_ensurer()
method for setting an ensurer on an environment.Changed:
The black and white style bw
now uses actual black and white
ANSI colore codes for its colors, rather than just empty color
sequences.
An environment variable detype
operation no longer needs to be
function, but may also be None
. If None
, this variable is
considered not detypeable, and will not be exported to subprocess
environments via the Env.detype()
function.
An environment variable detype
function no longer needs to return
a string, but may also return None
. If None
is returned, this
variable is considered not detypeable, and will not be exported to
subprocess environments via the Env.detype()
function.
The Env.detype()
method has been updated to respect the new
None
types when detyping.
The xonsh.tools.expandvars()
function has been updated to respect
the new None
types when detyping.
The xonsh.xonfig.make_xonfig_wizard()
function has been updated to respect
the new None
types when detyping.
Event handlers may now be added and discarded during event firing for
normal events. Such modifications will not be applied to until the
current firing operation is concluded. Thus you won't see newly added
events fired.
xonsh now uses its own vended version of ply. Any installed versions will no longer be used. This reflects that ply is no
longer distributed as an installable packages.
Updated to used ply version 3.11.
Reverted change in give_to_terminal
to restore working version of
cmake
, rm -i
, etc. This breaks pv | head
.
Deprecated:
xonsh.color_tools.make_pallete()
function is nopyghooks
.Removed:
$FORMATTER_DICT
have been removed.Fixed:
Resolved issues where macro functions were not able to properly
accept single-line statements in exec
and single
mode.
Minor fixes to xonsh.events.debug_level()
.
Fixed a regression where some interactive commands were not waited for
properly for long enough.
Fixed environments not showing in the prompt when using Anaconda Python.
Fixed regression with anaconda activate/deactivate scripts not wokring on Windows.
Authors:
Published by scopatz over 5 years ago
Added:
xonsh.aliases.partial_eval_alias()
function and related classesChanged:
make
.xonsh.Aliases.eval_alaises()
method updated to usexonsh.aliases.partial_eval_alias()
.Fixed:
xonsh.completers.base.complete_base()
to no longer throw ancomplete_python()
sometimes returning a tuple.ls &&<TAB>
.pv /dev/urandom | head
now works.xonsh.jobs.wait_for_active_job()
.xonsh.completers.commands.complete_skipper()
to insert a space following&&
, ||
, |
, and
, or
) to avoid overwriting existing tokensSecurity:
Authors:
Published by scopatz over 5 years ago
Added:
env_prefix
& env_postfix
prompt fields for rendering the pre- and{env_name}
in $PROMPT
is now suppressed if$VIRTUAL_ENV_DISABLE_PROMPT
environment variable is{env_name}
in $PROMPT
is now overridden bystr($VIRTUAL_ENV_PROMPT)
if that environment variablenot None
. $VIRTUAL_ENV_DISABLE_PROMPT
takes precedence$VIRTUAL_ENV_PROMPT
.direnv <https://direnv.net/>
_Changed:
env_name
prompt field now looks up the pre- and post-fix characters,history show
efficiency improvements.Fixed:
$PATH
searching more robust to broken symlinks on Windows.aliases['hsa'] = "history show all"; hsa | head
to no longer failAuthors:
Published by scopatz almost 6 years ago
Added:
vox new
has an added -p --interpreter
flag for choosing the python interpreter to use for virtualenv creation$VOX_DEFAULT_INTERPRETER
environment variable.Changed:
lib.ChainDB
now resolves results to the type of the inputs if possiblePublished by scopatz almost 6 years ago
Added:
New xonsh syntax pf
strings -- combining path strings with f-strings.
Usage:
.. code-block:: bash
gil@bad_cat ~ $ repos = 'github.com'
gil@bad_cat ~ $ pf"~/{repos}"
PosixPath('/home/gil/github.com')
gil@bad_cat ~ $ pf"{$HOME}"
PosixPath('/home/gil')
gil@bad_cat ~ $ pf"/home/${'US' + 'ER'}"
PosixPath('/home/gil')
Fixed:
ls
to predict_true
in default_threadable_predictors
. This prevents ls
on OSXncurses
.Published by scopatz almost 6 years ago
Added:
Fixed:
Updated behavior of the cat
coreutils function so that it properly
handles as vareity of cases such as:
/dev/random
Callable aliases were not properly raising a CalledProcessError
when they
returned a non-zero exist status when $RAISE_SUBPROC_ERROR = True
. This has
been fixed.
Fixed interpretation of color names with PTK2 and Pygments 2.3.1.
Published by scopatz almost 6 years ago
Added:
Add alias to base16 shell <https://github.com/chriskempson/base16-shell>
_
Installation / Usage
.. code-block:: bash
python3 -m pip install xontrib-base16-shell
~/.xonshrc
.. code:: python
:number-lines:
$BASE16_SHELL = $HOME + "/.config/base16-shell/"
xontrib load base16_shell
.. image:: https://raw.githubusercontent.com/ErickTucto/xontrib-base16-shell/master/docs/terminal.png
:width: 600px
:alt: terminal.png
New DumbShell
class that kicks in whenever $TERM == "dumb"
.
This usually happens in emacs. Currently, this class inherits from
the ReadlineShell
but adds some light customization to make
sure that xonsh looks good in the resultant terminal emulator.
Aliases from foreign shells (e.g. Bash) that are more than single expressions,
or contain sub-shell executions, are now evaluated and run in the foreign shell.
Previously, xonsh would attempt to translate the alias from sh-lang into
xonsh. These restrictions have been removed. For example, the following now
works:
.. code-block:: sh
$ source-bash 'alias eee="echo aaa \$(echo b)"'
$ eee
aaa b
New ForeignShellBaseAlias
, ForeignShellFunctionAlias
, and
ForeignShellExecAlias
classes have been added which manage foreign shell
alias execution.
Changed:
String aliases will now first be checked to see if they contain sub-expressions
that require evaluations, such as @(expr)
, $[cmd]
, etc. If they do,
then an ExecAlias
will be constructed, rather than a simple list-of-strs
substitutiuon alias being used. For example:
.. code-block:: sh
$ aliases['uuu'] = "echo ccc $(echo ddd)"
$ aliases['uuu']
ExecAlias('echo ccc $(echo ddd)\n', filename='<exec-alias:uuu>')
$ uuu
ccc ddd
The parse_aliases()
function now requires the shell name.
ForeignShellFunctionAlias
now inherits from ForeignShellBaseAlias
rather than object
.
Fixed:
Published by scopatz almost 6 years ago
Added:
vox activate
andvox remove
; also updated the documentation accordingly.xonsh.aliases.ExecAlias
class enables multi-statement aliases.xonsh.ast.isexpression()
function will return a boolean of whetherrun-tests.xsh
script for safely running the test suite.Changed:
String aliases are no longer split with shlex.split()
, but instead use
xonsh.lexer.Lexer.split()
.
Update xonsh/prompt/cwd.py _collapsed_pwd to print 2 chars if a directory begins with "."
test which determines whether a directory is a virtualenv
previously it used to check the existence of 'pyvenv.cfg'
now it checks if 'bin/python' is executable
Fixed:
Fixed issue with and
& or
being incoreectly tokenized in implicit
subprocesses. Auto-wrapping of certain subprocesses will now correctly work.
For example::
$ echo x-and-y
x-and-y
Fix EOFError when press control+d
fix no candidates if no permission files in PATH
Fixed interpretation of color names with PTK2 and Pygments 2.3.
Several ResourceWarnings: unclosed file in tests
AttributeError crash when using --timings flag
issue #2929
Published by scopatz almost 6 years ago
Added:
Changed:
$XONSH_TRACEBACK_LOGFILE
now beside strings also accepts os.PathLike
ply
to 3.11Fixed:
Annotation assignment statements (e.g. x : int = 42
) are now supported.
Fixed error output wording for fg and bg commands
Flake8 errors
xonsh can now properly parse import statements with trailing comma within
parentheses, e.g.::
from x import (y, z,)
ResourceWarning: unclosed scandir iterator in imphooks.py
Removed use of deprecated inspect.formatargspec()
for inspect.signature()
Makefile
directive that updates vended version of ply