https://github.com/nahoj/xontrib-take
A single Xonsh command to create and cd into a dir, or into a fetched git repo or archive file. A port of Oh My Zsh's take command.
https://github.com/nahoj/xontrib-take
command-line-tool git utility xonsh xontrib
Last synced: 21 days ago
JSON representation
A single Xonsh command to create and cd into a dir, or into a fetched git repo or archive file. A port of Oh My Zsh's take command.
- Host: GitHub
- URL: https://github.com/nahoj/xontrib-take
- Owner: nahoj
- License: mit
- Created: 2026-04-26T12:04:58.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-16T17:04:04.000Z (about 1 month ago)
- Last Synced: 2026-05-16T19:14:09.908Z (about 1 month ago)
- Topics: command-line-tool, git, utility, xonsh, xontrib
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
A single Xonsh command to create and cd into a directory, or into a fetched git repo or archive file. A port of Oh My Zsh's take command.
I reckon [the source](https://github.com/nahoj/xontrib-take/blob/main/xontrib/take.xsh) is a good showcase of mixing Python and shell commands in Xonsh.
**Status:** It works. Issues and PRs for additional features are welcome!
If you like the idea click ⭐ on the repo and tweet.
## Installation
I haven't uploaded this to PyPi, I will if anyone expresses interest.
```xsh
xpip install -U git+https://github.com/nahoj/xontrib-take
```
Then:
```xsh
xontrib load take
```
## Examples
```xsh
~/test @ ls
~/test @ take foo/bar
~/test/foo/bar @
```
```xsh
~/test @ take https://github.com/nahoj/xontrib-take.git
Clonage dans 'xontrib-take'...
...
…/xontrib-take main @
```
```xsh
~/test @ take https://github.com/nahoj/xontrib-take/archive/refs/heads/main.zip
...
Archive: /tmp/tmp.n2rudhhtF0
creating: ./xontrib-take-main/
...
~/test/xontrib-take-main @
```
## Development
- activate [pre-commit](https://github.com/pre-commit/pre-commit) hooks
```sh
# install pre-commit plugins and activate the commit hook
pre-commit install
pre-commit autoupdate
```
## Releasing your package
- Bump the version of your package.
- Create a GitHub release (The release notes are automatically generated as a draft release after each push).
- And publish with `poetry publish --build` or `twine`
## Credits
This xontrib is a direct translation of Oh My Zsh's handy `take` command, inspired by `mkcd` aliases around the world :)
This package was created with [xontrib template](https://github.com/xonsh/xontrib-template).
--------------------
## Xontrib Promotion (DO and REMOVE THIS SECTION)
* Publish your xontrib to PyPi via Github Actions and users can install your xontrib via `xpip install xontrib-myxontrib`. Easiest way to achieve it is to use Github Actions. Register to https://pypi.org/ and [create API token](https://pypi.org/help/#apitoken). Go to repository "Settings" - "Secrets" and your PyPI API token as `PYPI_API_TOKEN` as a "Repository Secret". Now when you create new Release the Github Actions will publish the xontrib to PyPi automatically. Release status will be in Actions sction. See also `.github/workflows/release.yml`.