-
Senior Member
registered user
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
-
Senior Member
registered user
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.
-
Senior Member
registered user
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
-
Senior Member
registered user
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.
-
Senior Member
registered user
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
-
Senior Member
registered user
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.
-
Senior Member
registered user
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
-
By harryhood in forum Networking
Replies: 6
Last Post: 05-20-2005, 07:11 PM
-
By slowhand in forum Customising & Remastering
Replies: 1
Last Post: 04-17-2005, 10:48 PM
-
By el_supremo in forum Hardware & Booting
Replies: 2
Last Post: 10-15-2004, 03:41 AM
-
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
-
Forum Rules
Cisco ASA 5520 Adaptive Security Appliance
$42.56
Fortinet FortiGate-40C Network Security Firewall
$42.50
Palo Alto PA-3020 Network Security Appliance
$75.00
Fortinet Fortiwifi 60D FG-60D Security Appliance Firewall / VPN w/ AC Adapter
$34.97
Palo Alto PA-220 Security Appliance Firewall - NO Power adapter -
$33.00
Firewalla: Cyber Security Firewall for Home & Business, Protect Network
$250.00
NETGEAR FVS318G ProSafe VPN Firewall (New/Sealed)
$45.00
Ubiquiti Networks UniFi Security Gateway - White (USG-3P)
$49.00
Genuine Fortinet FortiGate 60E-POE Firewall Network Security ATP Bundle 2 years
$263.99
FORTINET FG-500D FortiGate 500D, 10xGE RJ45 ports, 8xGE SFP slots Firewall
$126.00