<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Shell.complete</id>
		<title>Shell.complete - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Shell.complete"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Shell.complete&amp;action=history"/>
		<updated>2026-07-11T09:44:11Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Shell.complete&amp;diff=7171&amp;oldid=prev</id>
		<title>Bomb Bloke: Created page with &quot;{{lowercase}} {{Function |name=shell.complete |args={{Type|string}} partial command line |returns={{Type|table}} completion list |api=shell |addon=ComputerCraft |desc=Added by...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Shell.complete&amp;diff=7171&amp;oldid=prev"/>
				<updated>2015-08-01T11:49:47Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{lowercase}} {{Function |name=shell.complete |args={{Type|string}} partial command line |returns={{Type|table}} completion list |api=shell |addon=ComputerCraft |desc=Added by...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{lowercase}}&lt;br /&gt;
{{Function&lt;br /&gt;
|name=shell.complete&lt;br /&gt;
|args={{Type|string}} partial command line&lt;br /&gt;
|returns={{Type|table}} completion list&lt;br /&gt;
|api=shell&lt;br /&gt;
|addon=ComputerCraft&lt;br /&gt;
|desc=Added by ComputerCraft 1.74, shell.complete() can be passed a partial command (as would be typed into the command line of [[CraftOS]]), and returns a numerically indexed table filled with strings that could be combined with it to complete the next word. It is primarily called upon by CraftOS, in order to provide its autocomplete functionality.&lt;br /&gt;
&lt;br /&gt;
If the string passed in contains only a single word, then suggestions will simply be suffixes that could be used to create a valid program name. If it contains multiple words, [[shell.setCompletionFunction|then if the first refers to a script with a completion function registered against it]], that function will be used to determine suggestions for the subsequent parameters. For example, a wrapper function for [[help.completeTopic]]() is registered as the completion function for the [[help]] script; other scripts may have far more complicated completion functions assigned. The default set of such functions are defined within [https://github.com/alekso56/ComputercraftLua/blob/master/rom/startup the startup file located within the rom directory] (which is loaded by [[CraftOS]] during boot).&lt;br /&gt;
&lt;br /&gt;
See also: [[textutils.complete]](), [[fs.complete]](), [[shell.setCompletionFunction]](), [[shell.completeProgram]]() and [[help.completeTopic]]().&lt;br /&gt;
|examples=&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Using the [[shell.setCompletionFunction|completion function]] defined for the [[help|&amp;quot;help&amp;quot; script]] (by [https://github.com/alekso56/ComputercraftLua/blob/master/rom/startup rom/startup]), returns a list of suffixes that would resolve as command lines when added to the string &amp;quot;help tu&amp;quot;.&lt;br /&gt;
|code=&lt;br /&gt;
 for _, match in pairs( shell.complete( &amp;quot;help tu&amp;quot; ) ) do print( match ) end&lt;br /&gt;
|output=nnel&lt;br /&gt;
rn&amp;lt;br&amp;gt;&lt;br /&gt;
rtle&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:API_Functions]]&lt;/div&gt;</summary>
		<author><name>Bomb Bloke</name></author>	</entry>

	</feed>