Gentoo Archives: gentoo-dev

From: Zach Forrest <zach@××××××××××××××.ca>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] latest and greatest gentoo.completion
Date: Wed, 13 Mar 2002 12:25:33
Message-Id: 3C8F9AD3.8060705@disinformation.ca
In Reply to: Re: [gentoo-dev] latest and greatest gentoo.completion by Thilo Bangert
1 It is what you think it is. You simply have to place the file in /etc
2 (or anywhere else really, but /etc is the best place) and add the
3 following to your .bashrc script. You will most likely want to add it to
4 the root user's .bashrc script as well. The test for the $PS1
5 environment variable makes sure that we're running interactively and the
6 second test makes sure the file exists.
7
8 if [ "$PS1" ] && [ -e /etc/gentoo.completion ]; then
9 # Source completion code
10 . /etc/gentoo.completion
11 fi
12
13 You could also add the following to /etc/profile instead of the .bashrc
14 scripts to make it available to all users (it's really a matter of
15 preference). The test for $BASH_VERSION makes sure that the completion
16 code is only sourced for users using the bash shell (i.e. if they are
17 using csh the code won't work and errors will be generated).
18
19 if [ "$BASH_VERSION" ] && [ "$PS1" ] && [ -e /etc/gentoo.completion ]
20 then
21 # Source completion code
22 . /etc/gentoo.completion
23 fi
24
25 Hope this helps.
26
27 Zach
28
29
30
31 Thilo Bangert wrote:
32 > On Wednesday, 13. March 2002 02:05, you wrote:
33 >
34 >>I've made some significant changes incorporating the latest available
35 >>options and making the completion more intelligent. Enjoy!
36 >>
37 >>Zach
38 >
39 >
40 > is this what i think it is and for bash? or is it for some weird shell
41 > ;-)
42 >
43 > how does a newbie like me get that to work?
44 >

Replies

Subject Author
Re: [gentoo-dev] latest and greatest gentoo.completion Thilo Bangert <thilo.bangert@×××.net>
Re: [gentoo-dev] latest and greatest gentoo.completion jboyens@××××××××.org