Skip to content

Open .command files with kitty on macOS #3366

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

Closed
hughcrt opened this issue Mar 5, 2021 · 7 comments
Closed

Open .command files with kitty on macOS #3366

hughcrt opened this issue Mar 5, 2021 · 7 comments

Comments

@hughcrt
Copy link

hughcrt commented Mar 5, 2021

It's not possible to open .command fille with kitty, whereas it's possible with most other terminal apps.

It's common for script to use .command file to run a terminal script. Until kitty doesn't support this feature, it means that we have to set another terminal application as the default app for .command files

@kovidgoyal
Copy link
Owner

Not sure what you are asking for. What is kitty supposed to do with a
.command file?? What is a .command file? What do you do with it?

@Luflosi
Copy link
Contributor

Luflosi commented Mar 5, 2021

It's possible to add MimeType definitions to the .desktop file, perhaps this is what he's asking for?

@kovidgoyal
Copy link
Owner

kovidgoyal commented Mar 5, 2021 via email

@hughcrt
Copy link
Author

hughcrt commented Mar 5, 2021

Please look at this issue react-native-community/cli#303, and especially this comment react-native-community/cli#303 (comment)

It explains the use case

@kovidgoyal
Copy link
Owner

Sorry, I dont follow. There are people that want to run shell scripts by
right clicking on them?

@klooj
Copy link

klooj commented Mar 6, 2021

@hughcrt

  1. open finder & show hidden files
  2. right click the ".command" file and select get info
  3. select the open with dropdown and choose "other"
  4. in the enable dropdown, select "all applications" then choose "kitty".

boom. done.

@hughcrt
Copy link
Author

hughcrt commented Mar 6, 2021

I've tried to look a bit more in depth at the problem.

When using react native, at one point the script is trying to execute a file named launchPackager.command. It's a simple executable shell script. It could have been a .sh file, the problem would be the same.

The react-native cli opens the script by opening a new window with the default terminal application. It's similar to opening the script from the Finder.

When trying to setting kitty as the default app for this kind of file as @klooj explained, I get this error:
`The document "launchPackager.command" could not be opened. kitty cannot open files in the "Terminal shell script" format.

I can execute shell scripts by opening files in the finder with Terminal.app and iTerm, but it doesn't work with kitty.

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

No branches or pull requests

4 participants