[Bash-completion-devel] [bash-completion-Bugs][312646] _command() bug

Ildar Mulyukov ildar at users.sourceforge.net
Thu Aug 19 18:46:52 UTC 2010


Please apply the patch to GIT HEAD.
Best regards,
	Ildar.

On 19.08.2010 03:05:04, bash-completion-bugs at alioth.debian.org wrote:
> Bugs item #312646, was changed at 2010-08-08 19:01 by Freddy Vulto
> You can respond by visiting:
> https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312646&group_id=100114
> 
> >Status: Closed
> Priority: 3
> Submitted By: Ildar Mulyukov (ildar-guest)
> Assigned to: Freddy Vulto (fvu-guest)
> Summary: _command() bug
> Distribution: --Distribution-Agnostic--
> Originally reported in: None
> Milestone: None
> Status: Accepted
> Original bug number: 23861
> 
> 
> Initial Comment:
> $ sudo sh <TAB> bash: complete: sh: no completion specification
> 
> $ nice sh  <TAB> bash: complete: sh: no completion specification
> 
> Original bug: https://bugzilla.altlinux.org/23861
> 
> ----------------------------------------------------------------------
> 
> >Comment By: Freddy Vulto (fvu-guest)
> Date: 2010-08-18 23:05
> 
> Message:
> Fixed in commit b867bcd:
> In case of `sudo cmd', _filedir might be triggered for a cmd not  
> having a
> complete command, hence `complete -p cmd' could yield an error.
> 
> diff --git a/bash_completion b/bash_completion
> index cd717c5..8661d40 100644
> --- a/bash_completion
> +++ b/bash_completion
> @@ -647,7 +647,8 @@ _filedir()
>              # Is `-o filenames' set?
>              [[ (
>                  ${COMP_WORDS[0]} &&
> -                "$(complete -p ${COMP_WORDS[0]})" == *"-o filenames"*
> +                "$(complete -p ${COMP_WORDS[0]} &>/dev/null)" == \
> +                    *"-o filenames"*
>              ) ]] || {
>                  # No, `-o filenames' isn't set;
>                  # Emulate `-o filenames'
> 
> 
> ----------------------------------------------------------------------
> 
> Comment By: Freddy Vulto (fvu-guest)
> Date: 2010-08-17 22:34
> 
> Message:
> I can reproduce the bug on bash-3.2.39.
> 
> ----------------------------------------------------------------------
> 
> Comment By: Ildar Mulyukov (ildar-guest)
> Date: 2010-08-09 10:45
> 
> Message:
> Current GIT, but have bash3 here.
> 
> What's the policy for bash3 support?
> bash-3.2.51-alt1
> 
> ----------------------------------------------------------------------
> 
> Comment By: Ville Skyttä  (scop-guest)
> Date: 2010-08-09 08:30
> 
> Message:
> I cannot reproduce with current git, bash 4.1.7.
> 
> ----------------------------------------------------------------------
> 
> You can respond by visiting:
> https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312646&group_id=100114

-- 
Ildar  Mulyukov,  free SW designer/programmer
================================================
email: ildar at users.sourceforge.net
home: http://tuganger.narod.ru/
ALT Linux Sisyphus
================================================



More information about the Bash-completion-devel mailing list