X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=parser%2Fparse.c;h=897d738f417fbe183e78246d9cb7a28cdfb09580;hb=9cf5903e16c68ce1877d8d04ca6ee1c28e04a5ce;hp=ed66f088f6ba33f715b805fce01a25e5123a427e;hpb=b69ee77256dccee0764c07416fe9bc7db9e5a12d;p=chaz%2Fopenbox diff --git a/parser/parse.c b/parser/parse.c index ed66f088..897d738f 100644 --- a/parser/parse.c +++ b/parser/parse.c @@ -462,7 +462,8 @@ gchar *parse_expand_tilde(const gchar *f) if (!f) return NULL; - regex = g_regex_new("(?:^|(?<=[ \\t]))~(?=[/ \\t$])", G_REGEX_MULTILINE | G_REGEX_RAW, 0, NULL); + regex = g_regex_new("(?:^|(?<=[ \\t]))~(?:(?=[/ \\t])|$)", + G_REGEX_MULTILINE | G_REGEX_RAW, 0, NULL); ret = g_regex_replace_literal(regex, f, -1, 0, g_get_home_dir(), 0, NULL); g_regex_unref(regex);