![]() ![]() The idea is to use the original bash completion with aliases even with parameters. I wrote an 'alias wrapper' script a couple of years ago. As I mentioned at the bottom UPDATE1 section: you need to tune the COMP variables then call the original function Even the example used there is the same, but investigating the code further, it looks I did write this and used a different approach, and maybe this will help you understand what's going on. ![]() If ] thenĬomplete -o default -F _start_arduino-cli arduino-cliĬomplete -o default -o nospace -F _start_arduino-cli arduino-cliĪfter I posted this I checked your links and after seeing the accepted answer here, I was thinking I am just old and forget that I just copied this code from that link, and it wasn't me who wrote it. # if the completer is dynamic and not yet loaded, try to load it # args are appended to either src-command or dst-command. # if we aren't processing the delimiter, then all other Currently bash, zsh, fish, and powershell shells are. # the next argument (the real completion handler). arduino-cli supports command-line completion (also known as tab completion) for basic commands. # when we reach the delimiter, also shift in comp-func as # to the real completion handler, comp-func, to produce the dst-command is the leading args of the command-line passed src-command is the trigger that invokes the real completion # of variable length, src-command and dst-command: # parse the command-line by splitting it into two command-lines Printf "usage:\n\tcomplete-subcmd src-command.
0 Comments
Leave a Reply. |