comparison src/os_win32.c @ 25084:beff72446e2e v8.2.3079

patch 8.2.3079: Powershell core not supported by default Commit: https://github.com/vim/vim/commit/a3d1b29bd36487167c98b3cefa30f06c529e412d Author: Mike Williams <mikew@globalgraphics.com> Date: Wed Jun 30 20:56:00 2021 +0200 patch 8.2.3079: Powershell core not supported by default Problem: Powershell core not supported by default. Solution: Set option defaults for "pwsh". (Mike Williams, closes https://github.com/vim/vim/issues/8481)
author Bram Moolenaar <Bram@vim.org>
date Wed, 30 Jun 2021 21:00:05 +0200
parents 0ce24f734615
children c4298ed56ffa
comparison
equal deleted inserted replaced
25083:05c4686c56d2 25084:beff72446e2e
2133 size_t tmplen; 2133 size_t tmplen;
2134 char_u *p, *e, *e2; 2134 char_u *p, *e, *e2;
2135 char_u *pathbuf = NULL; 2135 char_u *pathbuf = NULL;
2136 char_u *pathext = NULL; 2136 char_u *pathext = NULL;
2137 char_u *pathextbuf = NULL; 2137 char_u *pathextbuf = NULL;
2138 char_u *shname = NULL;
2138 int noext = FALSE; 2139 int noext = FALSE;
2139 int retval = FALSE; 2140 int retval = FALSE;
2140 2141
2141 if (len >= sizeof(buf)) // safety check 2142 if (len >= sizeof(buf)) // safety check
2142 return FALSE; 2143 return FALSE;
2143 2144
2144 // Using the name directly when a Unix-shell like 'shell'. 2145 // Using the name directly when a Unix-shell like 'shell'.
2145 if (strstr((char *)gettail(p_sh), "powershell") == NULL 2146 shname = gettail(p_sh);
2146 && strstr((char *)gettail(p_sh), "sh") != NULL) 2147 if (strstr((char *)shname, "sh") != NULL &&
2148 !(strstr((char *)shname, "powershell") != NULL
2149 || strstr((char *)shname, "pwsh") != NULL))
2147 noext = TRUE; 2150 noext = TRUE;
2148 2151
2149 if (use_pathext) 2152 if (use_pathext)
2150 { 2153 {
2151 pathext = mch_getenv("PATHEXT"); 2154 pathext = mch_getenv("PATHEXT");