Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15396083
D21385.id50901.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21385.id50901.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D21385: When tab-completing "arc" commands, suggest paths if the argument is empty and a path wildcard argument exists
Attached
Detach File
Event Timeline
Log In to Comment