bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] added -- in autocd


From: Eric Blake
Subject: Re: [PATCH] added -- in autocd
Date: Tue, 28 Apr 2015 12:57:17 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 04/28/2015 12:44 PM, isabella parakiss wrote:
> ---

Might have been nice to leave a comment why you propose this change.  It
looks like it is needed for the case when autocd mode is on and you type
the name of a directory that starts with '-', where the cd command needs
to interpret the argument as a directory name rather than an option.

>  execute_cmd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/execute_cmd.c b/execute_cmd.c
> index e3aa37f..51c29c6 100644
> --- a/execute_cmd.c
> +++ b/execute_cmd.c
> @@ -4283,6 +4283,7 @@ run_builtin:
> 
>    if (autocd && interactive && words->word && is_dirname (words->word->word))
>      {
> +      words = make_word_list (make_word ("--"), words);
>        words = make_word_list (make_word ("cd"), words);
>        xtrace_print_word_list (words, 0);
>        goto run_builtin;
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]