diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-06-29 16:40:54 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-06-29 16:40:54 -0700 |
commit | 40e4f49dbe483cef84edbea5e7a723e21c0f5e2e (patch) | |
tree | 0cd1d0b0008e26b33ff466f570c44eb750d54d4e /expand.cpp | |
parent | 05c721bebbdf6752b66595177194ea174e25f3c5 (diff) |
Disable process expansion in autosuggestions
Diffstat (limited to 'expand.cpp')
-rw-r--r-- | expand.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -379,7 +379,7 @@ static int find_process( const wchar_t *proc, { { - wcstring result = format_string(L"%ld", (long)j->pgid); + wcstring result = to_string((long)j->pgid); out.push_back(completion_t(result)); found = 1; } @@ -409,7 +409,7 @@ static int find_process( const wchar_t *proc, } else { - wcstring result = format_string(L"%ld", (long)j->pgid); + wcstring result = to_string((long)j->pgid); out.push_back(completion_t(result)); found = 1; } @@ -1502,7 +1502,8 @@ int expand_string( const wcstring &input, std::vector<completion_t> &output, exp interested in other completions, so we short-circut and return */ - expand_pid( next, flags, output ); + if (! (flags & EXPAND_SKIP_PROCESS )) + expand_pid( next, flags, output ); return EXPAND_OK; } else @@ -1512,7 +1513,7 @@ int expand_string( const wcstring &input, std::vector<completion_t> &output, exp } else { - if( !expand_pid( next, flags, *out ) ) + if( ! (flags & EXPAND_SKIP_PROCESS ) && ! expand_pid( next, flags, *out ) ) { return EXPAND_ERROR; } |