ivy icon indicating copy to clipboard operation
ivy copied to clipboard

ability to list variable names

Open fzipp opened this issue 3 years ago • 0 comments

Sometimes I would like to see the user-defined variables and functions, e.g. in a long-running session, or after I loaded a library or a saved session. I can list the function names with )op, but there is no way to list the variable names.

Two possible implementations come to my mind: either a new special command for variables, like )var or )vars, or list them under the )op command as "nullary" ops or simply as variables. In this case it might make sense to rename )op to a more generic name like )defs.

Dyalog APL has the commands )VARS, )FNS and )OPS.

There is another use-case for this feature: I have written a line editor wrapper for the ivy command: https://github.com/fzipp/ivy-prompt It supports among other things tab-completion for built-in keywords, but also for user-defined functions. It queries their names with the )op command. I would like to support it for user-defined variables, too.

fzipp avatar May 26 '22 19:05 fzipp