blob: fc98d99cb65c24c57834e887a729df4a473962cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-dev] new mgarepo version
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20new%20mgarepo%20version&In-Reply-To=%3C201107131502.00613.anaselli%40linux.it%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="006609.html">
<LINK REL="Next" HREF="006621.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-dev] new mgarepo version</H1>
<B>Angelo Naselli</B>
<A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20new%20mgarepo%20version&In-Reply-To=%3C201107131502.00613.anaselli%40linux.it%3E"
TITLE="[Mageia-dev] new mgarepo version">anaselli at linux.it
</A><BR>
<I>Wed Jul 13 15:01:57 CEST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="006609.html">[Mageia-dev] new mgarepo version
</A></li>
<LI>Next message: <A HREF="006621.html">[Mageia-dev] new mgarepo version
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#6612">[ date ]</a>
<a href="thread.html#6612">[ thread ]</a>
<a href="subject.html#6612">[ subject ]</a>
<a href="author.html#6612">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>><i> FWIW, I've been using the attached bash-completion file for some
</I>><i> months now, however since I am not a bash-completion guru I didn't
</I>><i> want to plague anyone else with any things I've messed up with it.
</I>Great that means it works :)
I'm not a bash-completion guru as well, but i thought it was useful
for someone else, since we're two... that means we could be more :)
><i> @Angelo: Feel free to use anything from it, if any, to add to the file
</I>><i> you have (note that I disabled the "auto completion of package names
</I>><i> in SVN" since it's too slow for taste).
</I>The attached one has it activated, i believe it is the same as yours but
for that change.
FWIW i find slower urpmi bash_complention, expecially if i want to
install a local package - i always forget ./XXX- you can figure out :)
HTH,
Angelo
-------------- next part --------------
# mgarepo(1) completion
#
_cauldron_packages()
{
COMPREPLY=( $( compgen -W '$(svn ls \
svn+<A HREF="ssh://svn.mageia.org/svn/packages/cauldron">ssh://svn.mageia.org/svn/packages/cauldron</A> \
| sed -e "s|/$||" )' -- $cur ) )
}
_mgarepo_actions()
{
COMPREPLY=( $( compgen -W 'import create checkout co update info log \
tag submit extract sync commit ci build strip mass-update \
help' -- $cur ) )
}
_mgarepo()
{
local cur prev command options i
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
if [[ $COMP_CWORD -eq 1 ]] ; then
_mgarepo_actions
else
prev=${COMP_WORDS[COMP_CWORD-1]}
case "$prev" in
-@(c|-config))
_filedir
return 0
;;
esac
command=${COMP_WORDS[1]}
if [[ "$cur" == -* ]]; then
# possible options for the command
case $command in
@(import|create))
options="--revision --distribution \
--branch --message --nocommit"
;;
@(checkout|co|info|log))
options="--revision --distribution \
--branch"
;;
update)
options="--revision --distribution \
--branch --release \
--spec-line-expression \
--keep-on-failure --message \
--target --nocommit --nosubmit"
;;
mass-update)
options="--include --exclude \
--keep-on-failure --nocommit \
--nosubmit"
;;
tag)
options="--revision"
;;
submit)
options="--revision --distribution \
--branch --target"
;;
extract)
options="--revision --distribution \
--branch --destdir --noprefix"
;;
@(commit|ci))
options="--sync --message"
;;
esac
options="$options --verbose -v --config -c --help"
COMPREPLY=( $( compgen -W "$options" -- $cur ) )
else
case $command in
help)
_mgarepo_actions
return 0
;;
import)
_filedir 'src.rpm'
return 0
;;
@(create|checkout|co|update|info|log|tag|submit|extract))
_cauldron_packages
return 0
;;
@(sync|commit|ci))
_filedir -d
return 0
;;
@(build|strip))
_filedir 'spec'
return 0
;;
esac
fi
fi
}
complete -F _mgarepo $filenames mgarepo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/mageia-dev/attachments/20110713/d949efa6/attachment.asc>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="006609.html">[Mageia-dev] new mgarepo version
</A></li>
<LI>Next message: <A HREF="006621.html">[Mageia-dev] new mgarepo version
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#6612">[ date ]</a>
<a href="thread.html#6612">[ thread ]</a>
<a href="subject.html#6612">[ subject ]</a>
<a href="author.html#6612">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>
|