How to reassign default editor for different file types from the command line? I am looking for a way to reassign default editor on OS X. For example I want to reassign all file types opened by TextEditor with TextWrangler.

Probably it has something to do with the defaults command but I do not know how to list current assignments and change them.
There is a command line utility called Duti which can do this.

http://duti.sourceforge.net/

There is no easy way to do this using built-in commands.