hi, I'm a bit confuse with the shell command to allow preview HTML page with browser instead of Web Preview. I'm not familiar enough with Terminal to "experiment". when I paste: sh ~/Documents/Scripts/browser.sh ... I go nowhere. I would greatly appreciate someone's help on that, including the command line to get a choice between Safari or Firefox. -- cheers
24 mar 2008 kl. 13.02 skrev pascal@g:
hi, I'm a bit confuse with the shell command to allow preview HTML page with browser instead of Web Preview. I'm not familiar enough with Terminal to "experiment". when I paste: sh ~/Documents/Scripts/browser.sh ... I go nowhere. I would greatly appreciate someone's help on that, including the command line to get a choice between Safari or Firefox.
I don't know what the browser.sh script does, but what you do is starting a new shell and let it parse whatever is in the script, when the browser.sh script ends, sh will terminate and you'll be back where you started. If that script for instance change to another directory it will only be done within the new shell and you won't see anything.
You'll get a much better idea of what the browser.sh script does and what it expects for command line etc. if you open it in you favorite test editor (whichever that might be...) and try to read it, scripts are usually commented and that might make some sense. It would be much easier to help you if you told us where you got that script and where you downloaded it from. I've never heard of it, but that doesn't say much.
HTH.
/Jonas
hi Jonas I was refering to this:
http://wiki.macromates.com/Main/Howtos#SafariPreview
... found in Textmate wiki. I literally copied the shell script presented here, and inserted the path to it on my system, adding "sh" at front, which looked like this:
sh me/Documents/Scripts/browser.sh
-- cheers, Pascal
On 27/03/2008, at 4:30 AM, Jonas Steverud wrote:
24 mar 2008 kl. 13.02 skrev pascal@g:
hi, I'm a bit confuse with the shell command to allow preview HTML page with browser instead of Web Preview. I'm not familiar enough with Terminal to "experiment". when I paste: sh ~/Documents/Scripts/browser.sh ... I go nowhere. I would greatly appreciate someone's help on that, including the command line to get a choice between Safari or Firefox.
I don't know what the browser.sh script does, but what you do is starting a new shell and let it parse whatever is in the script, when the browser.sh script ends, sh will terminate and you'll be back where you started. If that script for instance change to another directory it will only be done within the new shell and you won't see anything.
You'll get a much better idea of what the browser.sh script does and what it expects for command line etc. if you open it in you favorite test editor (whichever that might be...) and try to read it, scripts are usually commented and that might make some sense. It would be much easier to help you if you told us where you got that script and where you downloaded it from. I've never heard of it, but that doesn't say much.
HTH.
/Jonas
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 24 Mar 2008, at 13:02, pascal@g wrote:
hi, I'm a bit confuse with the shell command to allow preview HTML page with browser instead of Web Preview. I'm not familiar enough with Terminal to "experiment".
There is a more updated command already part of the HTML bundle (Open Document in Running Browser(s)).
It requires you to setup the TM_PROJECT_SITEURL environment variable¹ to where the browser can reach the files under your project — the relative path to the project folder will be appended to this path.
¹ http://macromates.com/textmate/manual/environment_variables
thanks Allan but still not clear what to do with TM_PROJECT_SITEURL which value shall I set it to? (I am referring to TM/Preferences/Shell Variables)
from what I read in the Bundle, I would need to set a value per project. Is that true? -- cheers, Pascal