From: Leonardo Taccari <iamleot@gmail.com>
Date: Mon, 15 Oct 2018 15:29:13 +0000 (+0200)
Subject: Document a subtlety of util_parse_expansion() behaviour.
X-Git-Url: https://git.owens.tech/assets/editable-focus.html/assets/editable-focus.html/git?a=commitdiff_plain;h=99f7810d1034b057f77bec4ae57ec080992ad9a9;p=vimb.git

Document a subtlety of util_parse_expansion() behaviour.

Single ~ uses g_get_home_dir() that honor HOME environment variable.
However, ~user always consult the passwd file.
---

diff --git a/src/util.c b/src/util.c
index 5844ff7..dbce2a0 100644
--- a/src/util.c
+++ b/src/util.c
@@ -678,6 +678,10 @@ double util_js_result_as_number(WebKitJavascriptResult *result)
  * not expanded char. If no expansion pattern was found, the first char is
  * appended to given GString.
  *
+ * Please note that for a single ~, g_get_home_dir() is used and if a valid
+ * HOME environment variable is set it is preferred than passwd file.
+ * However, for ~user expansion the passwd file is always used.
+ *
  * @input:     String pointer with the content to be parsed.
  * @str:       GString that will be filled with expanded content.
  * @flags      Flags that determine which expansion are processed.