Skip to main content

Bash-like interactive mode extensions for the xonsh shell.

Project description

Bash-like interactive mode extensions for the xonsh shell.

If you like the idea click ⭐ on the repo and tweet.

Note

We're not recommend to use this xontrib (see issues section). Use it carefully only if you have very strong muscle memory after hundred of years using Bash or for the education reasons and demonstration how agile is xonsh shell.

Installation

To install use pip:

xpip install xontrib-bashisms
# or: xpip install -U git+https://github.com/xonsh/xontrib-bashisms

Usage

xontrib load bashisms

Enables additional limited Bash-like syntax and commands while at the interactive command prompt:

Added Meaning
!! Get the last command.
!^ Get the first argument from the preceding command.
!$ Get the last argument from the preceding command.
!* Get all argument from the preceding command.
alias Add alias.
export NAME=Peter Setting an environment variable.
shopt -s dotglob Globbing files with * or ** will also match dotfiles, or those "hidden" files.
complete Show list of completers.
set <-e/+e> Cause a failure after a non-zero return code.
set <-x/+x> Turns on tracing of source code lines during execution.
unset NAME Unsetting/deleting an environment variable.

See also Bash to Xonsh Translation Guide.

Known issues

The xontrib-bashisms appeared in the beginning of xonsh history as part of the default xontribs. It has issues and we recommend to use xontrib-sh instead.

Threading issues

Because of xontrib-bashisms sets THREAD_SUBPROCS=False there are issues around the threading could appear. If you're using bashisms and faced with issues try the same in xonsh --no-rc mode before reporting the issue.

Only interactive mode

The xontrib features are implemented as on_precommand events and these additions do not affect the xonsh language when run as script. That said, you might find them useful if you have strong muscle memory in interactive mode.

Debug

This xontrib may modify user command line input to implement its behavior. To see the modifications as they are applied (in unified diffformat), please set $XONSH_DEBUG to 2 or higher.

See also

Credits

This package was created with xontrib template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xontrib-bashisms-0.0.5.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

xontrib_bashisms-0.0.5-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file xontrib-bashisms-0.0.5.tar.gz.

File metadata

  • Download URL: xontrib-bashisms-0.0.5.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for xontrib-bashisms-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5646d4df81fb8d89b2de370e65aba50a2bcbd691321b4d524015c2da42e1b682
MD5 fd4c88062d24833ddc87fa704ccf6d54
BLAKE2b-256 3dca1d754312e135f4aff7cd6934d7810db0ee8dde0dcd3c94478c0e26e6e652

See more details on using hashes here.

File details

Details for the file xontrib_bashisms-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for xontrib_bashisms-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 63513e396e31f14c62940c9341d843f8fab838f96536e1eddb7ec9671ea5f78b
MD5 acdfbbd01e7dc1348896540e5220aec7
BLAKE2b-256 9a36bcbb9e8641f3ac47ca51109cb6405a31accab8b7cdf157d70dd44e54cc79

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page