Being lazy, I would like to chain the following two commands so that it will work with one simple bash alias.
jekyll -w serve
starts up the development server for my jekyll instance.
open "http://localhost:4000"
launches my jekyll application in my default browser.
How can I chain them together so that I can type one simple alias in my command line to serve and launch?
NOTES
Note using either
&&
or;
to chainjekyll -w serve
andopen "http://localhost:4000"
will not work because thejekyll -w serve
launches the persistent webrick process in stdout. Which means that the 2nd commandopen "http://localhost:4000"
will not be executed because the first process (webrick) never did "complete".When webrick starts, we can see a typical output as follows:-
Configuration file: /Users/calvin/work/calviny/_config.yml Source: /Users/calvin/work/calviny Destination: /Users/calvin/work/calviny/_site Generating... done. Auto-regeneration: enabled [2013-09-08 18:43:58] INFO WEBrick 1.3.1 [2013-09-08 18:43:58] INFO ruby 1.9.3 (2013-06-27) [x86_64-darwin11.4.2] [2013-09-08 18:43:58] INFO WEBrick::HTTPServer#start: pid=6183 port=4000