enum Tabular::Shell
#
Supported shell simulators for use with specs.
requires "tabular/shell"
Shell::Bash.simulate ["hello", "w"], "myprog"
Shell::Fish.simulate ["hello", "w"], "myprog"
Shell::Zsh.simulate ["hello", "w"], "myprog"
Members#
Bash = 0#
A Bourne Again SHell simulator.
Fish = 1#
A Friendly Interactive SHell simulator.
Methods#
#simulate(words : Array(String), prog : String, *autoload, paths = [] of String, **vars)#
Simulate the completion of the words passed to prog and return the suggestions.
shell.simulate ["hello", "w"], "prog1"
Load completions for other programs by specifying autoloads:
shell.simulate ["hello", "w"], "prog1", "prog2", "prog3"
Any paths specified are prepended to the $PATH environment variable:
shell.simulate ["hel"], "prog1", paths: ["/home/me/bin"]
Any other environment variables may be set or overridden with vars:
shell.simulate ["hel"], GOPATH=: "/home/me/bin/go"