by adventureloop · 12y ago · 0 comments
$ open filename.png
$ open .
$ open -e filename.txt
$ open -a Pixen filename.png
The first command will open the file with the default application.Open . will open the current directory in finder, which I find very helpful.
The -e flag will open the file in textedit.
The -a will open the file in the given application name.
On Windows the equivalent is start (e.g. start C:\ )
start C:\Doc
Next, hit tab to get start "C:\Documents and Settings"
Now, hit return, and watch a new command window open with title "C:\Documents and Settings".Reason? If the first argument is a quoted string, it is used as the title of the window being opened (http://www.microsoft.com/resources/documentation/windows/xp/..., http://stackoverflow.com/questions/154075/using-the-dos-star...)
If you ever use start in batch scripts, pass a dummy first argument of ""
explorer "C:\Documents and Settings"
does what you'd expect. $ echo "alias o='xdg-open'" >> ~/.bashrc $ qlmanage -p <file> $ qlmanage -p <file> &>/dev/null