docs: document tab completion and bring the README up to date - #11
Merged
Conversation
Three releases of behavior landed and parts of the README still described the tool as it was before. Audit the whole file against what it actually does. Document tab completion. The prompt has completed paths since readline arrived alongside the arrow-key history, and nothing said so, which means nobody would ever try it. The keys table records what was verified over a pty rather than what readline is assumed to do: completion fills the common prefix and beeps on an ambiguity without listing the candidates, which is where `read -e` differs from an interactive shell. Correct what had gone stale: the Overview still described prompting for an input file rather than a session; a feature bullet still advertised the `owner rwx | group r-x | other r--` string that the table replaced; the "prompts for the rest" paragraph had drifted under the "Paths vs. lists" heading during earlier edits; Prerequisites named neither the Bash 3.2 floor nor the tty the session needs; Installation predated the repository having releases. Document exit codes. The README recommends the tool for cron and CI without saying that a denied permission exits 0 and only a usage error exits 2, so `dirPathPerms.sh ... || alert` never fires. Say so, and show a recipe that reads the output instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Three releases of behavior landed (#7, #9, #10) and parts of the README still described the tool as it was before. This audits the whole file against what v0.3.0 actually does.
Documents tab completion
The prompt has completed paths ever since readline arrived alongside the arrow-key history, and nothing said so — which means nobody would ever try it. Adds a keys table under Interactive:
Tab,↑/↓,Ctrl-A/E/W/U/R,q.The table records what was verified over a pty, not what readline is assumed to do. Two claims were corrected during testing:
read -e— it fills the common prefix and beeps without listing. Re-tested on a 120×40 pty in case readline was suppressing the list on a 0×0 terminal; it was not.HISTFILEis cleared), so that is now stated rather than left to guesswork.Corrects what had gone stale
qowner rwx | group r-x | other r--Modecolumn--pathgetent/dsclare only for another user's~Adds an Exit codes section
The README recommends the tool for cron and CI but never documented that a denied permission exits
0— only usage errors exit2. Anyone writingdirPathPerms.sh … || alertwould get silence forever. Now documented, with a grep-based recipe for acting on the result.Related issue
DIR-5
Validation
Documentation-only, so the value is in whether the claims are true. Every runnable claim was executed rather than eyeballed:
-P,--path,-f,--file,-w× 4,-p× 5,-a/--all,--no-color,-h,-V, positional, repeatable-P) — all pass.0; missing list file, unknown option,--file+--path, and no-tty-no-path →2./etc/pass,/var/lo,~/Doc.bash -n, 47/47 tests, gitleaks.Notes for review
Two things deliberately not done here:
/tmpreports the symlink's mode (lrwxr-xr-x) instead of the target's (drwxrwxrwt), so the tool answers "not group-writable" when it is. Raised as DIR-6. Documenting it as a caveat would enshrine a bug that should be fixed instead; say the word if you'd rather ship the caveat.assets/still showsv0.1.0and the oldFile path:prompt — the exact UX feat: check paths directly, with tilde/variable expansion and prompt history #7 removed. It needs re-capturing from a real terminal; there is no terminal-to-image tooling available to regenerate it here.docs:— README-only, so release-please will not bump the version for it.Checklist
git ls-files '*.sh' | xargs shellcheckpassesgit ls-files '*.sh' | xargs -n1 bash -npasses