Wednesday, December 10, 2008

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

Wednesday, November 26, 2008

Re: [BLUG] Trick for picture sets in Pictures Folder screensaver

I would agree -- I found myself going back to the plain ol' xscreensaver for the most part.
gnome-screensaver has a lot of "undocumented" knobs though. Try searching for gnome pictures folder screensaver or some such (GIYF) and I am sure you might find a way to change the destination of the pictures folder too.

I have started using XFCE of late. It's fast , responsive and yeah, it works for me.
 -- Abhishek

On Wed, Nov 26, 2008 at 11:47 AM, Steven Black <blacks@indiana.edu> wrote:
On Wed, Nov 26, 2008 at 04:48:05PM +0000, Mark Krenz wrote:
>   So in the Pictures directory you may have a directory for family
> pictures, one for pictures of airplanes, one for pictures of space and
> so on.  Just made all the directories mode 000 and then set the
> directory that you are in the mood for to 755.

<gnome-bashing>
While I do not doubt this is a very useful trick, in my mind this just
helps reinforce the idea that the GNOME ultra-lack of preferences does
nothing to actually increase the usability of GNOME or of Linux. It
makes me glad to use KDE, where even the "blank" screensaver has a
useful configuration option (the color to blank to).
</gnome-bashing>

I wanted to add that if you're inexperienced, playing with permissions
can create problems. (Shoot, even knowledgeable, trained professionals
sometimes seriously shoot themselves in the foot by playing with
permissions.)

It is one reason I think anyone using a primary group of 'users'
for their user community needs to rethink things. It is easier to
maintain security by using a umask of 002, using an individual
primary group, and using g+s on folders containing shared-group
content. (This is referred to as "User Private Groups (UPG)". See
http://lists.debian.org/debian-user/1994/03/msg00105.html for why Debian
made this the default for their distribution.)

Any solution which doesn't involve changing permissions is generally
better than one that does.

Cheers,

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


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJLZm33nFUM4WW+o4RAgzHAKClb/FTH0sU8ruegltqcsEqVqMdkgCeNu7k
jTZfa8nOgr0iimoxtGA0Ioo=
=CPnU
-----END PGP SIGNATURE-----

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