You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/14 18:50:00 UTC
[GitHub] [incubator-nuttx] gustavonihei opened a new pull request #3716: tools: Add a bash completion script for the configure tool
gustavonihei opened a new pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716
## Summary
This PR intends to add support for bash completion for the `./tools/configure.sh` script.
It currently supports completion both for the board name and the configuration, even when arguments are passed to the `./tools/configure.sh` script.
## Impact
No impact, new feature that is not automatically enabled.
## Testing
The user is required to execute on the working terminal:
`source tools/configure_completion.bash`

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
patacongo edited a comment on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841688765
Ignoring Bash, the functionality could be implemented in C as well (as NSH does). There is no magic here. But it certainly would be a bigger job. That is why I suggest it probably would not be worth the effort.
Currently, configure.c gets its input via argv[] and parses that using getopt(). If one really wanted to implement this in configure.c, this would all have to be replaced with custom, interactive logic. It is not impossible, just not worth the effort.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] btashton commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841728344
@gustavonihei looks like you deleted the branch? I think this is useful and we can merge it, I was just trying to understand what Greg was suggesting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] btashton edited a comment on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
btashton edited a comment on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841688118
Sorry still not following, the change is not to the configuration tool, it is to enable bash to give suggestions when you press tab on the command line. To support another shell this would have to be implemented with whatever that shell uses for the auto complete.
https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] btashton commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841728344
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] patacongo commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841688765
Ignoring Bash, the functionality could be implemented in C as well (as NSH does). There is no magic here. But it certainly would be a bigger job. That is why I suggest it probably would not be worth the effort.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] btashton commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841688118
Sorry still not following the change is not to the configuration tool, it is to enable bash to give suggestions when you press tab on the command line. To support another shell this would have to be implemented with whatever that shell uses for the auto complete.
https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] patacongo commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841687414
This particular implementation would only work in a Bash shell, but the identical functionality could be implemented in C as well. The underlying functionality does not depend on Bash.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis merged pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
acassis merged pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] btashton commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841729515
Ah missed that, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
patacongo edited a comment on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841687414
This particular implementation would only work in a Bash shell, but the identical functionality could be implemented in C as well. The underlying functionality does not depend on Bash.
I am not sure that it is really important to do that but, on the other hand, we do not want the functionality to drift apart either too far either.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] btashton commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841685312
> This feature should be ported to tools/configure.c as well. configure.c is used on platforms that do not support bash scripting (or for which people may want slightly faster configurations). It is the default configuration tool for the Windows native build.
This would only work for a bash shell as it is giving bash context on what the arguments can be for auto complete. I guess it could be updated to work on the compiled config tool, but you would still need to be in a bash shell. Is that what you were asking?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] patacongo commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841659665
This feature should be ported to tools/configure.c as well. configure.c is used on platforms that do not support bash scripting (or for which people may want slightly faster configurations). It is the default configuration tool for the Windows native build.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] gustavonihei commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841729413
> @gustavonihei looks like you deleted the branch? I think this is useful and we can merge it, I was just trying to understand what Greg was suggesting.
@btashton It has already been merged some hours ago by @acassis.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] gustavonihei commented on pull request #3716: tools: Add a bash completion script for the configure tool
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on pull request #3716:
URL: https://github.com/apache/incubator-nuttx/pull/3716#issuecomment-841729413
> @gustavonihei looks like you deleted the branch? I think this is useful and we can merge it, I was just trying to understand what Greg was suggesting.
@btashton It has already been merged some hours ago by @acassis.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org