4 ms·
I agree, if it were entirely Perl it would have essentially no dependencies. Right now the audience is limited to those with a currently functioning Python3 env
by bihla 8y ago
I agree, if it were entirely Perl it would have essentially no dependencies. Right now the audience is limited to those with a currently functioning Python3 environment or willing to configure one.
My only concerns are:
I do not know what the process of getting comparable tab completion would be in Perl. I depended on the argcomplete package for this feature which I consider to be essential...the clarity of the syntax depends on being a bit verbose, and this is only usable because tab completion makes it fast to use.
Also, I'm somewhat reluctant to develop in Perl, though I'm willing to do it provided the benefit + demand is there. It would be ironic to have learned Perl as a consequence of building a tool whose primary function is to prevent one having to learn Perl.
I'll send you an email to discuss further.
- acqq 8y agoI haven't used the following (I simply never had to implement the shell autocompletion as try I avoid the shell as much as I can, preferring to organize my code in the actual files that I can reuse from my editor) but I guess it can be the best start to include significant parts of this code inside of your final script, if the goal can be to have a single easily usable script doing everything, as somebody mentioned that ideal here (still take care to keep the compatible/same license): https://fastapi.metacpan.org/source/PERLANCAR/Complete-Bash-0.320/lib/Complete/Bash.pm https://fastapi.metacpan.org/source/PERLANCAR/Complete-Bash-... You can surely omit the lines between =pod and =cur (they are used to create the documentation) and most probably also the "description" parts. > It would be ironic to have learned Perl as a consequence of building a tool whose primary function is to prevent one having to learn Perl. It's less ironic than you think, I consider it the bigger irony that Python turned to be the major compatibility problem in all but single-user single-program environments (it's really not trivial to have to work with more Python variants as the dependencies for different code). You can be sure that any Perl 5 skills you obtain can remain quite portable and usable across the different environments. I've also already written here, I consider Perl significantly "safer" language than Python: when I modify some big Perl scripts, very often the Perl compiler (when used with the "use strict" and -w option) will tell me early enough what is missing for a program to function correctly again, as Perl simply more explicit, in some weird way almost like the typed languages. I never have the same feeling of "it will work" with the modification of the Python scripts. That "line noise" is actually meaningful, much more consistent than the shell languages, and safer in case of the changes than Python.