File wsh_shell_autocomplete.c
FileList > src > wsh_shell_autocomplete.c
Go to the source code of this file
#include "wsh_shell_autocomplete.h"
Public Functions
| Type | Name |
|---|---|
| WshShell_Bool_t | WshShellAutocomplete_Try (WshShell_Char_t * pInBuff, WshShell_Size_t inBuffLen, WshShellCmd_Table_t * pShellCommands) Attempts to autocomplete the command in the input buffer. |
Public Functions Documentation
function WshShellAutocomplete_Try
Attempts to autocomplete the command in the input buffer.
Scans the registered command table and tries to match the current input as a prefix. If possible, it autocompletes the input buffer:
- If no matches are found, the buffer is not changed.
- If one match is found, the buffer is completed with the full command name.
- If multiple matches are found with a shared prefix, the buffer is extended to the longest matchable prefix.
This function is typically triggered by the user pressing the Tab key.
Parameters:
pInBuffPointer to the input buffer to modify.inBuffLenTotal size of the input buffer.pShellCommandsPointer to the command table to search.
Return value:
trueThe buffer was modified (i.e., autocomplete was applied).falseNo autocomplete was possible (zero matches or ambiguous match).
The documentation for this class was generated from the following file src/wsh_shell_autocomplete.c