April 20, 2005

Three Quick Tips

position: fixed; doens’t work in IE. But there are work-arounds to emulate the fixed effect. Read the whole thing, especially the part about how to work around breaking scroll wheels.

Most of the [OS X Terminal shortcuts] are really entry tips. But there a couple of nuggets in there. CTRL-K (erasing from the cursor to the start of the command line) is a good one I wasn’t aware of before. And if you don’t know about TAB, then learn that one. I use that more than any other Terminal Command.

And since we’re talking about the OS X Terminal, I’d have to include the link to the post about the Top Ten Mac OS X Tips for Unix Geeks.

Post Info

Tagged As CSS

Comments are Open (7)

Posted at 12:23 PM

Comments

chet

The contrl-k thing is actually an old EMACS keystroke. Control-A takes yout ot he head of the line, too.

Tab-completion is going to be (mostly) limited to folks who have upgraded to Panther; the default shell for Panther is bash, which includes the tab completion feature, but the prior OS X versions used a shell without it (tcsh).

Tony

You're right. But I also found that anyone that wants a terminal window is gonna see tcsh and switch it as quick as they can to bash. And switching the default shell is pretty straightforward.

As for the Emacs.... well, I'm a vi guy. So now I hate those shortcuts.

novarese

I believe that ctrl-k is originally from csh, and predates emacs.

Tony

tsch commands (http://www.ss64.com/osx/index.html) is a nice listing for those still using tsch.

But I think the general consensus is that bash is the way to go.

novarese

ksh is at worst equal to bash in every respect and vastly superior in many, especially in portability and use for scripting. ksh offers more powerful and versitile command line editing (many assume that the vi edit mode is the only one available in ksh, but emacs mode is what bash's command line editing is actually based on). ksh also has big advantages in scripting with features like coprocesses (which I think can be crudely emulated in bash now), associative arrays, and some other obscure stuff.

For day to day interactive use there's little difference. Either ksh or bash is a much better choice than any csh variant.

Tony

I don't even really know why I'm espousing about various shells. I'm _not_ a *NIX programmer of any sorts.

I mean, I've never even heard of ksh.

novarese

ksh is the Korn Shell, written by David Korn at Bell Labs. It's based on the Bourne Shell (sh), the original unix shell, which bash is also based on (bash is the Bourne Again SHell). csh and tcsh are vastly different creatures, spawned from Bill Joy of UFS, vi, and Sun fame. csh has c-like syntax for its scripting, hence the name.

bash and ksh are, for most users, interchangable. bash is licensed under the GPL while ksh is licensed under the CPL (which is also considered an "open source" licnese). Until recently, though, ksh was not open source so there was a clear ideological advantage for bash (at least for some users).

FWIW, I use vi for editing, but I use emacs editmode in ksh interactive.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Search
Comments on this post
Categories
Info
Tony Stephens
Copyright © 1995-2005
Site Version:
10
Licensed:
Creative Commons
Validate:
XHTML, CSS, 508, RSS
Subscribe
Blog-Fu, Link-Fu