Re: Shell alias support for NSH

2023-03-09 Thread Ville Juven
Thanks for the responses This feature already exist > https://github.com/apache/nuttx-apps/blob/master/nshlib/Kconfig#L126-L146 > As far as I can understand, that is for backquotes `foo` which is a type of variable expansion. What I need is support for single quotes 'foo' which means that

Re: Shell alias support for NSH

2023-03-09 Thread Sebastien Lorquet
Hi, If I am not mistaken, the existing NSH_CMDPARMS feature will just execute the command once and copy the stdout into the var? Aliases are more like virtual commands, that execute their contents when run. This is distinct from built-in commands and user implemented programs. Sebastien

Re: Shell alias support for NSH

2023-03-09 Thread Xiang Xiao
On Thu, Mar 9, 2023 at 6:14 PM Ville Juven wrote: > Hi all, > > I'm in the process of writing support for shell aliases into NSH, but since > the shell is the front end for NuttX I decided to make a post here for > opinions on this matter and to open discussion for requirements, mostly to >

Re: Shell alias support for NSH

2023-03-09 Thread Sebastien Lorquet
Hello, I think you did things very,very well, thank you for this. Here is some feedback: 1 - aliases are not required for me, but It could still be a worthwile feature for others, and it's a requirement for you. 2 - this feels ok for me, since this is generally a better behaviour of the

Shell alias support for NSH

2023-03-09 Thread Ville Juven
Hi all, I'm in the process of writing support for shell aliases into NSH, but since the shell is the front end for NuttX I decided to make a post here for opinions on this matter and to open discussion for requirements, mostly to prevent unexpected regression issues that might arise from this.