Last active
August 29, 2015 14:05
-
-
Save M1ke/a1ef39d6f4f9b22e72eb to your computer and use it in GitHub Desktop.
Gnome terminal watch tabs. A quick way to open a new terminal with multiple tabs for watch commands (specifically used in this case because the ruby-sass plugin for gulp is really slow).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| gnome-terminal -t "watch" --tab -e "bash -c 'gulp watch'" --tab -e "bash -c 'compass watch'" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Syntax:
-tsets terminal title--tabbegins a new tab within the window-estarts a command in the tab (quoted)In order to not run the command (e.g. "gulp watch") and have the terminal close we need to then run bash around the command.
bashexecutes the following command with bash-cpreface to the commandThen our command in single quotes (to avoid closing the quotes from the
-ecommand)End the quotes and add as many further
--tabdirectives as you need.