summaryrefslogtreecommitdiff
path: root/readline/tilde.c
diff options
context:
space:
mode:
Diffstat (limited to 'readline/tilde.c')
-rw-r--r--readline/tilde.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/readline/tilde.c b/readline/tilde.c
index 1c53a457d46..3788eba628a 100644
--- a/readline/tilde.c
+++ b/readline/tilde.c
@@ -360,6 +360,10 @@ tilde_expand_word (filename)
{
/* Prefix $HOME to the rest of the string. */
expansion = sh_get_env_value ("HOME");
+#if defined (_WIN32)
+ if (expansion == 0)
+ expansion = sh_get_env_value ("APPDATA");
+#endif
/* If there is no HOME variable, look up the directory in
the password database. */