Skip to content
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

Cannot start neovide #5

Closed
manfredlotz opened this issue Sep 11, 2022 · 6 comments
Closed

Cannot start neovide #5

manfredlotz opened this issue Sep 11, 2022 · 6 comments

Comments

@manfredlotz
Copy link

manfredlotz commented Sep 11, 2022

The following is working fine

run-or-raise 'class = "neovide"' neovide '--maximized'

Now I want to add: -listen '/tmp/nvimsocket for neovim, and tried

run-or-raise 'class = "neovide"' neovide  -- "--maximized -- --listen /tmp/nvimsocket"

but nothing happens.

Not sure if I am making a mistake here.

@Mange
Copy link

Mange commented Sep 12, 2022

run-or-raise 'class = "neovide"' neovide  -- "--maximized -- --listen /tmp/nvimsocket"

It could be because you're terminating the CLI arguments twice with -- or wrapping all the arguments in a single string, making them all a single argument. Try

run-or-raise 'class = "neovide"' neovide  -- --maximized --listen /tmp/nvimsocket

See if that helps.

@manfredlotz
Copy link
Author

No, this doesn't help either. Running you suggestion is like my way above. Nothing happens.

@Soft
Copy link
Owner

Soft commented Sep 14, 2022

Could you try the following command and see if that works

run-or-raise 'class = "neovide"' neovide --maximized -- --listen /tmp/nvimsocket

@manfredlotz
Copy link
Author

Yes, this is working fine. Thanks a lot.

So, what is the moral of the story? Don't use quotes at all for the command arguments?

@Soft
Copy link
Owner

Soft commented Sep 14, 2022

run-or-raise receives two or more command line arguments where the first one is the expression used to match windows, the second one the command to execute if a suitable windows was not found, and any remaining arguments are passed to that command.

This means that in the case of your first attempt

run-or-raise 'class = "neovide"' neovide  -- "--maximized -- --listen /tmp/nvimsocket"

neovide would have received the following arguments:

  1. --
  2. --maximized -- --listen /tmp/nvimsocket

The important bit here is that it wil be neovide receiving the first -- argument, run-or-raise doesn't interpret that in any special way. Looking at neovide's help, it seems it will pass any arguments following -- to neovim. This means that here neovim will then receive the second argument --maximized -- --listen /tmp/nvimsocket. Since the argument was wrapped in quotes neovim will receive it as a single argument and I assume it does not know what to do with that and exits with an error.

@manfredlotz
Copy link
Author

Thanks a lot for your explanations which make much sense.

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