Patch 9.0.0089
Problem:    Fuzzy argument completion doesn't work for shell commands.
Solution:   Check for cmdidx not being CMD_bang. (Yegappan Lakshmanan,
            closes #10769)
Files:      src/cmdexpand.c, src/testdir/test_cmdline.vim


*** ../vim-9.0.0088/src/cmdexpand.c     2022-06-16 11:40:45.000000000 +0100
--- src/cmdexpand.c     2022-07-26 22:00:48.874196697 +0100
***************
*** 1305,1312 ****
        eap->cmdidx = excmd_get_cmdidx(cmd, len);
  
        // User defined commands support alphanumeric characters.
!       // Also when doing fuzzy expansion, support alphanumeric characters.
!       if ((cmd[0] >= 'A' && cmd[0] <= 'Z') || (fuzzy && *p != NUL))
            while (ASCII_ISALNUM(*p) || *p == '*')      // Allow * wild card
                ++p;
      }
--- 1305,1314 ----
        eap->cmdidx = excmd_get_cmdidx(cmd, len);
  
        // User defined commands support alphanumeric characters.
!       // Also when doing fuzzy expansion for non-shell commands, support
!       // alphanumeric characters.
!       if ((cmd[0] >= 'A' && cmd[0] <= 'Z')
!               || (fuzzy && eap->cmdidx != CMD_bang && *p != NUL))
            while (ASCII_ISALNUM(*p) || *p == '*')      // Allow * wild card
                ++p;
      }
*** ../vim-9.0.0088/src/testdir/test_cmdline.vim        2022-07-26 
20:42:21.822448308 +0100
--- src/testdir/test_cmdline.vim        2022-07-26 21:56:54.399552555 +0100
***************
*** 3144,3149 ****
--- 3144,3159 ----
    endfor
  endfunc
  
+ " Test for :! shell command argument completion
+ func Test_cmdline_complete_bang_cmd_argument()
+   set wildoptions=fuzzy
+   call feedkeys(":!vim test_cmdline.\<Tab>\<C-B>\"\<CR>", 'xt')
+   call assert_equal('"!vim test_cmdline.vim', @:)
+   set wildoptions&
+   call feedkeys(":!vim test_cmdline.\<Tab>\<C-B>\"\<CR>", 'xt')
+   call assert_equal('"!vim test_cmdline.vim', @:)
+ endfunc
+ 
  func Check_completion()
    call assert_equal('let a', getcmdline())
    call assert_equal(6, getcmdpos())
*** ../vim-9.0.0088/src/version.c       2022-07-26 21:41:28.711069937 +0100
--- src/version.c       2022-07-26 22:00:59.918139023 +0100
***************
*** 737,738 ****
--- 737,740 ----
  {   /* Add new patch number below this line */
+ /**/
+     89,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
144. You eagerly await the update of the "Cool Site of the Day."

 /// 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/20220726210214.F14391C07D4%40moolenaar.net.

Raspunde prin e-mail lui