It's a hidden preference. Run this command in Terminal:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
You'll have to restart Safari for the preference to take effect.
Here's how to change Safari's general settings to open new URLs in new tabs:
Make Safari open new links in existing windows as a tab, rather than a new window
I don't know if there's a way to do it by specifying an option at the command line.
EDIT: If you'd rather not change your Safari preferences for some reason but still want to be able to open new URLs in tabs from the command line, you could create an AppleScript like this:
-- ~/Library/Scripts/newtab.scpt (or whatever name you'd like)
-- _argv will be the URLs given at the command line
on run _argv
try
tell application "Safari" to activate
--repeat for each URL
repeat with _i from 1 to length of _argv
-- Copy URL to clipboard
tell application "Safari" to set the clipboard to item _i of _argv
-- Tell Safari to open a new tab, paste the URL, and "hit" Return
tell application "System Events"
tell process "Safari"
tell menu bar 1 to click menu item "New Tab" of menu "File" of menu bar item "File"
tell menu bar 1 to click menu item "Open Location…" of menu "File" of menu bar item "File"
tell menu bar 1 to click menu item "Paste" of menu "Edit" of menu bar item "Edit"
key code 36
end tell
end tell
end repeat
end try
end run
and define an alias (or shell function, or shell script, or whatever) like this:
alias openurl="osascript ${HOME}/Library/Scripts/newtab.scpt"
and then use it like this:
openurl superuser.com stackoverflow.com serverfault.com
It's kind of ugly, but it should get the job done. I think. Unless you're really smitten with open
.
Best Answer
I would suggest using the add-on Glims from MacHangout.com
For a more in depth answer, please see the question you referenced and my answer there for that most "closely related" question. I did include in my answer there another suggestion relevant to the discussion spawned from the other (tog22's) answer, but I do think your question is basically the same as the 'original' question asked there.