/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/plugins/bash_completion/README.txt

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-23 23:32:35 UTC
  • mfrom: (5240.1.2 bash_completion-README)
  • Revision ID: pqm@pqm.ubuntu.com-20100523233235-74zov83erd9cnhor
(lifeless) Adjusted README.txt for bash_completion plugin,
 now that the plugin has been merged with the main tree. (Martin von Gagern)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
 
=====================================
21
 
bzr bash-completion script and plugin
22
 
=====================================
 
20
==========================
 
21
bzr bash-completion plugin
 
22
==========================
23
23
 
24
 
This script generates a shell function which can be used by bash to
 
24
This plugin generates a shell function which can be used by bash to
25
25
automatically complete the currently typed command when the user
26
26
presses the completion key (usually tab).
27
27
 
32
32
 
33
33
.. contents::
34
34
 
35
 
----------
36
 
Installing
37
 
----------
38
 
 
39
 
You only need to do this if you want to use the script as a bzr
40
 
plugin.  Otherwise simply grab the bashcomp.py and place it wherever
41
 
you want.
42
 
 
43
 
Installing from bzr repository
44
 
------------------------------
45
 
 
46
 
To check out the current code from launchpad, use the following commands::
47
 
 
48
 
  mkdir -p ~/.bazaar/plugins
49
 
  cd ~/.bazaar/plugins
50
 
  bzr checkout lp:bzr-bash-completion bash_completion
51
 
 
52
 
To update such an installation, execute this command::
53
 
 
54
 
  bzr update ~/.bazaar/plugins/bash_completion
55
 
 
56
 
Installing using easy_install
57
 
-----------------------------
58
 
 
59
 
The following command should install the latest release of the plugin
60
 
on your system::
61
 
 
62
 
  easy_install bzr-bash-completion
63
 
 
64
 
To use this method, you need to have `Easy Install`_ installed and
65
 
also have write access to the required directories. So maybe you
66
 
should execute this command as root or through sudo_. Or you want to
67
 
`install to a different location`_.
68
 
 
69
 
.. _Easy Install: http://peak.telecommunity.com/DevCenter/EasyInstall
70
 
.. _sudo: http://linux.die.net/man/8/sudo
71
 
.. _install to a different location:
72
 
   http://peak.telecommunity.com/DevCenter/EasyInstall#non-root-installation
73
 
 
74
 
Installing from tarball
75
 
-----------------------
76
 
 
77
 
If you have grabbed a source code tarball, or want to install from a
78
 
bzr checkout in a different place than your bazaar plugins directory,
79
 
then you should use the ``setup.py`` script shipped with the code::
80
 
 
81
 
  ./setup.py install
82
 
 
83
 
If you want to install the plugin only for your own user account, you
84
 
might wish to pass the option ``--user`` or ``--home=$HOME`` to that
85
 
command. For further information please read the manuals of distutils_
86
 
as well as setuptools_ or distribute_, whatever is available on your
87
 
system, or have a look at the command line help::
88
 
 
89
 
  ./setup.py install --help
90
 
 
91
 
.. _distutils: http://docs.python.org/install/index.html
92
 
.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools#what-your-users-should-know
93
 
.. _distribute: http://packages.python.org/distribute/setuptools.html#what-your-users-should-know
 
35
-------------------------------
 
36
Bundled and standalone versions
 
37
-------------------------------
 
38
 
 
39
This plugin has been merged_ into the main source tree of Bazaar.
 
40
Starting with the bzr 2.3 series, a common bzr installation will
 
41
include this plugin.
 
42
 
 
43
There is still a standalone version available. It makes the plugin
 
44
available for users of older bzr versions. When using both versions,
 
45
local configuration might determine which version actually gets used,
 
46
and some installations might even overwrite one another, so don't use
 
47
the standalone version if you have the bundled one, unless you know
 
48
what you are doing. Some effort will be made to keep the two versions
 
49
reasonably in sync for some time yet.
 
50
 
 
51
This text here documents the bundled version.
 
52
 
 
53
.. _merged: http://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev/revision/5240
94
54
 
95
55
-----
96
56
Using
114
74
To avoid this problem, you can delay the generation of the completion
115
75
function until you actually need it.
116
76
 
117
 
To do so, source the file ``lazy.sh`` shipped with this package from
118
 
your ``~/.bashrc`` file or add it to your ``~/.bash_completion`` if
 
77
To do so, source the file ``contrib/bash/bzr`` shipped with the bzr
 
78
source distribution from your ``~/.bashrc`` file
 
79
or add it to your ``~/.bash_completion`` if
119
80
your setup uses such a file. On a system-wide installation, the
120
81
directory ``/usr/share/bash-completion/`` might contain such bash
121
82
completion scripts.
122
83
 
123
 
If you installed bzr-bash-completion from the repository or a source
124
 
tarball, you find the ``lazy.sh`` script in the root of the source
125
 
tree. If you installed the plugin using easy_install, you should grab
126
 
the script manually from the bzr repository, e.g. through the bazaar
127
 
web interface on launchpad.
128
 
 
129
84
Note that the full completion function is generated only once per
130
85
shell session. If you update your bzr installation or change the set
131
86
of installed plugins, then you might wish to regenerate the completion
132
87
function manually as described above in order for completion to take
133
88
these changes into account.
134
89
 
135
 
Using as a script
136
 
-----------------
137
 
 
138
 
As an alternative, if bzrlib is available to python scripts, the
139
 
following invocation should yield the same results without requiring
140
 
you to add a plugin::
141
 
 
142
 
  eval "`./bashcomp.py`"
143
 
 
144
 
This approach might have some issues, though, and provides less
145
 
options than the bzr plugin. Therefore if you have the choice, go for
146
 
the plugin setup.
147
 
 
148
90
--------------
149
91
Design concept
150
92
--------------
151
93
 
152
 
The plugin (or script) is designed to generate a completion function
 
94
The plugin is designed to generate a completion function
153
95
containing all the required information about the possible
154
96
completions. This is usually only done once when bash
155
97
initializes. After that, no more invocations of bzr are required. This
165
107
 
166
108
As this is built upon a bash completion script originally included in
167
109
the bzr source tree, and as the bzr sources are covered by the GPL 2,
168
 
this script here is licensed under these same terms.
 
110
this plugin here is licensed under these same terms.
169
111
 
170
112
If you require a more liberal license, you'll have to contact all
171
113
those who contributed code to this plugin, be it for bash or for
172
114
python.
173
115
 
174
 
.. cut long_description here
175
 
 
176
116
-------
177
117
History
178
118
-------
181
121
static completion function of very limited scope distributed together
182
122
with bzr.
183
123
 
 
124
A version of it was merged into the bzr source tree in May 2010.
 
125
 
184
126
----------
185
127
References
186
128
----------
187
129
 
188
 
Plugin homepages
 
130
Bazaar homepage
 
131
  | http://bazaar.canonical.com/
 
132
Standalone plugin homepages
189
133
  | https://launchpad.net/bzr-bash-completion
190
134
  | http://pypi.python.org/pypi/bzr-bash-completion
191
 
Bazaar homepage
192
 
  | http://bazaar.canonical.com/
193
135
 
194
136
 
195
137