Re: Bash-4.3-beta2 available for FTP

2013-10-16 Thread Lionel Cons
On 15 October 2013 22:44, Joshuah Hurst  wrote:
> On Tue, Oct 15, 2013 at 10:36 PM, Chet Ramey  wrote:
>> On 10/15/13 4:27 PM, Joshuah Hurst wrote:
>>
> What happened to the patch for cd -@ to handle NFSv4+Windows alternate
> streams? ksh93 already has this feature since quite some time and
> they're now even extending support even further to the builtin POSIX
> commands...
>>
>> I have not added it to bash yet.
>
> How long does it take?
>
>>

 Do you mean cd -@ as this one in ksh?
 - - - - - - - -
   -@  Change into the hidden attribute directory of directory 
 which
   may also be a file. CDPATH is ignored. Hidden attribute
   directories are file system and operating system 
 specific.
 - - - - - - - -

 That would be great. Where's the patch?
>>>
>>> Just to be sure, this does use the extended attributes with O_XATTR, right?
>>
>> Yes, Cedric's patch uses O_XATTR.
>
> *Great*! :)
>
> Chester/Cedric: Can you send the patch around so we can ask the Debian
> GNU/kOpenSolaris, Solaris and Illumos folks to integrate the patch in
> their next bash patch update, please?

Chet: We're interested in the patch, too. We're actively use and rely
on NFSv4 extended attributes for two of our main projects and I'd like
to have a 2nd source of this feature. Primarily we use ksh93, perl and
HPC applications for this but I'd like to have a fallback option for
ksh93 for now.

Lionel



can't just hold down ^K to clean up history

2013-10-16 Thread jidanni
Let's say one accidentally pastes a many lines of some email into a bash
window.

Yes bash tries to execute each line. Can't blame it.

But now we are faced with cleaning the mess out of history.

We use ^P^P^P^P^P^P^P... to finally get to the top of the mess.

Then we must use ^K^N^K^N^K^N^K^N^K^N^K^N... to clean it up.

However this leaves many blank lines in history!

Also why can't we just hold down ^K^K^K^K^K^K^K^K^K ?



Re: can't just hold down ^K to clean up history

2013-10-16 Thread Greg Wooledge
On Wed, Oct 16, 2013 at 08:53:27PM +0800, jida...@jidanni.org wrote:
> We use ^P^P^P^P^P^P^P... to finally get to the top of the mess.

... why would you do that?  Also, how is this a bug?

> Then we must use ^K^N^K^N^K^N^K^N^K^N^K^N... to clean it up.
> 
> However this leaves many blank lines in history!

Why not just edit the history FILE after you've exited the shell (or
issued a "history -a" command, or something)?  Then you can use whatever
editing method is most convenient.



Re: can't just hold down ^K to clean up history

2013-10-16 Thread Chris Down
On 2013-10-16 20:53, jida...@jidanni.org wrote:
> Let's say one accidentally pastes a many lines of some email into a bash
> window.

Firstly: you should be careful not to do that.

> Yes bash tries to execute each line. Can't blame it.

Well, it's the expected behaviour. Bash doesn't know the difference between
what you paste, and what you input explicitly (with the exception of if your
terminal support bracketed paste, but I only know of zsh implementations of
that functionality).

> But now we are faced with cleaning the mess out of history.
>
> We use ^P^P^P^P^P^P^P... to finally get to the top of the mess.
>
> Then we must use ^K^N^K^N^K^N^K^N^K^N^K^N... to clean it up.
>
> However this leaves many blank lines in history!

You just blanked the lines, you didn't delete them.

> Also why can't we just hold down ^K^K^K^K^K^K^K^K^K ?

Why do you expect to be able to do that? C-k in readline deletes to the end of
the current line. There's no reason why it should also get the next line.

If you want to do this:

history -a
"$EDITOR" "$HISTFILE"  # go fix it
history -c
history -r


pgpR8f10UESiy.pgp
Description: PGP signature


Re: can't just hold down ^K to clean up history

2013-10-16 Thread jidanni
>> Also why can't we just hold down ^K^K^K^K^K^K^K^K^K ?

CD> Why do you expect to be able to do that? C-k in readline deletes to the end 
of
CD> the current line. There's no reason why it should also get the next line.

Ah ha, but there is also no reason why it should not!

I hereby propose that it should.

Let's compare emacs,

kill-line is an interactive compiled Lisp function in `simple.el'.

It is bound to C-k, .

(kill-line &optional ARG)

Kill the rest of the current line; if no nonblanks there, kill thru 
newline...

To kill a whole line, when point is not at the beginning, type C-a C-k C-k.

If option `kill-whole-line' is non-nil, then this command kills the whole 
line
including its terminating newline, when used at the beginning of a line
with no argument.  As a consequence, you can always kill a whole line
by typing C-a C-k.

and

kill-whole-line is a variable defined in `simple.el'.
Its value is t
Original value was nil

Documentation:
If non-nil, `kill-line' with no arg at start of line kills the whole line.

Anyway, this all boils down to holding down the ^K for rapid munching of
more than one line, please. Yes, ^P still needed, Greg, but one could
fix up the mess totally via the keyboard, with no need for risky file maneuvers.