shell.completeProgram
From ComputerCraft Wiki
![]() | |
Added by ComputerCraft 1.74, shell.completeProgram() can be passed a partial file or directory name, and returns a numerically indexed table containing strings that could be used to complete it.
Unlike fs.complete(), it also checks against aliases and programs available via the path environment variable - unless an absolute path beginning with / is specified. See also: textutils.complete(), shell.complete(), shell.setCompletionFunction(), fs.complete() and help.completeTopic(). | |
Syntax | shell.completeProgram(string partial path) |
Returns | table completion list |
Part of | ComputerCraft |
API | shell |
Examples
![]() | |
Prints a list of suffixes that could be combined with "t" to get script titles. | |
Code |
textutils.tabulate( shell.completeProgram( "t" ) ) |
Output | ime, ype, plus any suffixes for files matching in the current folder. |
![]() | |
Prints a list of suffixes that could be combined with "/t" to get script titles. | |
Code |
textutils.tabulate( shell.completeProgram( "/t" ) ) |
Output | Any suffixes for files matching in the system root directory only. |