#!/bin/bash if [ -e $1 ] then open -a /Applications/Utilities/SubEthaEdit.app $1 else touch $1 open -a /Applications/Utilities/SubEthaEdit.app $1 fiIt assumes you have SubEthaEdit in your Utilities directory, obviously. Call it "see", make it executable, put it in your $PATH somewhere, and let BBEdit gather dust... :-)
SubEthaEdit
Bonjour-based, collaborative text editor.
Version: 3.5.2
Command line tool
Feedback Type: Usage Tip
Contributed by: Chris Knight Monday, May 17 2004 @ 04:14 PM PDT
Product Platform: MacOSX
Used Product For: Over One Year
Recommend Product: YES
Since the only reason I would use bbedit instead of SEE is the command line tool, I wrote the following:
Comments
Command line tool - sooloo
All you really need is an alias in your shells rc file:alias see open -a SubEthaEdit
Tuesday, May 18 2004 @ 07:39 AM PDT
Command line tool - wgscott
No, that misses the point. If you issueopen -a SubethaEdit foo.txt
and foo.txt doesn't exist, it will fail.
The "touch" creates foo.txt first, and then an empty window with that title appears, allowing you to create files in the manner of other unix editors like vi(m) and emacs.
A further tweak is to open the file with sudo if you are not the owner, allowing you to edit system files (after authenticating). This you HAVE to do with the originally posted syntax.
What I posted is just an elaborate superset of this.
Tuesday, May 18 2004 @ 09:40 AM PDT
Command line tool - quentinsf
The real limitation with this is for scripts etc that need to know when you've finished editing the file, so they can carry on. Anyone got a good solution for this with SEE?Sunday, August 01 2004 @ 03:52 AM PDT
Command line tool - wgscott
And if for some reason that isn't enough:http://www.chemistry.ucsc.edu/%7Ewgscott/xtal/functions/edit
Reply to This
Monday, May 17 2004 @ 04:38 PM PDT