[patch] colored filename completion

2011-05-30 Thread Raphaël
Hi, I finished 6 patches which add color to filename completions in readline. You'll find them here (651569 to 9cb76f) http://gitorious.org/drzraf/bash/commits/enhanced-completion and also attached. Most of code, more or less modified, comes from the LS_COLORS (parser / indicator selection) whi

Re: [RFC] support 'COMP_WORDBREAKS' value on a per-completion basis

2011-06-24 Thread Raphaël
On Thu, Jun 23, 2011 at 10:49:20AM -0400, Chet Ramey wrote: > On 5/30/11 2:05 PM, Raphaël Droz wrote: > > It seems like if gnu.bash@googlegroups.com eat the first occurrence > > of this email (not in the mailman archives)... second attempt: > > > > === Rationale

Re: feature request: capture output of last command and make it available on some hotkey

2013-08-13 Thread Raphaël
On Wed, Jul 31, 2013 at 11:45:37AM -0400, Greg Wooledge wrote: > On Wed, Jul 31, 2013 at 02:09:23AM +0200, Jörn Hees wrote: > > i think this would be a very useful feature and i don't seem to be alone: > > http://stackoverflow.com/questions/5955577/bash-automatically-capture-output-of-last-executed

Re: Login to remote server without coding passwords

2014-01-14 Thread Raphaël
probably out of scope of @bash, anyway: On Tue, Jan 14, 2014 at 05:08:08AM -0800, janeit...@rockingham.k12.va.us wrote: > Is there a way to log into a server without using passwords coded into > the script? Does it means that access to your script isn't safe ? Couldn't `chmod 700` do the trick in

Re: let's establish BASH_MINIMUM_TIME_BETWEEN_INTERACTIVE_COMMAND

2014-01-31 Thread Raphaël
On Thu, Jan 30, 2014 at 08:23:36PM +0800, Dan Jacobson wrote: > OK fixed spelling. > Put in .bashrc to prevent accidental execution of many line clipboard paste > dumps: > case $- in *i*) > safety_seconds=5 SECONDS=1 > PROMPT_COMMAND="if ((SECONDS==0)); then echo TOO FAST HOLMES, waiting

[RFC] support 'COMP_WORDBREAKS' value on a per-completion basis

2011-05-30 Thread Raphaël Droz
It seems like if gnu.bash@googlegroups.com eat the first occurrence of this email (not in the mailman archives)... second attempt: === Rationale: Let's say you want to complete http URL (which contain ':'). The completion probably contains this kind of statement: _comp() { COMPREPLY=

Re: [patch] colored filename completion

2011-06-25 Thread Raphaël Droz
On Tue, May 31, 2011 at 01:32:44AM +0200, Raphaël wrote: > Hi, > > I finished 6 patches which add color to filename completions in > readline. Those who tried the patch may have noticed (at least) two bugs: * non-filename completion (variable, processes, ...) was broken. I miss

Re: [patch] colored filename completion

2011-06-26 Thread Raphaël Droz
On Sat, Jun 25, 2011 at 11:56:25PM +0200, Raphaël Droz wrote: > On Tue, May 31, 2011 at 01:32:44AM +0200, Raphaël wrote: > > Hi, > > > > I finished 6 patches which add color to filename completions in > > readline. > > Those who tried the patch may

Re: [patch] colored filename completion

2011-06-26 Thread Raphaël Droz
On Sun, Jun 26, 2011 at 05:42:31PM +0200, Raphaël Droz wrote: > Attached is an updated version of "dont-bug-command-name-completion.patch". (really) attached commit b3572793f7e77bf3ccb4e58121aabe457ddbe39c Author: Raphaël Droz Date: Sat Jun 25 22:55:11 2011 +0200 Colored compl

Re: [patch] colored filename completion

2011-08-09 Thread Raphaël Droz
ping, anyone interested in reviewing/commenting on this ?

Re: [RFC] support 'COMP_WORDBREAKS' value on a per-completion basis

2011-08-22 Thread Raphaël Droz
On Thu, Jun 23, 2011 at 10:49:20AM -0400, Chet Ramey wrote: > On 5/30/11 2:05 PM, Raphaël Droz wrote: > > === Rationale: > > Let's say you want to complete http URL (which contain ':'). > > > > The completion probably contains this kind of state

completion in var=$(cmd1) cmd2

2011-12-11 Thread Raphaël Droz
Example: $ var=$(id) foo completes with completion matches from id(1) This is problematic for cases like: LD_LIBRARY_PATH=$(find ...) cmd -- where options are those from find(1). I didn't looked deeper but I guess the faulty part is in _rl_find_completion_word() which, as its name suggest, *shou

Re: [RFC] support 'COMP_WORDBREAKS' value on a per-completion basis

2011-12-24 Thread Raphaël Droz
On Mon, Aug 22, 2011 at 11:22:36AM +0200, Raphaël Droz wrote: > On Thu, Jun 23, 2011 at 10:49:20AM -0400, Chet Ramey wrote: > > On 5/30/11 2:05 PM, Raphaël Droz wrote: > > > === Rationale: > > > Let's say you want to complete http URL (which contain ':&#x

Re: in completion, $COMP_WORDBREAKS should be ignored, unless there are no matches

2012-05-25 Thread Raphaël Droz
On Wed, May 23, 2012 at 01:11:27PM +0200, Vincent Lefevre wrote: > It seems that $COMP_WORDBREAKS annoys users when filenames contain > one of its characters: [...] > Unsetting $COMP_WORDBREAKS is not a solution, as completion would no > longer work in contexts where such characters are word separ

Re: locale specific ordering in EN_US -- why is a

2012-05-25 Thread Raphaël Droz
On Mon, May 21, 2012 at 12:19:26PM -0700, Linda Walsh wrote: > So which is correct? > > Anyone wanting to reference an upper or lower case range > [a-z] or [A-Z], is gonna hurt from this. > > My OS uses "en_US.UTF-8". I don't remember this bug having been cited here: https://bugs.launchpad.net/u

devel branch build failure

2012-12-12 Thread Raphaël Droz
Hi, using the devel/ branch, linking fails with: > bashline.o: In function `attempt_shell_completion': > bashline.c:1406: undefined reference to `parser_in_command_position' > collect2: ld returned 1 exit status I tried a bissection and c84e5202 was the last one to build fine. But since f14388d

Re: devel branch build failure

2012-12-12 Thread Raphaël Droz
On Wed, Dec 12, 2012 at 09:40:29AM -0500, Chet Ramey wrote: > On 12/12/12 8:56 AM, Raphaël Droz wrote: > > Hi, > > > > using the devel/ branch, linking fails with: > >> bashline.o: In function `attempt_shell_completion': > >> bashline.c:1406: undefi

devel/ hangs in globbing

2012-12-12 Thread Raphaël Droz
Using the devel/ branch, with default options (simple ./configure), I found that *sourcing* such a script would cause bash to hang using 100% CPU. This does not happen using 4.2_p39. > #!/bin/bash > shopt -s extglob > glob='@(|))' > for i in /tmp/!($glob); do echo $i; done [ bash-completion initi

Re: devel branch build failure

2013-01-04 Thread Raphaël Droz
With latest git: When undefining DEBUG (relstatus=misc in configure.ac), the -devel branch can't build (4.3.0-devel) : > ./parse.y:2199: undefined reference to `itrace' > jobs.c:3233: undefined reference to `itrace' > jobs.c:2522: undefined reference to `itrace' > jobs.c:2745: undefined reference t

Re: devel branch build failure

2013-02-08 Thread Raphaël Droz
On Fri, Jan 04, 2013 at 07:12:49PM +0100, Raphaël Droz wrote: > With latest git: > When undefining DEBUG (relstatus=misc in configure.ac), the -devel > branch can't build (4.3.0-devel) : > > ./parse.y:2199: undefined reference to `itrace' [...] trivial patch fixes thi

4.3 compgen behavior change (quoted arg)

2013-02-13 Thread Raphaël Droz
I'm not sure whether or not this is to be expected. $ echo $BASH_VERSION 4.2.42(1)-release $ touch a.log $ compgen -f -X '!*.log' -- \'\' $ $ echo $BASH_VERSION 4.3.0(3)-devel $ touch a.log $ compgen -f -X '!*.log' -- \'\' a.log $ This kind of "quoted" call is used by bash-completion _filedi

Re: [patch] colored filename completion

2013-04-01 Thread Raphaël Droz
On Sun, Mar 31, 2013 at 02:29:22PM +0100, Gavin Smith wrote: > I wondered if there was any interest in incorporating Raphaël Droz's > patches to add colour to tab suggestions feature has been considered: it was implemented (not really "merged") in 5a3187363 ( = queu

segfault on rl_completion_matches() interrupt

2013-04-14 Thread Raphaël Droz
Using both 4.2 and 4.3, I can reproduce a segfault on completion (though not using gdb) This can happen very consistently using a time-consuming completion like the one for `man`, eg: $ man g^C Attached is the trace from a core-file using `man gpg-agent g^C` with bash 4.3. Side note: as more a

Re: COMPREPLY scope

2013-06-01 Thread Raphaël Droz
On Fri, May 17, 2013 at 02:50:09PM -0700, Mario Signorino wrote: > Another idea is to add a delimitation around the completion result: I > could trap it easily. But I did not find how do that. I thought about time some times ago. My goal was to enclose the burn-cd files completion result with a t

Re: Feature : walkthrough lines of stdout

2015-06-19 Thread Raphaël Droz
ent since here you're intending to *walk* along the (multiple) previous lines, not only splitting the last one. Still in the urxvt case, you may want to take inspiration from the url-select extension while assuming a set of word boundary characters. #! perl # Author: Raphaël Droz # Website: http