xxh / xxh-plugin-zsh-ohmyzsh

Oh my zsh plugin for xxh zsh
BSD 2-Clause "Simplified" License
38 stars 20 forks source link

No such file or directory on remote machine #2

Closed zaeemnalla closed 3 years ago

zaeemnalla commented 4 years ago

Is this plugin meant to create these directories or is it an issue with xxh instead?

source xxh.zsh +if +q cloud-desktop
[oh-my-zsh] plugin 'zsh-apple-touchbar' not found
[oh-my-zsh] plugin 'zsh-autosuggestions' not found
[oh-my-zsh] plugin 'zsh-syntax-highlighting' not found
[oh-my-zsh] autojump not found. Please install it first.
Starting ssh-agent...
_start_agent:6: no such file or directory: /local/home/username/.xxh/.ssh/environment-hostname
chmod: cannot access `/local/home/username/.xxh/.ssh/environment-hostname': No such file or directory
_start_agent:.:8: no such file or directory: /local/home/username/.xxh/.ssh/environment-hostname
/home/username/.xxh/.xxh/plugins/xxh-plugin-zsh-ohmyzsh/build/ohmyzsh/oh-my-zsh.sh:source:125: no such file or directory: /home/username/.xxh/.xxh/plugins/xxh-plugin-zsh-ohmyzsh/build/ohmyzsh/themes/powerlevel10k/powerlevel10k.zsh-theme
anki-code commented 4 years ago

Hello @zaeemnalla!

  1. What is your target host OS and what is your local OS?
  2. Do you have additional settings? (maybe in the xxh config)
yairfrid commented 3 years ago

Hey, im getting the same, Ubuntu WSL -> CentOS 7, no additional settings afaik

anki-code commented 3 years ago

@Fongeme thanks for reporting this! I haven't WSL and CentOS now. So I'm asking additional info from you:

  1. Are you have exactly the same output? If no please provide your output.
  2. Add full info: xxh version, xxh-plugins installed (or any other modifications).
  3. If it is possible add verbose log: xxh myhost +if +v.
anki-code commented 3 years ago

I've tested the plugin in xxh-dev environment and Ubuntu->CentOS have no exceptions:

Screenshot_20201012_151609

Could it be related to WSL?

yairfrid commented 3 years ago

My response is a bit different, i'll attach it and let me know if you prefer me to open another issue(On another glance this could be because i've missed something but not sure):

source /home/yair/.local/bin/xxh.zsh <IP> +I xxh-plugin-zsh-ohmyzsh +if +q +v
yair@<IP>'s password:
[oh-my-zsh] plugin 'zsh-autosuggestions' not found
[oh-my-zsh] plugin 'zsh-syntax-highlighting' not found
/home/yair/.xxh/.xxh/plugins/xxh-plugin-zsh-ohmyzsh/build/ohmyzsh/oh-my-zsh.sh:source:128: no such file or directory: /home/yair/.xxh/.xxh/plugins/xxh-plugin-zsh-ohmyzsh/build/ohmyzsh/themes/powerlevel10k/powerlevel10k.zsh-theme
localhost%
anki-code commented 3 years ago

@Fongeme Please run on your home host (where you do source) and post here the output:

echo $ZSH_THEME
echo $plugins
yairfrid commented 3 years ago
powerlevel10k/powerlevel10k
git ubuntu colored-man-pages command-not-found web-search zsh-autosuggestions zsh-syntax-highlighting
anki-code commented 3 years ago

Got it. You've got "not found" warnings because you have additional plugins in your OMZ: zsh-autosuggestions, zsh-syntax-highlighting, powerlevel10k. But xxh-plugin-zsh-ohmyzsh built clean installation of OMZ.

What you need:

  1. Fork this repository and rename to xxh-plugin-zsh-ohmyzsh-Fongeme for example.
  2. Add installation of your additional plugins to build.sh script
  3. After this you can install your pack of xxh OMZ: xxh +R xxh-plugin-zsh-ohmyzsh +RI https://github.com/Fongeme/xxh-plugin-zsh-ohmyzsh-Fongeme
  4. And connect to the host by your command: source /home/yair/.local/bin/xxh.zsh <IP> +if +q +v
yairfrid commented 3 years ago

Oh, i thought xxh had support for additional plugins aswell, maybe i could try supporting it in a pr, do you think it's viable?(Have yet to read the source code)

anki-code commented 3 years ago
  1. First of all xxh has an ideas behind and one of the idea:

Careful. No blindfold copying config files from local to remote host. Following the privacy and repeatability reasons the better way is to fork the xxh plugin or shell example and pack your config to it.

The next idea is:

Be open and fork-ready. Every repo could be forked, customized and reused without waiting for package management system, xxh releases or any third party.

As result the simple way for the user is just fork the repo and create own version with all lovely tools.

  1. To support the installed themes/plugins you should read it from the zsh configs and install it in build.sh script. I don't know how much work is needed to make this process universal and how seamless the installation process will be. I'm just not the user of zsh/omz. PRs are welcome!

  2. I'm going to close this issue because the first message of this issue has the same problem and the answer is here and above. Feel free to continue the thread.

yairfrid commented 3 years ago

Okay, following that note, we could have a config for xxh/omz so plugins could be added without having to rebuild, not necessarily grab them from the user environment, but make the xxh environment a bit more configurable(ofc if one wants to copy his configs, one should be able to if we follow that line of thought)

anki-code commented 3 years ago

Yeah, for example you can create omz-plugins.txt file in the repo and use it in build.sh as the list of packages to install.

In this case you will be able to fork the repo and put the list zsh-autosuggestions, zsh-syntax-highlighting, powerlevel10k to the omz-plugins.txt.

anki-code commented 3 years ago

JFYI The start point to understanding how xxh works - https://github.com/xxh/xxh/wiki#how-it-works