aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/builtin.txt1
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua1
-rw-r--r--src/nvim/eval.lua1
-rw-r--r--src/nvim/eval/funcs.c5
-rw-r--r--test/old/testdir/test_functions.vim2
5 files changed, 9 insertions, 1 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 96574e2899..77d44c36a0 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -4597,6 +4597,7 @@ has({feature}) *has()*
fname_case Case in file names matters (for Darwin and MS-Windows
this is not present).
gui_running Nvim has a GUI.
+ hurd GNU/Hurd system.
iconv Can use |iconv()| for conversion.
linux Linux system.
mac MacOS system.
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index 098c0e907a..c67f303d82 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -4148,6 +4148,7 @@ function vim.fn.globpath(path, expr, nosuf, list, allinks) end
--- fname_case Case in file names matters (for Darwin and MS-Windows
--- this is not present).
--- gui_running Nvim has a GUI.
+--- hurd GNU/Hurd system.
--- iconv Can use |iconv()| for conversion.
--- linux Linux system.
--- mac MacOS system.
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 9d787c68ea..a7a564fa88 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -5119,6 +5119,7 @@ M.funcs = {
fname_case Case in file names matters (for Darwin and MS-Windows
this is not present).
gui_running Nvim has a GUI.
+ hurd GNU/Hurd system.
iconv Can use |iconv()| for conversion.
linux Linux system.
mac MacOS system.
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index c125bd8893..8e83b3d146 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -3075,9 +3075,12 @@ static void f_gettext(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
{
static const char *const has_list[] = {
-#if defined(BSD) && !defined(__APPLE__)
+#if defined(BSD) && !defined(__APPLE__) && !defined(__GNU__)
"bsd",
#endif
+#ifdef __GNU__
+ "hurd",
+#endif
#ifdef __linux__
"linux",
#endif
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index 6a5d127fd7..6b216947a7 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -2717,6 +2717,7 @@ func Test_platform_name()
" Is Unix?
call assert_equal(has('bsd'), has('bsd') && has('unix'))
call assert_equal(has('hpux'), has('hpux') && has('unix'))
+ call assert_equal(has('hurd'), has('hurd') && has('unix'))
call assert_equal(has('linux'), has('linux') && has('unix'))
call assert_equal(has('mac'), has('mac') && has('unix'))
call assert_equal(has('qnx'), has('qnx') && has('unix'))
@@ -2734,6 +2735,7 @@ func Test_platform_name()
call assert_equal(uname =~? 'QNX', has('qnx'))
call assert_equal(uname =~? 'SunOS', has('sun'))
call assert_equal(uname =~? 'CYGWIN\|MSYS', has('win32unix'))
+ call assert_equal(uname =~? 'GNU', has('hurd'))
endif
endfunc