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: 985c0ff1f94fca97ad1cbf191bdf8535
10 URL: http://www.caliban.org/bash/
11 Requires(post,preun): bash
13 Requires(post): textutils
14 Requires(postun): fileutils
17 Requires: bash >= 2.05a-3
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 bash-completion is a collection of shell functions that take advantage
22 of the programmable completion feature of bash 2.04 and later.
25 bash-completion jest kolekcj± funkcji shella, które opieraj± siê na
26 wbudowanych rozszerzeniach basha 2.04 lub pó¼niejszego umo¿liwiaj±cego
27 kompletowanie parametrów linii poleceñ.
30 %setup -q -n bash_completion
33 rm -rf $RPM_BUILD_ROOT
34 install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
36 install bash_completion $RPM_BUILD_ROOT%{_sysconfdir}
37 install contrib/* $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
39 # subversion comes with much better completion file
40 rm $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/subversion
43 rm -rf $RPM_BUILD_ROOT
46 if ! grep -q '\[ -f '%{_sysconfdir}'/bash_completion \]' \
47 %{_sysconfdir}/bashrc 2>/dev/null; then
49 cat <<'EOF' >> %{_sysconfdir}/bashrc
50 # START bash completion -- do not remove this line
51 bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
52 if [ "$PS1" ] && [ "$bmajor" -eq 2 ] && [ "$bminor" '>' 04 ] \
53 && [ -f %{_sysconfdir}/bash_completion ]; then # interactive shell
54 # Source completion code
55 . %{_sysconfdir}/bash_completion
57 unset bash bmajor bminor
58 # END bash completion -- do not remove this line
63 if [ "$1" -eq 0 ]; then
65 sed -e '/^# START bash completion/,/^# END bash completion/d' /etc/bashrc \
67 mv -f /etc/bashrc.tmp /etc/bashrc
71 %defattr(644,root,root,755)
72 %doc README Changelog BUGS
73 %{_sysconfdir}/bash_completion
74 %{_sysconfdir}/bash_completion.d/