Re: [PATCH v21 0/1] MR7843: cmd: Implement tab completion for command line entry.
eric pouech (@epo) commented about programs/cmd/lineedit.c:
+ int lastStartQuote; + int searchPos; + int insertPos; +} SEARCH_CONTEXT, *PSEARCH_CONTEXT; + + +static BOOL IsDirectoryOperation(const WCHAR *inputBuffer, const ULONG inputBufferLength) +{ + int cc = 0; + BOOL ret = FALSE; + + while (cc < inputBufferLength && (inputBuffer[cc] == L' ' || inputBuffer[cc] == L'\t')) { + cc++; + } + + if ((cc + 2 < inputBufferLength && (inputBuffer[cc + 2] == L' ' || inputBuffer[cc + 2] == L'\t')) && questionning about finding the end of first word algorithm
native behavior is very inconsistent `>cd\windows` (note that there's no space between "cd" and "\\"). is supported as command, but tab-completion on "windows" doesn't work **but** `>cd"\windows"` (idem no space, but with quotes). isn't supported as a command, but tab-completion does work since this relates to corner cases of user interaction, I'm not sure we want to mimic all these broken behaviors for consistency I'd rather suggest that you use `WCMD_parameter` to split the edit line into separate words you can then work upon this at least will provide consistency across all the code -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7843#note_101935
participants (1)
-
eric pouech (@epo)