https://github.com/xxh/xxh-plugin-xonsh-example
Fork this to create xxh plugin for xonsh
https://github.com/xxh/xxh-plugin-xonsh-example
python xonsh xxh
Last synced: about 1 month ago
JSON representation
Fork this to create xxh plugin for xonsh
- Host: GitHub
- URL: https://github.com/xxh/xxh-plugin-xonsh-example
- Owner: xxh
- License: bsd-2-clause
- Created: 2020-02-16T16:47:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-02T16:43:31.000Z (over 4 years ago)
- Last Synced: 2024-10-24T15:38:39.858Z (6 months ago)
- Topics: python, xonsh, xxh
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Create your xonsh xxh plugin
1. Fork this repo
2. Edit the plugin files:
* `pluginrc.xsh` - this script will be executed on the host when you connect to the host. Put here your functions, environment variables, aliases and whatever you need.
* `build.sh` - this script should be executed to prepare the plugin on local xxh. It executes automatically if `build` directory is not exists.
* `env` - see description below
3. Replace this list to description of your xxh plugin (review the examples in other xxh plugins)
4. Push your commits and rename your repo to `xxh-plugin-xonsh-yourtitle`
5. Install the plugin to your xxh home:
```
xxh +I xxh-plugin-xonsh-yourtitle+git+https://github.com/yourname/xxh-plugin-xonsh-yourtitle
```
6. Try connect in update mode: `xxh [user@]host[:port] +s xonsh +if`## `env` file
The xxh has seamless environment mode which allows to pass variable from your current shell session
to the xxh host session. For example if you have `XONSH_COLOR_STYLE` variable with your shell color theme you shouldn't
worry about passing it manually. Add it to `env` file (one variable name per line) and you can do the magic by using `source xxh.xsh` command:
```
home> print($XONSH_COLOR_STYLE)
paraiso-dark
home> source xxh.xsh myhost
myhost> print($XONSH_COLOR_STYLE)
paraiso-dark
```
This very useful when you want to use the same tools on your local and remote host.