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

Strip leading - from session name #14

Closed
raiguard opened this issue Jan 16, 2022 · 2 comments
Closed

Strip leading - from session name #14

raiguard opened this issue Jan 16, 2022 · 2 comments

Comments

@raiguard
Copy link

raiguard commented Jan 16, 2022

My dotfiles repo lives in ~/.dotfiles, so the resulting gitdir session name is -dotfiles. This wreaks havoc with kak-lsp and kakoune itself, the former thinking it is a command-line flag, and the latter thinking it's a switch to the command you pass %val{session} to.

shell stderr: <<<
error: Found argument '-o' which wasn't expected, or isn't valid in this context

USAGE:
    kak-lsp --daemonize --kakoune --session <SESSION>

For more information try --help
>>>

Suggested fix

Strip any non-alphanumeric characters from the front of the session name.

To reproduce

  • Create a Git repo inside a hidden folder (e.g. ".test")
  • Pass KKS_USE_GITDIR_SESSIONS
  • Open kakoune and try to enable kak-lsp with evaluate-commands %sh{ kak-lsp --kakoune -s $kak_session }
  • Check *debug* and you will see kak-lsp complain about an unknown command line flag.
@kkga
Copy link
Owner

kkga commented Jan 16, 2022

Good catch! Thanks for using kks :)
This should be fixed in the latest release. I've also just pushed an updated AUR package.

@kkga kkga closed this as completed Jan 16, 2022
@raiguard
Copy link
Author

Confirmed fixed! Thanks for the quick patch. :)

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

2 participants