Launch UE from Terminal

A place for users to discuss the Mac-based version of UltraEdit.

Launch UE from Terminal

Postby rjkantor » Fri Jan 07, 2011 10:15 pm

I would like to be able to launch UE from the terminal windows. How do I set an alias so that I can invoke UE from a command line?

Thanks,
Rob
rjkantor
Newbie
 
Posts: 4
Joined: Fri Jan 07, 2011 10:10 pm

Re: Launch UE from Terminal

Postby DaveS » Sat Jan 08, 2011 11:58 am

Can you provide more information as to why you'd want to do this?
Remember TERMINAL is a character based interface, and UltraEdit is a GUI
User avatar
DaveS
Basic User
Basic User
 
Posts: 39
Joined: Wed Oct 27, 2010 8:49 am
Location: San Diego, California

Re: Launch UE from Terminal

Postby rjkantor » Sat Jan 08, 2011 1:27 pm

Dave -

Thanks for your response. I am aware of the differences between terminal mode and GUI. I am in need to navigate via terminal to edit the configuration files for MySQL and PHP and other configuration type of files which are more easily navigated via terminal than through the finder. I would like to then invoke a command like, sudo UEM <filename> ; which would then invoke the UE editor with my text file ready for editing. I know this type of functionality is available with other editors and would like assistance in the proper way to implement for UEM.

Rob
rjkantor
Newbie
 
Posts: 4
Joined: Fri Jan 07, 2011 10:10 pm

Re: Launch UE from Terminal

Postby rjkantor » Sat Jan 08, 2011 2:20 pm

Here is what I have done to enable launching of UEM from the terminal.

I edited .profile in my home directory and add the following line.

alias uem="open -a /Applications/Ultraedit.app/Contents/MacOS/UltraEdit"

This creates an alias of uem which launches the GUI editor.

You can put the file after uem to have that file loaded for example, uem .profile, will open the .profile file in UEM.

I hope this helps others out there for more info check out this link: http://osxdaily.com/2007/02/01/how-to-l ... -terminal/

Rob
rjkantor
Newbie
 
Posts: 4
Joined: Fri Jan 07, 2011 10:10 pm

Re: Launch UE from Terminal

Postby complexmath » Mon Jan 10, 2011 2:53 pm

One feature I miss from TextMate is the ability to open a list of files without loading any into the editor. For example, if I type "mate *" it basically creates a project on the fly containing everything in and below the current directory. This is much nicer than manually creating a project for the same files in UE.

I don't understand the objection to launching UE from a terminal window. It's basically the only way I ever launch editors. The better command-line support UE and UC have the better, IMO. I can't wait for a UC port so I can use it as the default diff tool for SVN and other source-code management systems.
complexmath
Newbie
 
Posts: 6
Joined: Mon Nov 01, 2010 4:08 pm

Re: Launch UE from Terminal

Postby rjkantor » Mon Jan 10, 2011 11:00 pm

I use deltawalker on the Mac. I use UC on my PCs.
rjkantor
Newbie
 
Posts: 4
Joined: Fri Jan 07, 2011 10:10 pm

Re: Launch UE from Terminal

Postby cknell » Wed Jan 19, 2011 4:26 pm

I'll use this until I find a way to see hidden files in the UE file open dialog. The only other way I've found is to set the environment so that no files are hidden. That is less satisfying than the method described here. Does anyone know a way to force UltraEdit to show hidden files?
User avatar
cknell
Newbie
 
Posts: 3
Joined: Wed Apr 06, 2005 11:00 pm

Re: Launch UE from Terminal

Postby CodeCavalier » Tue May 10, 2011 2:41 am

complexmath wrote:I don't understand the objection to launching UE from a terminal window. It's basically the only way I ever launch editors.

I just switched from PC to Mac. Primarily, I did so because I have become very familiar with Unix over the years, and OS X, being built on BSD, is also evolving to be more Unix-ish. (Oh, and Windows is evolving to be more LAME.)

Anyway, I think the objection stems from the classic Mac users, who fear using Terminal, and who resist the "PC-ification" of OS X, not realizing that it's actually a movement towards Unix/Linux. There is a growing trend of Linux types who are embracing Mac these days, and we're bringing our Shell along with a vengeance! I think the Mac landscape has room enough for both paradigms.
CodeCavalier
Newbie
 
Posts: 5
Joined: Mon May 09, 2011 5:24 pm

Re: Launch UE from Terminal

Postby rogowar » Wed Aug 15, 2012 2:30 pm

There are at least a few ways of going about this. First is an alias, which has already been covered:

Code: Select all
alias ue='open -a UltraEdit.app '

The other trick is to make a link from somewhere in your path to the UltraEdit program inside the .app folder. This is what I did:

Code: Select all
sudo ln -s /Applications/UltraEdit.app/Contents/MacOS/UltraEdit /usr/local/bin/ultraedit

You'll want to specify a background process unless you want the terminal hanging. I've found it easier, typically, to use the alias.
User avatar
rogowar
Newbie
 
Posts: 4
Joined: Mon Aug 09, 2004 11:00 pm

Re: Launch UE from Terminal

Postby spelc » Wed Oct 31, 2012 1:24 pm

This is more a question about running a shell command from our compilers to call UEM. Getting UEM to load works as already described, but we always have to use the expanded name. If we use the command line as described for the Linux version, we get a new instance of UEM for each call. Is there a way to force a single instance?

Stephen
spelc
Newbie
 
Posts: 1
Joined: Wed Oct 31, 2012 1:19 pm

Re: Launch UE from Terminal

Postby deeptinker » Mon Dec 03, 2012 8:18 pm

spelc wrote:... Is there a way to force a single instance?

Stephen


There is an option in preferences in the Windows version of UE. Evidently that option has not yet been ported.

You may want to send a note to UE support requesting that option to be ported sooner rather than later. :)

Travis
User avatar
deeptinker
Basic User
Basic User
 
Posts: 14
Joined: Fri May 06, 2005 11:00 pm


Return to UltraEdit for Mac General Discussion