[TxMt] open in Desktop and html files with spaces
Allan Odgaard
throw-away-1 at macromates.com
Tue Dec 13 15:18:45 UTC 2005
On 13/12/2005, at 15:37, salvo wrote:
> ok, but if an html page has spaces in the filename (I know this is
> not correct) the above command doesn't work.
>
> Is it normal?
> How to correct it, please?
Spaces needs to be percent-escaped. You can change the command to:
file=${TM_FILEPATH#$HOME/Desktop}
open "http://localhost/desktop${file// /%20}"
First we strip the $HOME/Desktop prefix (store the result in $file),
then we do a global substitution when using $file.
More information about the textmate
mailing list