-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to write the first xxh-plugin for xxh-shell-fish #1
Comments
OK, I just found the xxh/xxh-plugin-zsh-ohmyzsh plugin which brings the current zsh them to the ssh. So, I am guessing we first need a xxh/xxh-plugin-fish-ohmyfish plugin to do the same for the Fish shell. |
You're the first who writes xxh-plugin for fish and I'll help you to pass this path. I'll describe step by step and zsh will be an example (because I'm not the user of fish):
How it works: When you xxhing to the host the xxh upload the shell and plugins and xxh-shell runs RC file which "source" the plugin RC files. As result you have your favorite shell with your plugins. |
Simple development workflow:
The last command will be install the shell and plugin every before every connect. When debugging of RC file is over you could remove +RI for shell and debug the plugin. |
I think more simpler example is bash:
Start here instead of zsh. |
I've updated xxh-shell-fish and it has all fish functionality now with reduced size of package. Recommend to update:
|
I've added the sample plugin repo: https://github.com/xxh/xxh-plugin-fish-sample |
For Fish shell this is OK since the the RC file is sourcing the |
@anki-code Another question. On the xxh/xxh page it states:
Where is it expected that the shells that get installed store their configuration files, scripts, etc.? Is this in the normal locations where the shell expects to find them or in the I saw that when I ran the command above |
By default:
Ordinary If you want to save some files between xxh updating place it to |
We should find a way to change this for xxh-shell or ask fish shell developers.
Yes
Yes. Because environment variables should be shared from entrypoint to the shell and to the plugins at the end. |
I already asked in the Fish Shell gitter channel. The Fish shell config directory can be set by setting the
Fish then places or looks for it config in the
Is a subdirectory of |
Your right. I scrolled back through my shell and found that |
Think about |
I see a number pieces of information in this issue that should make it into the documentation. |
You're completely right. I'll do it a bit later. |
I've added xxh-plugin-bash-ohmybash plugin. So you can review the simplest Bash version of xxh packages ecosystem: |
@frederickjh I've added new type of plugins: prerun plugins in xxh 0.7.11. Prerun plugin is a bash script which will be run on entrypoint stage immediately before shell running. It can help to bring some config files before running shell. xxh-plugin-prerun-mc - first prerun plugin for Midnight Commander which creates ~/.config/mc/ini file if it is not exists. For your fish plugins you can just add More info - https://github.com/xxh/xxh/wiki#what-is-xxh-prerun-plugin |
Now that I have this working I am wondering how my shell config gets to the remote host.
From the README.md xxh/xxh
I would take this to mean that some how my local shell configuration gets transferred to the remote hosts I connect to with xxh.
Also the link to the example plugin xxh/xxh-plugin-fish-sample is a broken link. I might take a crack at making a plugin if I knew how and for what.
The text was updated successfully, but these errors were encountered: