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

NewContentEditor option doesn't accept arguments for editor #9356

Closed
lamyseba opened this issue Jan 5, 2022 · 4 comments · Fixed by #9362
Closed

NewContentEditor option doesn't accept arguments for editor #9356

lamyseba opened this issue Jan 5, 2022 · 4 comments · Fixed by #9362

Comments

@lamyseba
Copy link

lamyseba commented Jan 5, 2022

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.89.4+extended linux/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

I suppose

Some editors can be lauched with command line options. Eg Kate editor has a -s option to open file within a chosen session.
If I put

newContentEditor: "kate -s mySessionName"

in my config.yml file, I get an error

Error: exec: "kate -s mySessionName": executable file not found in $PATH

Removing the -s mySessionName options makes things work as expected.
Searching about this problem, I found it should be solved since v0.77 in d48a98c, but I'm still getting the problem. Is there a regression?

@lamyseba lamyseba changed the title Newcontenteditor option doesn't accept arguments for editor NewContentEditor option doesn't accept arguments for editor Jan 5, 2022
@davidsneighbour
Copy link
Contributor

Run which kate in your CLI, then add the proper path to kate into your configuration. Something like /usr/bin/kate probably. You can never assume that anything is using the same paths that you have configured in your terminal session.

@lamyseba
Copy link
Author

lamyseba commented Jan 6, 2022

Thanks @davidsneighbour for your answer. That is not the solution. Kate is in /usr/bin, and I already tried to put

newContentEditor: "/usr/bin/kate -s mySessionName"

and this gives me

Error: exec: "/usr/bin/kate -s pauavelo.fr": stat /usr/bin/kate -s mySessionName: no such file or directory

And, as I said previously, just writing

newContentEditor: kate 

works fine, without arguments and without full path. So the path is found. The problem are the arguments.

@jmooring
Copy link
Member

jmooring commented Jan 6, 2022

Is there a regression?

Yes, introduced with 9185e11.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants