Skip to content

[Feature request] Allow `:def` commands to use completion

Motivation

Easier use of :def commands

Proposal

ghci's :def command is useful in defining nice macros.

As far as I can tell, these when these macros are later used, tab-completion does nothing when passing arguments to the command defined. It would be nice if there was a mechanism to allow the user to specify what kind of completion would be appropriate for it. I can think of 3 obvious choices:

  • None (current behavior)
  • File (complete as if the argument is a file-name in the current file-system)
  • Binding (complete as if the argument is a name in the current scope)

Other options might be possible, but this looks like a good start.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information