cd to any path without escaping in xonsh shell: cd ~/[te] st
Project description
cd
to any path without escaping in xonsh shell.
Replaces cd
at the start of a line with a subprocess macro cd!
If you like the idea click ⭐ on the repo and stay tuned.
Installation
To install use pip:
xpip install xontrib-cd
# or: xpip install -U git+https://github.com/eugenesvk/xontrib-cd
This xontrib will get loaded automatically for interactive sessions; to stop this, set
$XONTRIBS_AUTOLOAD_DISABLED = {"cd", }
Usage
Use cd
as usual, but without the fear of copying&pasting arbitrary paths (e.g. .../space separated/
or .../[bracketed]/
)
xontrib load cd
cd ~/[Path] With Spaces # equivalent to 'cd! ~/[Path] With Spaces'
cd C:/Program Files # equivalent to 'cd! C:/Program Files'
cd -P ~/SymlinkTo # follow symlinks, equivalent to 'cd -P! ~/SymlinkTo'
Set the following environment variables in your profile to enable extra options (disabled by default):
$XONTRIB_CD_ALTSYMLINKFLAG = True
to pass-p
,-f
, or-s
flags (in addition to-P
) to follow symlinks$XONTRIB_CD_ALTSYMLINKFUNC = True
to usecdp
,cdf
, orcds
(in addition tocd -P
) to follow symlinks$XONTRIB_CD_SYMLINKAlWAYSON = True
to makecd
always follow symlinks (always pass-P
)
Known issues
To be discovered...
Credits
This package was created with xontrib cookiecutter template based on the idea of hooking into the command line input as implemented in xontrib-sh
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
Built Distribution
Hashes for xontrib_cd-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2693d0de2093243a50f3665ce3a69e3ba138d5d22e5e20b85ce9f1bbfec0a6d3 |
|
MD5 | baef2cb9bb647a8722ae5926f042cc8b |
|
BLAKE2b-256 | f1decc0003aeacdf84c29068daf2cc4751f349ae93adb53bcdee86b46bae2d7f |