GitXplorerGitXplorer
K

REPLCompletions.jl

public
10 stars
5 forks
4 issues

Commits

List of commits on branch master.
Unverified
766e5ae3a9f5a75cfa2e6c44587767a79db90200

Backport @nolta's path completion changes

KKeno committed 11 years ago
Unverified
2c523879101ff83fa9837770d0fb954306824721

Fix a crash when completing fields of a type

KKeno committed 11 years ago
Unverified
5a87959825a8b9e4fd63b15ad10f7b5318a467fe

Preserve 0.2 compatibility

KKeno committed 11 years ago
Unverified
bd753969b65fc7e87b145a988bdd47613edb3573

Add tests for package completion

KKeno committed 11 years ago
Unverified
72be92c02d1188014c99c873d130da7c476ee6bf

Move test file to standard location

KKeno committed 11 years ago
Unverified
c74f8842de2e49999aa9e8172cfc6ad71444e756

Fix shell completer for :continue -> :incomplete rename in parser

KKeno committed 11 years ago

README

The README file for this repository.

REPLCompletions.jl

Tab completion for your Julia REPL.

Possible completions

Julia

  • [x] Names of variables and functions defined or imported to the global scope.
  • [ ] Names of variables and functions defined in the current cell/string.
  • [ ] Methods of a function if inside a function call.
  • [ ] Importable modules after using \t
  • [ ] Help for function if pos is at the beginning of a function call

Shell

  • [x] Accessible command line programs
  • [ ] Arguments for common programs (like git pull, push, commit, checkout)

The interface

The interface is very simple. There are two exported methods provided:

	completions(string,pos)
	shell_completions(string,pos)

The former provides completion of julia expression while the latter provides completion of julia shell syntax (; at the standard REPL or inside backticks).

Both functions have the same return format:

	results, range = completions(string,pos)

The first return value is an array of possible completions, while the second return value is a range specifying the part of the string that was matched. In particular this means that to execute a completion, you should replace string[range] by completion[i] for some i.