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

Fix SHELL env var in open-actions.conf and launch-actions.conf #5922

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

page-down
Copy link
Contributor

When shell is configured as bash --login, kitty +shebang $FILE_PATH $SHELL will not work.
The PR fixes this.

  • Only the executable path is used when expanding $SHELL.
  • Also fix the non-working example {SHELL} in the documentation.

I actually tried to fix the problem of not being able to open image files with kitty under macOS.
However I don't know when the next version will be released, so it's better to let you know.

Steps to reproduce:

  • Right click on the image file to open it via kitty.app, or drag and drop the file onto the Dock.
  • Or run kitty @ launch --type=os-window kitty +kitten icat --hold /path/to/image.
  • The new process ends and the new OS window is immediately closed. (This should be run as kitten icat)

Issues:

  • icat --hold is not respected in the python placeholder (raise SystemExit()), causing the window to close directly.
  • launch uses the prewarmed process to run kitten. I think for all wrapped_kitten_names() the prewarm should be skipped.
  • The launch --hold uses a python kitten to wrap, so it will run the process independently. launch --hold kitty +kitten icat will work fine. I'm not sure if we can use prewarm in this case (to make the kitten after launch --hold run faster), it seems infeasible and unnecessary. This hold_till_enter then looks like it can be implemented in golang.

Lastly, how to add help and exit auto-completion to the kitty shell?

Thank you.

Only the executable path is used when expanding `$SHELL`.
Also fix the non-working example `{SHELL}` in the documentation.
@kovidgoyal kovidgoyal merged commit 35c1ebd into kovidgoyal:master Jan 23, 2023
@kovidgoyal
Copy link
Owner

kovidgoyal commented Jan 23, 2023 via email

@page-down page-down deleted the fix-open-actions-shell branch January 23, 2023 10:31
@page-down
Copy link
Contributor Author

@kovidgoyal
There is also an auto-completion issue with the kitty shell.
launch kitty +kitten icat ... cannot be completed, while it is possible in the integrated 3rd-party shells.

The launch command is still quite commonly used, so please evaluate if it is worth fixing, and if not, kindly ignore the report for now, as it will take time on something with low priority.

Of course there are problems such as subcmd --password-file not being able to complete the file path, but these are not important at all.

@kovidgoyal
Copy link
Owner

kovidgoyal commented Jan 23, 2023 via email

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

Successfully merging this pull request may close these issues.

2 participants