Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm able to open a file form Terminal with

open -b com.barebones.textwrangler whicheverfile

The problem is if any window of Textwrangler window is already is open, this file is open in that window. I want to keep enable preference option 'New & opened documents: Open in front window' while opening through Finder. Is there any terminal arguments which I can provide with above command to override the set preference?

share|improve this question
up vote 0 down vote accepted
open -b com.barebones.textwrangler -n whicheverfile

-n opens in a new instance. you can check out all of the options with

open --help

EDIT: open will duplicate items. Use

edit --new-window whicheverfile 

or if you want multiple files

edit --separate-windows file1 file2
share|improve this answer
    
It still opens the file into already opened window, even though a new instance of textwrangler is invoked. – Saneef Jan 4 '12 at 2:44
    
very strange. Try using edit, which uses textwrangler: edit --new-window whicheverfile or if you want multiple files edit --separate-windows whicheverfiles – tophersmith116 Jan 4 '12 at 3:30
    
Yes, I started using 'edit' with bash wrapper. I was using Textwrangler from App Store. So had to download and install Textwrangler Command-Line Tools Installer from barebones.com/support/textwrangler/index.html to make this work. – Saneef Jan 4 '12 at 12:47
    
oh interesting. I though textwrangler was still only downloaded separate from the appstore. So did the edit command answer your question? – tophersmith116 Jan 4 '12 at 17:37
    
yes, it did. I can accept the answer if you could update the answer also with 'edit' command. Cheers. – Saneef Jan 4 '12 at 19:31

I still had the problem of the file "opening" in the existing window until I realized that the file was opened there before I executed the command. When I closed the file from the existing window and reexecuted the command, it opened in a new window.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .