From aeaacedf75a99b06a93d8fe873ed7a795ed4f3dd Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 3 Oct 2015 15:44:57 -0700 Subject: Don't do intermediate fuzzy directory matching with $PATH When expanding an executable with $PATH, don't attempt to interpret the directories in PATH as fuzzy matching. Fixes #2413. --- src/expand.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/expand.h') diff --git a/src/expand.h b/src/expand.h index a6b287f4..b07186e4 100644 --- a/src/expand.h +++ b/src/expand.h @@ -56,7 +56,10 @@ enum EXPAND_SKIP_HOME_DIRECTORIES = 1 << 8, /** Allow fuzzy matching */ - EXPAND_FUZZY_MATCH = 1 << 9 + EXPAND_FUZZY_MATCH = 1 << 9, + + /** Disallow directory abbreviations like /u/l/b for /usr/local/bin. Only applicable if EXPAND_FUZZY_MATCH is set. */ + EXPAND_NO_FUZZY_DIRECTORIES = 1 << 10 }; typedef int expand_flags_t; -- cgit v1.2.3