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
  •  


A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G

$13.99



HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin picture

HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin

$12.90



A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G picture

A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G

$13.99



Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) XMP picture

Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) XMP

$35.99



A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L picture

A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L

$27.98



8GB PC3L-12800S 1600MHz SODIMM DDR3 RAM | Grade A picture

8GB PC3L-12800S 1600MHz SODIMM DDR3 RAM | Grade A

$12.00



HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM picture

HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM

$9.64



Kingston HyperX FURY DDR3 8GB 16GB 32G 1600 1866 1333 Desktop Memory RAM DIMM picture

Kingston HyperX FURY DDR3 8GB 16GB 32G 1600 1866 1333 Desktop Memory RAM DIMM

$13.25



A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM picture

A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM

$287.96



G.Skill RipJaws V 16GB (2x8GB) PC4-28800 (DDR4-3600) Memory F4-3600C16D-16GVKC picture

G.Skill RipJaws V 16GB (2x8GB) PC4-28800 (DDR4-3600) Memory F4-3600C16D-16GVKC

$45.00