Skip to content

Conversation

andreiborisov
Copy link
Contributor

@andreiborisov andreiborisov commented Feb 1, 2021

Description

This PR adds a new script command which allows running of an arbitrary shell command in iTerm.

It executes the command in the existing window and tab unless there is already a running command there like ssh or top in which case it opens a new tab. It also has a variable that tweaks the script to open a new window instead of a tab.

Type of change

  • New script command

Video

https://www.icloud.com/iclouddrive/0ik_r5f285Va2HIHCYcGtCL5w#CleanShot_2021-02-01_at_17.30

Dependencies / Requirements

iTerm

Checklist

@andreiborisov andreiborisov force-pushed the commands/iterm-run-shell-command branch from 190a7db to da362cd Compare February 1, 2021 14:53
@unnamedd unnamedd self-requested a review February 1, 2021 16:30
@fe9lix fe9lix self-requested a review February 2, 2021 07:56
Copy link
Contributor

@fe9lix fe9lix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @andreiborisov, thanks! could you add a runtime check whether iTerm is installed on the user's machine? also see "Scripts that require installation of runtimes and dependencies" in https://github.com/raycast/script-commands/blob/master/CONTRIBUTING.md

@andreiborisov
Copy link
Contributor Author

andreiborisov commented Feb 2, 2021

Could you add a runtime check whether iTerm is installed on the user's machine?

Are we sure we need a runtime check? I don’t see any checks in other script commands intended to control a particular app, e.g., https://github.com/raycast/script-commands/blob/master/commands/apps/amphetamine/amphetamine-on.applescript

Perhaps it is the opposite and I should remove the dependency metadata instead?

@fe9lix
Copy link
Contributor

fe9lix commented Feb 2, 2021

Fair point – in that case I think it's pretty clear already from the script command name that this only works with iTerm + it's in the "apps" folder, so should be fine.

@fe9lix fe9lix merged commit 4790be9 into raycast:master Feb 2, 2021
crstauf added a commit to crstauf/raycast-script-commands that referenced this pull request Feb 3, 2021
* raycast/master: (146 commits)
  Update Script Commands documentation
  README: Fix some typos
  Set scripts as executable
  Add a Bitwarden package (raycast#214)
  Update Script Commands documentation
  add Peekalink script (raycast#216)
  Update Script Commands documentation
  Add a script command to run an arbitrary shell command in iTerm (raycast#215)
  🩹 Make requests PR changes.
  🔥 Remove duplicate header
  ✨ Add table of contents
  ♻️ Refactor all markdown links to use local routes
  📝 Add a nice looking README header
  Update Script Commands documentation
  Add documentation metadata to the Kinopoisk script command
  Add a script command for searching in Kinopoisk
  Add a script command for searching in App Store app
  Update Script Commands documentation
  Fix decimal date calculation
  close system preferences once audio output is switched
  ...

# Conflicts:
#	README.md
#	commands/README.md
#	commands/extensions.json
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