Wednesday, December 10, 2008

Re: [BLUG] December meeting?

Steven Black wrote:
> On Wed, Dec 10, 2008 at 12:52:51PM -0500, Barry Schatz wrote:
>
>> I know there are Vi keybindings in Bash, but I figured since I'm
>> switching shells anyway I might as well learn as much as I can.
>>
>
> I understand. VI-like bindings are neat, but they can mess with your
> ability to assist coworkers. (This is why I don't use a Dvorak keymap.)
>
You can rebind keys to make Vi usable in Dvorak. As soon as I get a
keyboard I don't hate, I'm switching that too.

>> Zsh has a bunch of features that I'm only getting started with. Spelling
>> correction in typed commands is one. The completion is also more
>> friendly. I'm not purging bash or anything, just trying a new shell and
>> seeing if it fits my needs better. I might even switch to Ksh someday.
>>
>
> My understanding is that on all regards ZSH is generally better than
> KSH. That's just rumor, of course, but I don't ever really hear people
> speaking highly of KSH. I only hear people using pdksh because they
> needed to use some craptastic commercial UNIX-like system which only has
> KSH. They install pdksh on the Linux machines so their users will have
> the same shell experience, and their scripts will continue working.
>
> This is a far cry from the people using ZSH. ZSH isn't the default shell
> anywhere, yet is readily available and easily portable. It is also good
> enough that it continues to thrive in a shell world where even Solaris
> has dropped the Korn Shell, and only the BSD folks still think C-shells
> are cool.
>
> In fact, I really think I've heard that ZSH can do everything KSH can do
> but better. I've also heard rumors that scripting the ZSH is less likely
> to have some of the security concerns that plague BASH. Of course, these
> are both unfounded rumors that I "heard somewhere", so I may be wrong.
>
I have heard most of these things. I also heard that it's faster in a
variety of synthetic benchmarks. There was an article in LinuxFormat (I
think it was LinuxFormat...) comparing various shells and Zsh came out
on top.

> ------------------------------------------------------------------------
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] December meeting?

On Wed, Dec 10, 2008 at 12:52:51PM -0500, Barry Schatz wrote:
> I know there are Vi keybindings in Bash, but I figured since I'm
> switching shells anyway I might as well learn as much as I can.

I understand. VI-like bindings are neat, but they can mess with your
ability to assist coworkers. (This is why I don't use a Dvorak keymap.)

> Zsh has a bunch of features that I'm only getting started with. Spelling
> correction in typed commands is one. The completion is also more
> friendly. I'm not purging bash or anything, just trying a new shell and
> seeing if it fits my needs better. I might even switch to Ksh someday.

My understanding is that on all regards ZSH is generally better than
KSH. That's just rumor, of course, but I don't ever really hear people
speaking highly of KSH. I only hear people using pdksh because they
needed to use some craptastic commercial UNIX-like system which only has
KSH. They install pdksh on the Linux machines so their users will have
the same shell experience, and their scripts will continue working.

This is a far cry from the people using ZSH. ZSH isn't the default shell
anywhere, yet is readily available and easily portable. It is also good
enough that it continues to thrive in a shell world where even Solaris
has dropped the Korn Shell, and only the BSD folks still think C-shells
are cool.

In fact, I really think I've heard that ZSH can do everything KSH can do
but better. I've also heard rumors that scripting the ZSH is less likely
to have some of the security concerns that plague BASH. Of course, these
are both unfounded rumors that I "heard somewhere", so I may be wrong.

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

Re: [BLUG] Re: December meeting

Thanks! That will be a huge help to me.

Robert Felty wrote:
>> The setting is in "~/.inputrc". I did it years ago. It looks like
>> it is documented in readline(3).
>>
>
> I have been using vi key bindings for a couple years now. I absolutely love
> them. I like that they work in python and R as well as bash.
>
> One of my favorite tricks, which works in bash (maybe zsh too) is that if you
> want to do a global change from 'foo' to 'bar' on a previous command, you can
> find the command in the history (either with the up arrow, or by searching
> with /). Then enter command mode with Esc, and hit v. A fully-fledged vi
> editor opens, and I can use the command
> :s/foo/bar/g
> Then I do
> :wq
> and the temporary vi editor closes, and the command gets executed in my bash
> shell.
>
> Rob
> --
> Robert Felty
> http://robfelty.com
>
> "Women who seek to be equal with men lack ambition."
> -- Timothy Leary
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] December meeting?

I know there are Vi keybindings in Bash, but I figured since I'm
switching shells anyway I might as well learn as much as I can.

Zsh has a bunch of features that I'm only getting started with. Spelling
correction in typed commands is one. The completion is also more
friendly. I'm not purging bash or anything, just trying a new shell and
seeing if it fits my needs better. I might even switch to Ksh someday.

-Barry

Steven Black wrote:
> On Wed, Dec 10, 2008 at 09:04:53AM -0500, Barry Schatz wrote:
>
>> Also, I switched from Bash to Zsh and started using Vi keybindings. Any
>> suggestions for how to cope with the new paradigm?
>>
>
> Just an FYI, VI keybindings are also available in GNU Bash.
>
> They're handled by the GNU Readline library, so if properly configured
> all your GNU Readline programs get VI-like bindings.
>
> The setting is in "~/.inputrc". I did it years ago. It looks like
> it is documented in readline(3).
>
> I've never used the ZSH. I have heard vague positive things about it,
> though. I'm a heavy BASH scripter (though I try to stick with DASH
> compatible scripts due to speed issues). IIRC, ZSH is a Bourne shell,
> right? I don't know how its extensions compare to the BASH extensions,
> nor do I know how it compares with speed.
>
> Cheers,
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

[BLUG] Re: December meeting

> The setting is in "~/.inputrc". I did it years ago. It looks like
> it is documented in readline(3).

I have been using vi key bindings for a couple years now. I absolutely love
them. I like that they work in python and R as well as bash.

One of my favorite tricks, which works in bash (maybe zsh too) is that if you
want to do a global change from 'foo' to 'bar' on a previous command, you can
find the command in the history (either with the up arrow, or by searching
with /). Then enter command mode with Esc, and hit v. A fully-fledged vi
editor opens, and I can use the command
:s/foo/bar/g
Then I do
:wq
and the temporary vi editor closes, and the command gets executed in my bash
shell.

Rob
--
Robert Felty
http://robfelty.com

"Women who seek to be equal with men lack ambition."
-- Timothy Leary
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] December meeting?

On Wed, Dec 10, 2008 at 09:04:53AM -0500, Barry Schatz wrote:
> Also, I switched from Bash to Zsh and started using Vi keybindings. Any
> suggestions for how to cope with the new paradigm?

Just an FYI, VI keybindings are also available in GNU Bash.

They're handled by the GNU Readline library, so if properly configured
all your GNU Readline programs get VI-like bindings.

The setting is in "~/.inputrc". I did it years ago. It looks like
it is documented in readline(3).

I've never used the ZSH. I have heard vague positive things about it,
though. I'm a heavy BASH scripter (though I try to stick with DASH
compatible scripts due to speed issues). IIRC, ZSH is a Bourne shell,
right? I don't know how its extensions compare to the BASH extensions,
nor do I know how it compares with speed.

Cheers,

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

[BLUG] December meeting?

The list has been dark for a while. Any new Linux-y things going on?

I volunteered to do a presentation for the December meeting, but I'd
like to know when that will be so I can get ready in time.

Also, I switched from Bash to Zsh and started using Vi keybindings. Any
suggestions for how to cope with the new paradigm?

-Barry Schatz
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug