Page MenuHomePhabricator

Shell completion can be improved
Closed, DuplicatePublic

Description

The shell completion script (arcanist/resources/shell/bash-completion) and the corresponding workflow (ArcanistShellCompleteWorkflow) can generally be improved. In particular, there are no completions for the following:

  • arc branch --output
  • arc browse --branch
  • arc close --status
  • arc diff --base
  • arc diff --cc
  • arc diff --reviewers
  • arc feature --output
  • arc get-config
  • arc help
  • arc land --onto
  • arc land --remote
  • arc lint --engine
  • arc lint --output
  • arc lint --severity
  • arc set-config
  • arc tasks --order
  • arc tasks --owner
  • arc tasks --status
  • arc unit --engine
  • arc unit --output

In addition, the following should not provide any completions:

  • arc alias
  • arc backout
  • arc close
  • arc close-revision
  • arc download
  • arc flag
  • arc mark-committed
  • arc patch
  • arc revert
  • arc todo

Event Timeline

joshuaspence raised the priority of this task from to Low.
joshuaspence updated the task description. (Show Details)
joshuaspence added a subscriber: joshuaspence.
joshuaspence renamed this task from Shell completion doesn't work for help command. to Shell completion can be improved..May 20 2014, 12:58 PM
joshuaspence updated the task description. (Show Details)

Additionally, I feel that the completion for flags (--some-flag) shouldn't kick in unless the user has already type --.

Current behavior

> arc tasks <TAB>
--limit       --order       --owner       --status      --unassigned
> arc tasks --<TAB>
--limit       --order       --owner       --status      --unassigned

Expected behavior

> arc tasks <TAB>

> arc tasks --<TAB>
--limit       --order       --owner       --status      --unassigned
joshuaspence renamed this task from Shell completion can be improved. to Shell completion can be improved.Jul 10 2014, 9:01 PM