added shell tab complete
This commit is contained in:
parent
44beab651c
commit
d5edb2bad2
4 changed files with 125 additions and 4 deletions
|
|
@ -73,6 +73,18 @@ func SetVar(variable string, value *Token, vt VarTable) {
|
|||
}
|
||||
}
|
||||
|
||||
/* lists all vars in tables
|
||||
*/
|
||||
func ListVars(vt VarTable) []string {
|
||||
keys := make([]string, len(*vt))
|
||||
i := 0
|
||||
for k := range *vt {
|
||||
keys[i] = k
|
||||
}
|
||||
|
||||
return keys
|
||||
}
|
||||
|
||||
// Library represents variables defined in inner scope
|
||||
// It is assumed library is ordered from innermost scope to outermost scope
|
||||
func GetVarFromTables(arg string, library []VarTable) *Token {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue