Conversation
* Use bash arrays to load and iterate over paths * Use bash builtin regex and paramater expansion to filter files * Drop the dependency to perl in this function
* test, [ are limited commands, [[ is built in ** http://mywiki.wooledge.org/BashFAQ/031
* Dirname can be done with parameter expansion * All variables should be quoted to avoid wordsplitting ** http://mywiki.wooledge.org/BashFAQ/028
* Use bash arrays to load and iterate over paths safely
* Bad things can happen if you don't sanity check cd
|
Also current text highlighting defaults are incompatible with more. See pull request #12 for details and a bit better impl. |
|
hmm some of these should be separate pull-requests but i'll take a look |
|
cherry-picked some but now a few wont apply properly |
|
I was back and forth between submitting multiple pull-requests, or just breaking it into separate commits. I went with separate commits simply because I'm not adding any new features per se. I wanted to optimize this for speed, sanity check all lines that could possibly error out, as well as minimize the call to outside programs and prefer bash built-ins. I realize now that some of the commits are dependent on the others, and cherry-picking a select few most likely won't work. If you want to pull-in some of the changes I can modify this for separate pull-requests to clearly identify/separate the changes. |
chdir(2)less(1)cat(1)dirname(1), etc.test(1),[(1)are limited, external commands.[[is built-in and more robustlist_pages()