Patch 8.2.3623
Problem:    "$*" is expanded to "nonomatch".
Solution:   Only add "set nonomatch" when using a csh-like shell. (Christian
            Brabandt, closes #9159, closes #9153)
Files:      src/os_unix.c, src/testdir/test_expand.vim


*** ../vim-8.2.3622/src/os_unix.c       2021-10-20 10:00:01.274269483 +0100
--- src/os_unix.c       2021-11-19 12:36:52.671970001 +0000
***************
*** 6691,6700 ****
      }
      else
      {
!       if (flags & EW_NOTFOUND)
!           STRCPY(command, "set nonomatch; ");
!       else
!           STRCPY(command, "unset nonomatch; ");
        if (shell_style == STYLE_GLOB)
            STRCAT(command, "glob >");
        else if (shell_style == STYLE_PRINT)
--- 6691,6707 ----
      }
      else
      {
!       STRCPY(command, "");
!       if (shell_style == STYLE_GLOB)
!       {
!           // Assume the nonomatch option is valid only for csh like shells,
!           // otherwise, this may set the positional parameters for the shell,
!           // e.g. "$*".
!           if (flags & EW_NOTFOUND)
!               STRCAT(command, "set nonomatch; ");
!           else
!               STRCAT(command, "unset nonomatch; ");
!       }
        if (shell_style == STYLE_GLOB)
            STRCAT(command, "glob >");
        else if (shell_style == STYLE_PRINT)
*** ../vim-8.2.3622/src/testdir/test_expand.vim 2020-04-06 20:35:02.460237781 
+0100
--- src/testdir/test_expand.vim 2021-11-19 12:31:51.808495472 +0000
***************
*** 1,6 ****
--- 1,7 ----
  " Test for expanding file names
  
  source shared.vim
+ source check.vim
  
  func Test_with_directories()
    call mkdir('Xdir1')
***************
*** 135,138 ****
--- 136,144 ----
    %bwipe!
  endfunc
  
+ func Test_expandcmd_shell_nonomatch()
+   CheckNotMSWindows
+   call assert_equal('$*', expandcmd('$*'))
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.3622/src/version.c       2021-11-19 11:59:04.927685669 +0000
--- src/version.c       2021-11-19 12:34:40.220203913 +0000
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3623,
  /**/

-- 
ARTHUR:   Ni!
BEDEVERE: Nu!
ARTHUR:   No.  Ni!  More like this. "Ni"!
BEDEVERE: Ni, ni, ni!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211119123821.8F4B51C3E54%40moolenaar.net.

Raspunde prin e-mail lui