Python-powered, cross-platform, Unix-gazing shell.
OTHER License
Bot releases are hidden (Show)
Published by scopatz over 6 years ago
Changed:
Fixed:
xonsh.tools.columnize()
bug the prevented single-rowPublished by scopatz over 6 years ago
Added:
@(<expr>)
as a way to run commands and a gotcha aboutChanged:
$XONSH_SHOW_TRACEBACK = False
) and the error is a XonshError
CommandPipeline.proc
may now be None
, to accomodate when the processFixed:
curl
command will now be run in a thread, which prevents documents thatPATHEXT
environment variable did not exist.free_cwd <http://xon.sh/xontribs.html#free-cwd>
__ Windows Xontrib, which caused the prompt to error if the current directory is$XONSH_SHOW_TRACEBACK
not being respected in subprocessPublished by scopatz over 6 years ago
Added:
FileInserter
node that allows blocks to bexonsh.wizard.StateVisitor.flatten()
method for flattening theChanged:
~/.local/config/xonsh/no-wizard
is not present.xonfig wizard
command will now run write out to the xonshrc file.Save
and Load
had their names changed to SaveJSON
LoadJSON
.Removed:
config.json
), long live run control (xonshrc
)!$LOADED_CONFIG
and $XONSHCONFIG
.Fixed:
#
are auto-escaped by TAB completionPublished by scopatz over 6 years ago
Added:
xonsh.main.setup()
function for starting up xonsh in 3rd partyChanged:
~/.config/xonsh/rc.xsh
at startup.Fixed:
$LINES
and $COLUMNS
if set, preventing some programs from drawing weirdlyfree_cwd
contrib can only be active on pure Windows.iglobpath()
more robust when Python globbing$XONSH_APPEND_NEWLINE
will now default to True when in interactive mode.SyntaxError
when no kwargs are definedTypeError: 'NoneType' object is not iterable
.git c
would complete to git 'checkout '
because git adds an extra spacePublished by scopatz almost 7 years ago
Added:
Added an alias command, matching bash's implementation, available as part of bashisms.
New $AUTO_SUGGEST_IN_COMPLETIONS
environment variable that enables/disables
whether the auto-suggestion result appears in the tab completions.
Added __add__()
and __radd__()
methods to EnvPath
.
Xonsh now supports f-strings, as in Python v3.6+.
Added ipython
as unthreadable in command cache threadabilty predictors.
Added whole_word_jumping
xontrib
Added $XONSH_APPEND_NEWLINE
environment variable
Support for PEP 515: Underscores in Numeric Literals
xonsh.color_tools.make_palette()
Simple rename of the pre-existing
xonsh.color_tools.make_pallete()
function.
xonsh.tools.decorator()
function/method decorator.
This allows for an API function to be annotated with a
decorator that documents deprecation, while also tying in
functionality that will warn a user that the function has
been deprecated, and, raise an AssertionError
if the
function has passed its expiry date.
New xontrib schedule
(Xonsh Task Scheduler)
Changed:
on_pre_prompt
is now fired before prompt calculations are made, allowing modifications to the prompt.emacsclient
will now return false in the threadable predictors.pkg_resources
package back to its originalxsh
script, the xonshrc
is not loadedlibgpm
is use, assuming when gpm
is used the program is not threadable. This change solves issues with programs as links
.source
command if it is used with a languageDeprecated:
xonsh.color_tools.make_pallette()
Deprecated in release 0.5.10 and will be removed in release 0.6.0.
Fixed:
Now f-strings can be used inside @() without explicit enclosing command in ![]
Fix for x, y, *z = ...
unpacking.
Git branch detection now correctly passes the environment down to the subprocess
call. This allows for branch detection when git is installed into a non-standard
location.
Escape regex characters in path_complete
to avoid regex parsing errors for
certain combinations of characters in path completer
gistatus: Fixed hash not being shown when in detaced HEAD and there are no tags
Fix branch colorization when git
or hg
are aliases.
Fixed leftover .git/index.lock
in gitstatus
Made JSON history loading more robust to corrupt files.
Starting a new command with an open parentheses will no longer
throw a traceback when $UPDATE_COMPLETIONS_ON_KEYPRESS
is
True
.
Automatically wrapping subprocess calls would sometimes include
semincolons and other line-ending tokens, rather than stopping at them.
This has been fixed.
Numerous spelling errors in documentation, docstrings/comments, text
strings and local variable names.
Spelling error in the xonsh.color_tools.make_pallete()
public
function declaration. This was fixed by renaming the function to
xonsh.color_tools.make_palette()
while maintaining a binding
of make_pallete()
to the new make_palette()
in case users
are already used to this API.
Fixed issue with starting triple quote strings being run as a command.
Fixed a problem with escaping charet (^) character for cmd.exe in the source-cmd function.
EOF in multi-line statement
errors were misreported as being on line 0.
Now they are correctly reported as being on the last line of the file.
Published by AstraLuma over 7 years ago
Fixed:
release.xsh
to prevent it from dirtying the repo on release and.dev
suffix on the version numberPublished by AstraLuma over 7 years ago
Added:
release.xsh
creates a github release with the merged news entries as theFixed:
xonfig
now displays the proper value for "on linux"Published by scopatz over 7 years ago
Added:
Alt .
keybinding to bashisms-xontrib
to insert last argument ofFixed:
Fix crash when openSSH version of bash is on PATH on Windows.
Added missing ensurers to make sure that bool
env_vars are bools and
int
env_vars are integers:
DIRSTACK_SIZE
EXPAND_ENV_VARS
PUSHD_MINUS
PUSHD_SILENT
SUGGEST_COMMANDS
SUGGEST_MAX_NUM
SUGGEST_THRESHOLD
Published by gforsyth over 7 years ago
Added:
on_transform_command
event for pre-processing that macros can't handle.expand_user=True
to tools.expand_path
.$COMPLETION_QUERY_LIMIT
environment variable for setting theChanged:
Block
and Functor
context managers from xonsh.contexts
have beenwith!
statement, e.g. with! Block(): pass
.distributed
xontrib now needs to use the with!
statement, since itFunctor
.telnet
has been flagged as unthreadable.$DYNAMIC_CWD_ELISION_CHAR
is non empty and the last dir of cwd is toopygments
is no longer a strict dependency of the prompt_toolkit
pygments
is not installed, the PTK backend will use thepygments
is installed.on_precommand
to its original signature.built_ins.expand_path
to tools.expand_path
.tools.expandpath
to tools._expandpath
.gvim
command to unthreadable predictors.source
alias now passes $ARGS
down to file it is sourcing.Removed:
XonshBlockError
has been removed, since it no longer serves a purpose.Fixed:
PopenThread
will now re-issue SIGINT to the main thread when it isopenpty()
returning non-unix line endings in its buffer.fg
processes on posix platforms.is_writable_file
to fix$XONSH_TRACEBACK_LOGFILE=~/xonsh.log
.source
alias, providing betterPublished by gforsyth over 7 years ago
Added:
xip
("kip") so that xonsh's Python environment (whatever that is) can be modified.xonsh.completers.bash_completion
module--timings
flag to use the feature.xonsh.xoreutils
. This can report the systemXONSH_HISTORY_BACKEND
now also supports aon_envvar_new
event that fires after a new envvar is created.on_envvar_change
event that fires after an envvar is changed.Changed:
bash_completion
from xonsh project and added shim back toFixed:
git
or (presumably) hg
are aliased, then branch$PROMPT
gpg-connect-agent
) not being able to be run from within xonshrc.Published by gforsyth over 7 years ago
Added:
--rc
command line option allows users to specify paths to run control$UPDATE_COMPLETIONS_ON_KEYPRESS
controls whether or not completionsChanged:
__file__
and __name__
when run as scripts$XONSHRC
and related configuration variables now accept JSON-basedxonsh.shell.Shell()
class now requires that an Execer instanceunthreadable
, uncapturable
fromxonsh.proc
to xonsh.tools
.Deprecated:
--config-path
command line option is now deprecated in favor of--rc
.Removed:
xonsh.environ.DEFAULT_XONSHRC
has been removed due to deprecation.xonsh.environ.default_xonshrc(env)
.Fixed:
^C
and the processes that are piped into the alais have their file handles$(cmd)
operator.ProcProxy
class (unthreadable aliases) was not being executed and wouldtcsetattr: Interrupted system call
issue when run xonsh scripts.ValueError
being thrown from inspect.signature()
ls | less
crashes on Mac.Published by gforsyth over 7 years ago
Added:
New core utility function aliases (written in pure Python) are now
available in xonsh.xoreutils
. These include: cat
, echo
,
pwd
, tee
, tty
, and yes
. These are not enabled by default.
Use the new coreutils
xontrib to load them.
CircleCI test post codecov run
The trace
will automatically disable color printing when
stdout is not a TTY or stdout is captured.
New jedi
xontrib enables jedi-based tab completions when it is loaded.
This supercedes xonsh's default Python-mode completer.
The lexer has a new split()
method which splits strings
according to xonsh's rules for whitespace and quotes.
New events for hooking into the Python import process are now available.
You can now provide a handler for:
on_import_pre_find_spec
on_import_post_find_spec
on_import_pre_create_module
on_import_post_create_module
on_import_pre_exec_module
on_import_post_exec_module
Changed:
cd
.Fixed:
time.clock()
by calls totime.perf_counter()
.clock()
to set the start time of _timings
in non-windows instead0.0
.trace
utility will now correctly color output and not@$(cmd)
operator now correctly splits strings according tostr.split()
.mpl
xontrib has been updated to improve matplotlibxontrib load mpl
is run before matplotlibpyplot.show()
is patched in interactive mode to be non-blocking.timeit ls
causing OSError - "Inappropriate ioctlPublished by gforsyth over 7 years ago
Added:
color_tools
module provides basic color tools for convertingecho hello world >/dev/null
.-P
flag to the cd
function in order to change directory andxonfig tutorial
command to launch the http://xon.sh/tutorial in the@(...)
syntax now supports generators and tuples without parentheses.--show
option, which--dryrun
(cmd)
, to runponysay
as a command which will ususally not run in ajsonutils
module available for serializing specialChanged:
and
and or
must be surrounded byxontrib
command is now flagged as unthreadable and will beSystemExit
and, insteadexpanduser()
-like function which prevents~
that are not followed by a pathShell.stype
has been renamed to Shell.shell_type
.functools.partial()
.prompt.vc.get_hg_branch
now uses os.scandir
to walk up the filetree.hg
directory. This results in (generally) faster branchhg root
.Fixed:
os.environ
is case insensitive. This would potentiallynt.envrion
, the case sensitive counterpart, to avoid$PWD
is managed in order to work with symlinks gracefullyhistory replay
no longer barfs on style_name
when setting up theShell.shell_type
is now properly set to the same value as $SHELL_TYPE
.source-zsh
to work with zsh v5.2.del (x, y)
would raise a syntax error.*.xsh
files will now respect the encoding listed inPublished by gforsyth over 7 years ago
Changed:
xonsh.platform.os_environ
wrapper is now case-insesitive and_TeeStd
class will no longer attempt to write to aFixed:
\\
) is subproc mode will no longer consume theconfig.json
which
reported that thePATH
envrionment variable could not be found.Ctrl-C
crashes xonsh after running an invalid command.ProcessLookupError
issue, see #2288.Published by AstraLuma about 8 years ago
Added:
COMPLETIONS_CONFIRM
. When set, <Enter>
is used to confirm completion instead of running command while completion menu is displayed.f!(arg)
syntax.echo! x y z
syntax.History
methods __iter__
and __getitem__
tools.get_portions
that yields parts of an iterabletest_*.xsh
files and run test_*()
functions.__repr__
and __str__
magic method on LazyObjectChanged:
create_module
implementation on XonshImportHookbash
tab completer are now properly escaped (quoted) when necessary.prompt_toolkit
completions now only show the rightmost portion of a given completion in the dropdown'none'
is no longer allowed for $SHELL_TYPE
just during the initial load from the environment. -D
, later times, and other sources still work.yacc_debug=True
now load the parser on the same thread that the Parser instance is created. setup.py
now uses this synchronous form as it was causing the parser table to be missed by some package managers.dirstack.pushd
and dirstack.popd
now handle UNC paths (of form \\<server>\<share>\...
), but only on Windows. They emulate behavior of CMD.EXE by creating a temporary mapped drive letter (starting from z: down) to replace the \\<server>\<share>
portion of the path, on the pushd
and unmapping the drive letter when all references to it are popped.dirstack
suppresses this temporary drive mapping funky jive if registry entry HKCU\software\microsoft\command processor\DisableUNCCheck
(or HKLM...) is a DWORD value 1. This allows Xonsh to show the actual UNC path in your prompt string and also allows subprocess commands invoking CMD.EXE to run in the expected working directory. See https://support.microsoft.com/en-us/kb/156276 to satisfy any lingering curiosity.lazy_locate_binary
handles binary on different drive letter than current working directory (on Windows)._curr_session_parser
now iterates over History
$COMPLETIONS_BRACKETS
is now available to determine whether or not to include opening brackets in Python completionsxonsh.bat
tries to use pylauncher when available.Removed:
History
method show
_hist_get_portion
in favor of tools.get_portions
Fixed:
$PWD
failed to track change in actual working directory if the invoked Python function happened to change it (e.g via os.chdir()`. Fix is to update $PWD` after each command in
BaseShell.default()``.cd \\<server>\<share>
now works when $AUTO_PUSHD is set, either creating a temporary mapped drive or simply setting UNC working directory based on registry DisableUNCCheck
. However, if $AUTO_PUSHD is not set and UNC checking is enabled (default for Windows), it issues an error message and fails. This improves on prior behavior, which would fail to change the current working directory, but would set $PWD and prompt string to the UNC path, creating false expectations.sys.stdin
, sys.stdout
, sys.stderr
no longer complete with opening square bracketsdel 7
).Added:
which -a
now searches in __xonsh_ctx__
tooptk
, proctitle
, linux
, mac
, and win
.help
method to format and print the vardocs for an envvaron_precommand
and on_postcommand
events
FORMATTER_DICT
entry gitstatus
to provides informative git status$XONSH_AUTOPAIR
environment variablewith!
Changed:
release.xsh
which
from xonsh.aliases
into xoreutils.which
xonsh.prompt.gitstatus.gitstatus
now returns a namedtuplexonsh.prompt.vc_branch.get_git_branch
andxonsh.prompt.vc_branch.git_dirty_working_directory
to use 'git status --procelain'xonsh.environ
xonsh.prompt.base
xonsh.prompt
subpackageSetConsoleTitleW()
on Windows instead of a process call.str
, rather than eval
,Removed:
Fixed:
==
.a=matpl<TAB>
a=matplotlib
xonsh.prompt.vc_branch.git_dirty_working_directory
porcelain
option instead of using the bytestringnothing to commit
to find out if a git directory is dirtysource
alias, so that it mayXDG_DATA_HOME
and XONSH_DATA_DIR
~
into the home directory&&
, ||
and so on.