From 00fc40ac1a9fc48483734d13879530b67cbfed0f Mon Sep 17 00:00:00 2001 From: Alexander Hall Date: Mon, 21 Jan 2013 10:13:25 +0000 Subject: revert the tweak part of the last commit which, apart from the questionable functionality of being able to expand environment variables that did not match a filename, preserved the annoyance of having stuff like "~/nonexistant" expanded to "~/nonexistant\* " ok stsp@ mpi@ --- bin/ksh/edit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bin/ksh') diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c index 67841af9590..a50c3beb356 100644 --- a/bin/ksh/edit.c +++ b/bin/ksh/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.36 2013/01/20 14:47:46 stsp Exp $ */ +/* $OpenBSD: edit.c,v 1.37 2013/01/21 10:13:24 halex Exp $ */ /* * Command line editing - common code @@ -385,8 +385,7 @@ x_file_glob(int flags, const char *str, int slen, char ***wordsp) * which evaluated to an empty string (e.g., * "$FOO" when there is no FOO, etc). */ - if ((strcmp(words[0], toglob) == 0 && - lstat(words[0], &statb) < 0) || + if ((lstat(words[0], &statb) < 0) || words[0][0] == '\0') { x_free_words(nwords, words); words = NULL; -- cgit v1.2.3