Tab autocomplete in Pkg REPL-mode


#1

I mostly run julia from the REPL in a system shell (Mac or Linux). Doing include("path/to/envir[tab] ... will complete the path or show options if not unique. However, in Pkg mode (i.e., via ‘]’), tab autocomplete doesn’t work for path names. I’d like to do:

(0.7) pkg> activate path/to/envir[tab]

but pressing the tab key does nothing (well, it flashes a different color prompt). I’ve been using v-0.7, but I also tried v-1.0.3. Am I missing something? Should I submit an issue?


#2

I think this is fixed in the julia-1.1 release candidate now available for download — I suggest giving that a try before submitting an issue.


#3

Pkg tab-completions should be fairly comprehensive by 1.1.

You can tab complete: commands, flags, and arguments. The completion system is aware of the current command. So pkg> add [tab] will complete packages in the registry, and pkg> rm [tab] will complete packages which have been installed in the active environment. If you forget what a specific command is called, you can do pkg> [tab] and it will suggest all known commands.

The completion system is even aware of flags: e.g. pkg> activate --shared [tab] will autosuggest shared environments.


#4

Ah, yes after testing julia-1.1 I see this is working. Thanks.