8000 source xxh.zsh returns unrecognized arguments error · Issue #185 · xxh/xxh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

source xxh.zsh returns unrecognized arguments error #185

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

Open
juhannc opened this issue Sep 3, 2024 · 2 comments
Open

source xxh.zsh returns unrecognized arguments error #185

juhannc opened this issue Sep 3, 2024 · 2 comments

Comments

@juhannc
Copy link
juhannc commented Sep 3, 2024

Local OS (where xxh is installed): WSL with Ubuntu 20.04 under Windows 11 23H2
Destination host OS: local
xxh version: 0.8.14
xxh-plugins installed: none

Steps to Reproduce

  1. I run source xxh.zsh local +v +I xxh-plugin-zsh-ohmyzsh +if +q
  2. The output log:
usage: xxh <host from ~/.ssh/config>
usage: xxh [ssh arguments] [user@]host[:port] [xxh arguments]
usage: xxh local [xxh arguments]
usage: xxh [-p SSH_PORT] [-l SSH_LOGIN] [-i SSH_PRIVATE_KEY] [-J SSH_JUMP_HOST]
           [-o SSH_OPTION -o ...] [+c SSH_COMMAND] [+P PASSWORD] [+PP]
           [user@]host[:port]
           [+i] [+if] [+iff] [+hhr] [+s SHELL] [+e NAME=VAL +e ...] [+v] [+vv] [+q]
           [+hh HOST_XXH_HOME] [+hhh HOST_HOME] [+hf HOST_EXEC_FILE] [+hc HOST_EXEC_CMD]
           [+xc CONFIG_FILE] [+lh LOCAL_XXH_HOME] [-h] [-V]
usage: xxh [+I xxh-package +I ...] [+L] [+RI xxh-package +RI ...] [+R xxh-package +R ...]
xxh: error: unrecognized arguments: local
  1. The problem is, I cannot take my zsh config with me to the destination host.

Further info

Running xxh local +v +I xxh-plugin-zsh-ohmyzsh +if +q results in:

Something went wrong while running zsh on host:
./zsh.sh: 24: export: Files/Eclipse: bad variable name
/home/johann/.xxh/.xxh/shells/xxh-shell-zsh/build/zsh.sh: 24: export: Files/Eclipse: bad variable name

Running xxh +v local +s zsh results in:

Load xxh config from /home/johann/.config/xxh/config.xxhc
ssh arguments: ['-o', 'StrictHostKeyChecking=accept-new']
Host info:
xxh_home_realpath=/home/johann/.xxh
xxh_version=0.8.14
xxh_shell_exists=1
xxh_home_writable=1
xxh_parent_home_writable=1
rsync=/usr/bin/rsync
scp=/usr/bin/scp
shell=/usr/bin/zsh
kernel=Linux
arch=x86_64
Something went wrong while running zsh on host:
./zsh.sh: 24: export: Files/Eclipse: bad variable name
/home/johann/.xxh/.xxh/shells/xxh-shell-zsh/build/zsh.sh: 24: export: Files/Eclipse: bad variable name

Running xxh +v local +s bash works:

Load xxh config from /home/johann/.config/xxh/config.xxhc
ssh arguments: ['-o', 'StrictHostKeyChecking=accept-new']
Host info:
xxh_home_realpath=/home/johann/.xxh
xxh_version=0.8.14
xxh_shell_exists=1
xxh_home_writable=1
xxh_parent_home_writable=1
rsync=/usr/bin/rsync
scp=/usr/bin/scp
shell=/usr/bin/bash
kernel=Linux
arch=x86_64
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

johann@workstation:~$

For community:
⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@anki-code
Copy link
Member

Nice catch! PR is welcome!

@hunorbatori
Copy link
hunorbatori commented Dec 29, 2024

I have the same problem but on a greater scale. I cannot make seamless mode work at all with zsh. No matter what I try, I get unrecognized arguments error.

Is there any fix/workaround for the issue in order to make seamless mode work?

Local OS (where xxh is installed): WSL with Debian GNU/Linux 12 (bookworm) under Windows 11 24H2
Destination host OS: Debian GNU/Linux 11 (bullseye)
xxh version: 0.8.14
xxh-plugins installed: xxh-plugin-zsh-powerlevel10k

First, a successfull connection without seamless mode

❯ whoami
huntszy
❯ hostname
Ryzen-Reborn
❯ xxh marshal +s zsh +i
 huntszy-admin@marshal  ~  whoami  
huntszy-admin
 huntszy-admin@marshal  ~  hostname 
marshal

Now a few exampels I tried but failed:

❯ whoami
huntszy
❯ hostname
Ryzen-Reborn
❯ source xxh.zsh marshal
usage: xxh <host from ~/.ssh/config>
usage: xxh [ssh arguments] [user@]host[:port] [xxh arguments]
usage: xxh local [xxh arguments]
usage: xxh [-p SSH_PORT] [-l SS
6402
H_LOGIN] [-i SSH_PRIVATE_KEY] [-J SSH_JUMP_HOST]
           [-o SSH_OPTION -o ...] [+c SSH_COMMAND] [+P PASSWORD] [+PP]
           [user@]host[:port]
           [+i] [+if] [+iff] [+hhr] [+s SHELL] [+e NAME=VAL +e ...] [+v] [+vv] [+q]
           [+hh HOST_XXH_HOME] [+hhh HOST_HOME] [+hf HOST_EXEC_FILE] [+hc HOST_EXEC_CMD]
           [+xc CONFIG_FILE] [+lh LOCAL_XXH_HOME] [-h] [-V]
usage: xxh [+I xxh-package +I ...] [+L] [+RI xxh-package +RI ...] [+R xxh-package +R ...]
xxh: error: unrecognized arguments: marshal
❯ cat .ssh/config
Host marshal
        HostName        10.1.0.100
        User            huntszy-admin
        IdentityFile    /home/huntszy/.ssh/marshal-huntszy-admin
❯ source xxh.zsh -i /home/huntszy/.ssh/marshal-huntszy-admin huntszy-admin@10.1.0.100
usage: xxh <host from ~/.ssh/config>
usage: xxh [ssh arguments] [user@]host[:port] [xxh arguments]
usage: xxh local [xxh arguments]
usage: xxh [-p SSH_PORT] [-l SSH_LOGIN] [-i SSH_PRIVATE_KEY] [-J SSH_JUMP_HOST]
           [-o SSH_OPTION -o ...] [+c SSH_COMMAND] [+P PASSWORD] [+PP]
           [user@]host[:port]
           [+i] [+if] [+iff] [+hhr] [+s SHELL] [+e NAME=VAL +e ...] [+v] [+vv] [+q]
           [+hh HOST_XXH_HOME] [+hhh HOST_HOME] [+hf HOST_EXEC_FILE] [+hc HOST_EXEC_CMD]
           [+xc CONFIG_FILE] [+lh LOCAL_XXH_HOME] [-h] [-V]
usage: xxh [+I xxh-package +I ...] [+L] [+RI xxh-package +RI ...] [+R xxh-package +R ...]
xxh: error: unrecognized arguments: huntszy-admin@10.1.0.100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0