Bug 22183 - invalid completions for service
: invalid completions for service
Status: CLOSED WONTFIX
: Branch 4.1
(All bugs in Branch 4.1/bash-completion)
: unspecified
: all Linux
: P3 minor
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2009-11-05 17:21 by
Modified: 2014-11-05 20:43 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-11-05 17:21:59
bash-completion-20060301-alt05
service-0.5.15-alt1

/etc/bash_completion lists /etc/xinet.d/* as "services":

# This function completes on services                                           
#                                                                               
_services()
{
        local sysvdir famdir
        [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d ||
sysvdir=/etc/init.d
    famdir=/etc/xinetd.d
        COMPREPLY=( $( builtin echo
$sysvdir/!(*.rpmsave|*.rpmorig|*~|functions)) )

    if [ -d $famdir ]; then
                COMPREPLY=( ${COMPREPLY[@]} $( builtin echo
$famdir/!(*.rpmsave|*.rpmorig|*~)) )
        fi

        COMPREPLY=( $( compgen -W '${COMPREPLY[@]#@($sysvdir|$famdir)/}' --
$cur ) )
}

But this leads to invalid completions to the calls of /sbin/service:

[root@localhost ~]# l /etc/xinetd.d
total 64
drwxr-xr-x 137 root root  8192 Nov  4 19:06 ../
drwx------   2 root root  4096 Jul 21 04:31 ./
-rw-r-----   1 root wheel  322 Jun 22 09:53 git
-rw-r--r--   1 root root   254 Oct 20  2008 cups-lpd
-rw-r-----   1 root root   294 Mar 28  2008 chargen-tcp
-rw-r-----   1 root root   293 Mar 28  2008 chargen-udp
-rw-r-----   1 root root   294 Mar 28  2008 daytime-tcp
-rw-r-----   1 root root   293 Mar 28  2008 daytime-udp
-rw-r-----   1 root root   294 Mar 28  2008 discard-tcp
-rw-r-----   1 root root   293 Mar 28  2008 discard-udp
-rw-r-----   1 root root   286 Mar 28  2008 echo-tcp
-rw-r-----   1 root root   285 Mar 28  2008 echo-udp
-rw-r-----   1 root root   294 Mar 28  2008 time-tcp
-rw-r-----   1 root root   293 Mar 28  2008 time-udp
[root@localhost ~]# service git 
service: git: Unrecognized service
[root@localhost ~]#
------- Comment #1 From 2014-11-05 20:43:06 -------
В 4.1/branch исправления не будут вноситься уже технически (заглушена очередь
на сборку), поэтому прошу ошибки, актуальные для sisyphus/p7/t7, перевесить на
текущие ветки или сизиф.