From 049bd227edb5fd65a77168de7769424b8ba44ed4 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 15 Oct 2014 12:42:55 -0700 Subject: [PATCH] Remove EXPAND_SKIP_PROCESS, which did not actually work --- expand.cpp | 13 +++---------- expand.h | 9 +++------ 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/expand.cpp b/expand.cpp index dca54f706..0eb6a72f5 100644 --- a/expand.cpp +++ b/expand.cpp @@ -1843,7 +1843,6 @@ int expand_string(const wcstring &input, std::vector &output, expa if (!(EXPAND_SKIP_HOME_DIRECTORIES & flags)) expand_home_directory(next); - if (flags & ACCEPT_INCOMPLETE) { if (! next.empty() && next.at(0) == PROCESS_EXPAND) @@ -1853,10 +1852,7 @@ int expand_string(const wcstring &input, std::vector &output, expa interested in other completions, so we short-circuit and return */ - if (!(flags & EXPAND_SKIP_PROCESS)) - { - expand_pid(next, flags, output, NULL); - } + expand_pid(next, flags, output, NULL); return EXPAND_OK; } else @@ -1864,12 +1860,9 @@ int expand_string(const wcstring &input, std::vector &output, expa append_completion(*out, next); } } - else + else if (! expand_pid(next, flags, *out, errors)) { - if (!(flags & EXPAND_SKIP_PROCESS) && ! expand_pid(next, flags, *out, errors)) - { - return EXPAND_ERROR; - } + return EXPAND_ERROR; } } diff --git a/expand.h b/expand.h index 14a4f4772..9f00378e9 100644 --- a/expand.h +++ b/expand.h @@ -50,17 +50,14 @@ enum /** Don't generate descriptions */ EXPAND_NO_DESCRIPTIONS = 1 << 6, - /** Don't do process expansion */ - EXPAND_SKIP_PROCESS = 1 << 7, - /** Don't expand jobs (but you can still expand processes). This is because job expansion is not thread safe. */ - EXPAND_SKIP_JOBS = 1 << 8, + EXPAND_SKIP_JOBS = 1 << 7, /** Don't expand home directories */ - EXPAND_SKIP_HOME_DIRECTORIES = 1 << 9, + EXPAND_SKIP_HOME_DIRECTORIES = 1 << 8, /** Allow fuzzy matching */ - EXPAND_FUZZY_MATCH = 1 << 10 + EXPAND_FUZZY_MATCH = 1 << 9 }; typedef int expand_flags_t;