Page MenuHomePhabricator

D21385.id50901.diff
No OneTemporary

D21385.id50901.diff

diff --git a/src/toolset/workflow/ArcanistShellCompleteWorkflow.php b/src/toolset/workflow/ArcanistShellCompleteWorkflow.php
--- a/src/toolset/workflow/ArcanistShellCompleteWorkflow.php
+++ b/src/toolset/workflow/ArcanistShellCompleteWorkflow.php
@@ -585,12 +585,18 @@
$matches = $this->getMatches($flags, $current);
// If whatever the user is completing does not match the prefix of any
- // flag, try to autcomplete a wildcard argument if it has some kind of
- // meaningful completion. For example, "arc lint READ<tab>" should
- // autocomplete a file.
+ // flag (or is entirely empty), try to autcomplete a wildcard argument
+ // if it has some kind of meaningful completion. For example, "arc lint
+ // READ<tab>" should autocomplete a file, and "arc lint <tab>" should
+ // suggest files in the current directory.
- if (!$matches && $wildcard) {
+ if (!strlen($current) || !$matches) {
+ $try_paths = true;
+ } else {
+ $try_paths = false;
+ }
+ if ($try_paths && $wildcard) {
// TOOLSETS: There was previously some very questionable support for
// autocompleting branches here. This could be moved into Arguments
// and Workflows.

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 17, 11:46 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7382527
Default Alt Text
D21385.id50901.diff (1 KB)

Event Timeline