permanent alias with Mac OSX
By mauede at Sat, Jan 23 2010 12:45pm |
Setting up aliases is easy. But I haven't found any way to make them available anywhere from any new terminal shell.
That is, to make them permanent.
I remember inserting aliases definition in a hidden file named ".bashrc" or ".login" or ".profile", available in the user's directory.
Such a file was a shell script run at any login.
On Mac I browsed through my "~" directory and found non of the above mentioned files.
How can I create system-wide aliases on Mac ?
Thank you in advance,
--
Maura E.M




.bashrc
If you are using bash, it indeed sources ~/.bashrc on start. If the file is not yet there, you can simply create it with a text editor and add your alias definitions.
Hidden files
Apologies if I'm stating the obvious.
Files proceeded by a period "." are not visible from the Finder, you can either use the Terminal (ls -a), install TinkerTool that allows you view hidden files in the Finder or use an editor like BBEdit which has an "Open Hidden Files" option.
Not sure what you mean by system-wide? Usually each user has their own .bash_profile.
EDE and editors on OS
Many thanks for your explanations and hints.
Actually I use the line command (ls -la) most of the time.
Since you mentioned an editor ... I dare ask for a piece of advice about a friendly Development Environment with a good syntax-sensitive editor for Mac OSX. XCode is not as easy and friendly like for instance UltraEdit is on Windows. On Linux I have used KDevelop and I was helped at configuring it as it is not trivial for me.
Thank you vary much,
Maura E.
Re: EDE and editors on OS
A lot of people use TextMate and really like it. Another I've heard about, but never used is BBEdit. I'm an Xcode user, and love it, but I also understand if it's overkill or somewhat confusing.
Dave
Editors
I use BBEdit a lot, but I do a lot of cut and pasting/editing of scripts (shell, perl, etc...) rather than using it for programming. The support is excellent and there are a huge number of users with decades of experience to provide snippets to code.
IDEs
In addidion to the above, Eclipse and Netbeans come to my mind, in case you are looking for a full-blown IDE. If you rather want something like a "programmers editor", Aquamacs (emacs for OSX) and Textwrangler come to my mind.
The choice of editor/IDE of course largely depends on which programming languages you want it to support, and on personal taste. I have used eclipse a lot under Linux, and liked it a lot. On the Mac, I've found its behaviour too sluggish for my taste, and it also does not support Mach-64 binaries yet (at least did not support it until a few months ago). Meanwhile I learned to like XCode a lot (which I didn't like at all in the beginning).
Editors on OS X
I second the recommendation for TextMate, although it's shareware. There are academic/student discounts available. I know of many people who also like SubEthaEdit (also shareware) and Smultron (free, but no longer in active develoopment). Editra (free, open source) also looks intriguing.
I assume you're aware of the bevy of standard open source editors (vi, emacs, etc.) as ell.