enum
Tabular::Shell
Overview
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"
Defined in:
tabular/shell.crEnum Members
-
Bash =
0 -
A
Bourne Again SHellsimulator. -
Fish =
1 -
A
Friendly Interactive SHellsimulator. -
Zsh =
2 -
A
Z-SHellsimulator.
Instance Method Summary
-
#bash?
Returns
trueif this enum value equalsBash -
#fish?
Returns
trueif this enum value equalsFish -
#simulate(words : Array(String), prog : String, *autoload, paths = [] of String, **vars)
Simulate the completion of the words passed to prog and return the suggestions.
- #to_sym
-
#zsh?
Returns
trueif this enum value equalsZsh
Instance Method Detail
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"