I just discovered another bug with tab completion in fshell. It appears as though parameters that contain spaces AND have an opening quote but no closing quote are not being expanded properly. The use case looks something like this:
MyCommand "Some Param
In these cases, when the user requests the parameter to be expanded using the TAB button, I'd expect a list of options which include nested spaces and are quote-delimited to be returned but currently a parsing error gets thrown.
Also, based on my ad-hoc tests this bug is a bit more complex than it appears because even though a proper completion match may look something like "Some Param Value", we can't return this full quoted string to readline bcause by default readline parses tokens that are separated by space characters and it has no knowledge of escape characters or quotes or any such thing. So we'll need to pre-process the resulting matches so the data is returned to readline in a way it can understand, without having to make users of the fshell framework have to deal with this.
I just discovered another bug with tab completion in fshell. It appears as though parameters that contain spaces AND have an opening quote but no closing quote are not being expanded properly. The use case looks something like this:
In these cases, when the user requests the parameter to be expanded using the TAB button, I'd expect a list of options which include nested spaces and are quote-delimited to be returned but currently a parsing error gets thrown.
Also, based on my ad-hoc tests this bug is a bit more complex than it appears because even though a proper completion match may look something like "Some Param Value", we can't return this full quoted string to readline bcause by default readline parses tokens that are separated by space characters and it has no knowledge of escape characters or quotes or any such thing. So we'll need to pre-process the resulting matches so the data is returned to readline in a way it can understand, without having to make users of the fshell framework have to deal with this.