Results 1 to 7 of 7

Thread: How can have same as knoppix bash auto-complete function

  1. #1
    Senior Member registered user
    Join Date
    Jun 2003
    Location
    Piraeus / Hellas
    Posts
    121

    How can have same as knoppix bash auto-complete function

    Dear Sirs,

    I am trying to improve the bash auto-complete function on a debian box (not knoppix installation). To describe better
    what I am trying to say, let's go with an example:
    at console (debian installation) I am writing
    apt-cache <tab> <tab>
    BUT this did not auto-comlete anything. In comparison with my other box that is knoppix (debian) installation, the auto complete function does a vary great job and can auto complete not only all related available apt-cache comands but further more. example:
    apt-cache po <tab> -> policy kdelibs <tab> ... give me all related kdelibs
    packages (ex. kdelibs3 , kdelibs4 and so on)
    I missed this very goot and intuitive function on my debian box and I am looking for how can have same functionality as knoppix.
    Any idea ??? Is there anybody that can instruct me how can get this ???

    Best Regards,
    Mike Kranidis

  2. #2
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    If you want it system wide then uncomment the section I have at the bottom in my /etc/bash.bashrc.

    Code:
    HappyTux:/home/stephen# cat /etc/bash.bashrc
    # System-wide .bashrc file for interactive bash(1) shells.
    
    # If running interactively, then:
    if [ "$PS1" ]; then
    
        # set a fancy prompt (overwrite the one in /etc/profile)
        PS1='\u@\h:\w\$ '
    
        # check the window size after each command and, if necessary,
        # update the values of LINES and COLUMNS.
        shopt -s checkwinsize
    
        # enable bash completion in interactive shells
        if [ -f /etc/bash_completion ]; then
            . /etc/bash_completion
        fi
    fi
    Or if you just want it for certain users then you would uncomment the section in their /home/user_name/.bashrc.

  3. #3
    Senior Member registered user
    Join Date
    Jun 2003
    Location
    Piraeus / Hellas
    Posts
    121
    Dear Stephen,

    I checked bash.bashrc between debian box and knoppix-debian box.
    The funny think is that even when I uncomment the particular section did not make the trick. Still did not auto-complete when ex. :
    apt-cache <tab> (does nothing but beep) <tab> (does nothing but beep) in debian box ...

    anything else that I can check ???

    Thanks

  4. #4
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Quote Originally Posted by mikekgr
    Dear Stephen,

    I checked bash.bashrc between debian box and knoppix-debian box.
    The funny think is that even when I uncomment the particular section did not make the trick. Still did not auto-complete when ex. :
    apt-cache <tab> (does nothing but beep) <tab> (does nothing but beep) in debian box ...

    anything else that I can check ???

    Thanks
    You have logged out and back in so the file is re-read? If so then I think I'm out of ideas as that is all I had to do on my Debian install here for it to work. Now that I am looking at the what you posted again it would be apt-cache policy <tab> if this was not a typo and would probably better starting with a couple of letters as well at the end of the command.

    Code:
    [05:49 PM Mon Apr 05: stephen @ ~]
    >$ apt-cache policy <tab>
    Display all 19920 possibilities? (y or n)n
    [05:49 PM Mon Apr 05: stephen @ ~]
    >$ apt-cache policy ap <tab>
    apache                      appunti-informatica-libera
    apache2                     aprsd
    apache2-common              aprsdigi
    apache2-dev                 apsfilter
    apache2-doc                 apt
    apache2-modules             apt-build
    apache2-mpm-perchild        apt-cacher
    
    [snip ..]
    Edit: If you set it in you /home/user_name/.bashrc then you should make sure that this section is uncommented in the /home/user_name/.bash_profile as well.
    Code:
    # include .bashrc if it exists
    
    if [ -f ~/.bashrc ]; then
        source ~/.bashrc
    fi
    You need to logout and back in for this as well.

  5. #5
    Senior Member registered user
    Join Date
    Jun 2003
    Location
    Piraeus / Hellas
    Posts
    121
    Dear Stephen,
    I did logout login. No in my case apt-cache policy ap <tab> <tab> does not complete anything in my case (snifff !!!)

    Thanks for your help anyway

  6. #6
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Quote Originally Posted by mikekgr
    Dear Stephen,
    I did logout login. No in my case apt-cache policy ap <tab> <tab> does not complete anything in my case (snifff !!!)

    Thanks for your help anyway
    Does the file /etc/bash_completion exist on your system and what version of bash are you using? My version is 2.05b-14.

  7. #7
    Senior Member registered user
    Join Date
    Jun 2003
    Location
    Piraeus / Hellas
    Posts
    121
    Dear Stephen,
    I have already the latest bash from unstable and the /etc/bash_completion exist on my system.
    I don't know and I can not excuse the differences in behaviour...

    I am getting a little mad about this...

    Cheers !

Similar Threads

  1. Unable to get wireless to function :(
    By harryhood in forum Networking
    Replies: 6
    Last Post: 05-20-2005, 07:11 PM
  2. knoppix.sh can't execute bash in the boot sequence?
    By slowhand in forum Customising & Remastering
    Replies: 1
    Last Post: 04-17-2005, 10:48 PM
  3. Reassigning mouse button function
    By el_supremo in forum Hardware & Booting
    Replies: 2
    Last Post: 10-15-2004, 03:41 AM
  4. Which notebook can intsall Knoppox and support all function?
    By GaryWong in forum Hardware & Booting
    Replies: 3
    Last Post: 04-13-2004, 08:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


SFP TO RJ45 TRANSCEIVER SFP MODULE COPPER SFP OPTICAL PORT TO RJ45 ETHERNET PORT picture

SFP TO RJ45 TRANSCEIVER SFP MODULE COPPER SFP OPTICAL PORT TO RJ45 ETHERNET PORT

$7.99



NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping* picture

NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping*

$24.00



Qty 20 New Cisco QSFP-100G-FR-W2 10-3659-01 Module Hologram Brand New 20 Pack picture

Qty 20 New Cisco QSFP-100G-FR-W2 10-3659-01 Module Hologram Brand New 20 Pack

$260.00



For Cisco SFP-10G-T-X Module, 10G SFP to RJ-45 Copper, 10GBase-T, 1/2.5/5/10Gbps picture

For Cisco SFP-10G-T-X Module, 10G SFP to RJ-45 Copper, 10GBase-T, 1/2.5/5/10Gbps

$39.99



Cisco SFP-10G-SR Transceiver picture

Cisco SFP-10G-SR Transceiver

$4.00



Intel X520-DA2 10Gb 10Gbe 10 Gigabit Network Adapter NIC Dual Port E10G42BTDA picture

Intel X520-DA2 10Gb 10Gbe 10 Gigabit Network Adapter NIC Dual Port E10G42BTDA

$28.94



10Gb SFP+ to RJ45 Module Copper Cat6 Transceiver Compatible w/5Gb/ 2.5Gb/ 1Gb picture

10Gb SFP+ to RJ45 Module Copper Cat6 Transceiver Compatible w/5Gb/ 2.5Gb/ 1Gb

$31.95



*LOT OF 10*Cisco SFP-GE-T EXT 30-1421-01 USA 1000BASE-T RJ45 SFP Transceiver picture

*LOT OF 10*Cisco SFP-GE-T EXT 30-1421-01 USA 1000BASE-T RJ45 SFP Transceiver

$19.99



Arista SFP-10G-SR 10GBASE-SR XVR-10001-20 850nm SFP+ Optical Transceiver picture

Arista SFP-10G-SR 10GBASE-SR XVR-10001-20 850nm SFP+ Optical Transceiver

$30.00



30PCS Sealed Cisco SFP-10G-SR 10GBASE-SR SFP+ Transceiver Module MMF 850nm 300m picture

30PCS Sealed Cisco SFP-10G-SR 10GBASE-SR SFP+ Transceiver Module MMF 850nm 300m

$499.99