Re: Feature request: tab completion on functions

2018-02-01 Thread Odne Hellebø
Is it something that you will consider adding to bash? I also saw something
about the complete inbuilt command, is it possible through that?

Just to spur the competition, zsh is able to do it ;)

On 29 January 2018 at 15:05, Chet Ramey  wrote:

> On 1/28/18 8:10 PM, L A Walsh wrote:
>
> >>
> >> It's all fine. He wants case-insensitive matching, which bash can be
> made
> >> to do, and non-case-preserving completion, which readline does.
> >>
> > 
> >Bash can be made to do?  W/o new code?
>
> No, it takes a patch to enable case-sensitive matching for function
> names.
>
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
>


Re: Feature request: tab completion on functions

2018-02-01 Thread Chet Ramey
On 2/1/18 3:40 PM, Odne Hellebø wrote:
> Is it something that you will consider adding to bash? I also saw something
> about the complete inbuilt command, is it possible through that?

I already did, and the version in the devel branch can do it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



SIGSEGV: rl_redisplay: Long Directory Name with EM Dash character in Graphical Terminal

2018-02-01 Thread Kieran Grant
Hi All,

Found an interesting bug today,

GNU bash, version 4.4.18(4)-release (x86_64-unknown-linux-gnu)

When running in a graphical terminal (xterm, mate-terminal, gnome-terminal) set 
to 80x24.
I get a SIGSEGV in rl_redisplay doing the following: (Haven't managed to do it 
on a Virtual Console)

mkdir 
/tmp/XX–X
cd 
/tmp/XX–X

NOTE: That is an EN Dash, not a hyphen.

Building from git (CFLAGS=-g ./configure --enable-static-link) run under gdb in 
such a terminal:
$ gdb ./bash
GNU gdb (Ubuntu 8.0.1-0ubuntu1) 8.0.1
...
(gdb) run
$ mkdir 
/tmp/XX–X
$ cd 
/tmp/XX–X

Program received signal SIGSEGV, Segmentation fault.
0x004bd03b in rl_redisplay () at display.c:823
823   inv_lbreaks[++newlines] = temp;
(gdb) bt
#0  0x004bd03b in rl_redisplay () at display.c:823
#1  0x004a858c in readline_internal_setup () at readline.c:443
#2  0x004a8a1f in readline_internal () at readline.c:669
#3  0x004a8452 in readline (prompt=0x872208 "j\001") at readline.c:376
#4  0x00407987 in yy_readline_get () at 
/usr/homes/chet/src/bash/src/parse.y:1456
#5  0x00407a9c in yy_readline_get () at 
/usr/homes/chet/src/bash/src/parse.y:1487
#6  0x004078d2 in yy_getc () at 
/usr/homes/chet/src/bash/src/parse.y:1390
#7  0x004087c6 in shell_getc (remove_quoted_newline=1) at 
/usr/homes/chet/src/bash/src/parse.y:2299
#8  0x00409d31 in read_token (command=0) at 
/usr/homes/chet/src/bash/src/parse.y:3115
#9  0x004092c9 in yylex () at /usr/homes/chet/src/bash/src/parse.y:2675
#10 0x00404425 in yyparse () at y.tab.c:1834
#11 0x00403fd8 in parse_command () at eval.c:261
#12 0x004040be in read_command () at eval.c:305
#13 0x00403cee in reader_loop () at eval.c:149
#14 0x004017c6 in main (argc=1, argv=0x7fffddc8, 
env=0x7fffddd8) at shell.c:792

My host is Ubuntu 17.10, 64-bit Ubuntu shipped kernel 4.13.0-32-generic.

Regards,
Kieran



SIGSEGV: rl_redisplay: Directory with EM Dash

2018-02-01 Thread Kieran Grant
Hi, 

I'm Re-sending using bashbug (though sent through Thunderbird :/) after I've 
subscribed to mailing-list, appears my first message didn't go through

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' 
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -I/home/kieran/include 
-I/usr/local/include -g -Wno-parentheses -Wno-format-security
uname output: Linux kieran-desktop 4.13.0-32-generic #35-Ubuntu SMP Thu Jan 25 
09:13:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 4.4
Patch Level: 18
Release Status: release

Description:
When running in a graphical terminal (xterm, mate-terminal, gnome-terminal)
when set to 80x24.
I get a SIGSEGV in rl_redisplay when changing to a long path name with an
EN/EM Dash in it.
It doesn't have to be one long directoy, just seems the total path has to
match length (including "/tmp/" and have an EN Dash or EM Dash

mkdir /tmp/X\
X\
–X
cd /tmp/X\
X\
–X

Built from git tree with CFLAGS=-g ./configure --enable-static-link.
Running under gdb:
$ gdb ./bash
GNU gdb (Ubuntu 8.0.1-0ubuntu1) 8.0.1
...
(gdb) run
$ mkdir 
/tmp/XX–X
$ cd 
/tmp/XX–X

Program received signal SIGSEGV, Segmentation fault.
0x004bd03b in rl_redisplay () at display.c:823
823   inv_lbreaks[++newlines] = temp;
(gdb) bt
#0  0x004bd03b in rl_redisplay () at display.c:823
#1  0x004a858c in readline_internal_setup () at readline.c:443
#2  0x004a8a1f in readline_internal () at readline.c:669
#3  0x004a8452 in readline (prompt=0x872208 "j\001") at readline.c:376
#4  0x00407987 in yy_readline_get () at 
/usr/homes/chet/src/bash/src/parse.y:1456
#5  0x00407a9c in yy_readline_get () at 
/usr/homes/chet/src/bash/src/parse.y:1487
#6  0x004078d2 in yy_getc () at 
/usr/homes/chet/src/bash/src/parse.y:1390
#7  0x004087c6 in shell_getc (remove_quoted_newline=1) at 
/usr/homes/chet/src/bash/src/parse.y:2299
#8  0x00409d31 in read_token (command=0) at 
/usr/homes/chet/src/bash/src/parse.y:3115
#9  0x004092c9 in yylex () at /usr/homes/chet/src/bash/src/parse.y:2675
#10 0x00404425 in yyparse () at y.tab.c:1834
#11 0x00403fd8 in parse_command () at eval.c:261
#12 0x004040be in read_command () at eval.c:305
#13 0x00403cee in reader_loop () at eval.c:149
#14 0x004017c6 in main (argc=1, argv=0x7fffddc8, 
env=0x7fffddd8) at shell.c:792

Repeat-By:
Open Graphical Termianl to 80x24 in size.
mkdir /tmp/X\
X\
–X
cd /tmp/X\
X\
–X