An open API service indexing awesome lists of open source software.

https://github.com/xxh/xxh-shell-xonsh

Use xonsh wherever you go through the SSH without installation on the host.
https://github.com/xxh/xxh-shell-xonsh

xonsh xontrib xxh xxh-shell

Last synced: about 1 month ago
JSON representation

Use xonsh wherever you go through the SSH without installation on the host.

Awesome Lists containing this project

README

        


The xonsh shell entrypoint for xxh. Use xonsh wherever you go through the SSH without installation on the host.


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

## Install

Install from xxh repo:
```bash
xxh +I xxh-shell-xonsh
# or from repo: xxh +I xxh-shell-xonsh+git+https://github.com/xxh/xxh-shell-xonsh
```
## Connect
```xsh
xxh yourhost +s xonsh +if
```
To avoid adding `+s` every time use xxh config in `~/.config/xxh/config.xxhc` (`$XDG_CONFIG_HOME`):
```yaml
hosts:
".*": # Regex for all hosts
+s: xonsh
```

## Using python, pip and [xontribs](https://xon.sh/xontribs.html)

The `xonsh.AppImage` has `python` and `pip` by default. You can update pip and install packages and [xontribs](https://github.com/topics/xontrib) ordinarily:
```xsh
myhost> pip install -U pip
myhost> pip install pandas
myhost> xpip install xontrib-prompt-bar
```

Packages location comply with [hermetic principle](https://github.com/xxh/xxh/wiki#the-ideas-behind-xxh):

| xxh command | pip packages home | user home |
| ------- | ---------- | --------- |
| `xxh myhost` | `/home/user/.xxh/.local` | `/home/user/.xxh` |
| `xxh myhost +hhh '~'` | `/home/user/.xxh/.local` | `/home/user` |
| `xxh myhost +hhh '~' +hhx '~'` | `/home/user/.local` | `/home/user` |

Note! That packages will be installed in user directory by default i.e. `~/.local`. If you're using package manager (e.g. `mamba`, `conda`) set `$PYTHONNOUSERSITE=1` ([doc](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONNOUSERSITE)) after virtual environment activation.

## Plugins

**xonsh xxh plugin** is the set of xsh scripts which will be run when you'll use xxh. You can create xxh plugin with your lovely aliases, tools or color theme and xxh will bring them to your ssh sessions.

Pinned xxh xonsh plugins: [autojump](https://github.com/xxh/xxh-plugin-xonsh-autojump).

🔎 [Search xxh plugins on Github](https://github.com/search?q=xxh-plugin-xonsh&type=Repositories) or [Bitbucket](https://bitbucket.org/repo/all?name=xxh-plugin-xonsh) or 💡 [Create xxh plugin](https://github.com/xxh/xxh-plugin-xonsh-example)

## Seamless mode
Add environment variables to `env` file and bring them to the host using `source` command:
```shell script
source xxh.xsh myhost
```

## Alpine Linux

* [How to run xonsh AppImage on Alpine?](https://github.com/xonsh/xonsh/discussions/4158#discussioncomment-462032)

## Thanks
* @probonopd for https://github.com/AppImage
* @niess for https://github.com/niess/linuxdeploy-plugin-python/