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'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Syntax:
-t
sets terminal title--tab
begins a new tab within the window-e
starts 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.
bash
executes the following command with bash-c
preface to the commandThen our command in single quotes (to avoid closing the quotes from the
-e
command)End the quotes and add as many further
--tab
directives as you need.