1 Summary: bash-completion offers programmable completion for bash
2 Summary(pl): Programowalne uzupe³nianie nazw dla basha
7 Group: Applications/Shells
8 Source0: http://www.caliban.org/files/bash/%{name}-%{version}.tar.bz2
9 # Source0-md5: 3fd0836127d01606a9dc4262f3e2e1fb
11 URL: http://www.caliban.org/bash/
12 Requires(post,preun): bash
14 Requires(post): textutils
15 Requires(postun): fileutils
18 Requires: bash >= 2.05a-3
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 bash-completion is a collection of shell functions that take advantage
23 of the programmable completion feature of bash 2.04 and later.
26 bash-completion jest kolekcj± funkcji shella, które opieraj± siê na
27 wbudowanych rozszerzeniach basha 2.04 lub pó¼niejszego umo¿liwiaj±cego
28 kompletowanie parametrów linii poleceñ.
31 %setup -q -n bash_completion
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
37 install bash_completion $RPM_BUILD_ROOT%{_sysconfdir}
38 install contrib/* $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
40 # subversion comes with much better completion file
41 rm $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/subversion
44 rm -rf $RPM_BUILD_ROOT
47 if ! grep -q '\[ -f '%{_sysconfdir}'/bash_completion \]' \
48 %{_sysconfdir}/bashrc 2>/dev/null; then
50 cat <<'EOF' >> %{_sysconfdir}/bashrc
51 # START bash completion -- do not remove this line
52 bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
53 if [ "$bmajor" -eq 2 -a "$bminor" '>' 04 ] || [ "$bmajor" -gt 2 ]; then
54 if [ "$PS1" ] && [ -f %{_sysconfdir}/bash_completion ]; then # interactive shell
55 # Source completion code
56 . %{_sysconfdir}/bash_completion
59 unset bash bmajor bminor
60 # END bash completion -- do not remove this line
65 if [ "$1" -eq 0 ]; then
67 sed -e '/^# START bash completion/,/^# END bash completion/d' /etc/bashrc \
69 mv -f /etc/bashrc.tmp /etc/bashrc
73 %defattr(644,root,root,755)
74 %doc README Changelog BUGS
75 %{_sysconfdir}/bash_completion
76 %{_sysconfdir}/bash_completion.d/