bug-bash
[Top][All Lists]
Advanced

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

Re: edit-and-execute-command in non-posix vi editing mode fails with def


From: Chet Ramey
Subject: Re: edit-and-execute-command in non-posix vi editing mode fails with default editor
Date: Fri, 10 Mar 2006 16:40:00 -0500
User-agent: Thunderbird 1.5 (Macintosh/20051201)

Mike Stroyan wrote:

> Bash Version: 3.1
> Patch Level: 0
> Release Status: release
> 
> Description:
>       The default edit-and-execute-command behavior for non-posix vi
>       editing mode fails when EDITOR is not set.  It has changed from
>       using vi in 3.0 to trying to use 'editor' first in 3.1.  But it
>       fails to start an editor and just executes the unchanged command line.
> 
> Repeat-By:
>       Start bash
>       set -o vi
>       unset EDITOR
>       Type 'date<esc>v'
>       The date command is run without a chance to edit it.
> 
> Fix:
>       Remove an extra right parenthesis from bashline.c.
> 
> --- bash/bashline.c~  2006-01-31 13:30:34.000000000 -0700
> +++ bash/bashline.c   2006-03-09 12:32:24.000000000 -0700
> @@ -800,7 +800,7 @@
>     command being entered (if no explicit argument is given), otherwise on
>     a command from the history file. */
>  
> -#define VI_EDIT_COMMAND              "fc -e \"${VISUAL:-${EDITOR:-$(command 
> -v editor || echo vi))}}\""
> +#define VI_EDIT_COMMAND              "fc -e \"${VISUAL:-${EDITOR:-$(command 
> -v editor || echo vi)}}\""
>  #define EMACS_EDIT_COMMAND   "fc -e \"${VISUAL:-${EDITOR:-$(command -v 
> editor || echo emacs)}}\""
>  #define POSIX_VI_EDIT_COMMAND        "fc -e vi"

That's not in bash-3.1 as distributed.  It must have been added by
Debian.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                           Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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