bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

readline in read -e and dynamic-complete-history problems


From: lists-general
Subject: readline in read -e and dynamic-complete-history problems
Date: Tue, 9 Sep 2008 21:05:41 -0700 (PDT)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: netbsdelf
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='netbsdelf' -DCONF_MACHTYPE='i386--netbsdelf' -DCONF_VENDOR='' 
-DLOCALEDIR='/usr/pkg/share/locale' -DPACKAGE='bash' -DSHELL  -DHAVE_CONFIG_H   
-I.  -I. -I./include -I./lib  
-DDEFAULT_PATH_VALUE=/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin -I/usr/include 
-O2 -I/usr/include
uname output: NetBSD glacier.mikecappella.com 4.0_RC1 NetBSD 4.0_RC1 
(GENERIC.MP) #0: Sat Sep  1 15:50:48 PDT 2007  
address@hidden:/home/builds/ab/netbsd-4-0-RC1/i386/200709011431Z-obj/home/builds/ab/netbsd-4-0-RC1/src/sys/arch/i386/compile/GENERIC.MP
 i386
Machine Type: i386--netbsdelf

Bash Version: 3.2
Patch Level: 33
Release Status: release

Description:
readline does not work correcly when used in read -e.  The following program 
shows
that read -e does not perform history completion correctly.

---
    #!/bin/bash

    set -o emacs
    bind 'set show-all-if-ambiguous on'
    bind 'set completion-ignore-case on'

    #bind TAB:menu-complete
    bind 'TAB:dynamic-complete-history'

    urls="http://example.com http://sample.net http://example.us 
http://example.net";
    for i in $urls ; do
        history -s $i
    done

    echo $urls
    compgen -W "$urls" http://sa
    read -e -p "What? " arg1
---

previous-history and next-history works, but Tab completion only works for the
to the first instance.  And dynamic-complete-history or show-all-if-ambiguous
do not work.

Repeat-By:
Run the above program.  Hit Tab, note the partial completion to the first
ambiguous portion of the history.  Type any letter to from the urls list to
disambiguate and hit Tab again.  No additional completion occurs.

Also, try ^N or ^P to cycle through the history list.  Then backspace,
and Tab to complete.  Once again, Tab does not complete.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]