Repository navigation
Releases
Releases · ycookiey/yhooky
v0.15.0
- Add:
once_perforcontext-onceanddeny-oncerules. Withonce_per = "session", a rule notes or stops only the first time per session, whatever the value read from its fields; for a note that does not depend on which file or command matched.
v0.14.0
v0.13.1
v0.13.0
- New command
yhooky notices. It printsTHIRD-PARTY-NOTICES.md, the license of code taken from other projects, andDEPENDENCY-LICENSES.txt, the licenses of the crates yhooky is built from. Both files are built into the executable, so a copy installed without the source still carries them.
v0.12.1
- Fix: the built-in checks that ask what a Bash or PowerShell command runs (
push-check-reminder,private-word-guard,post-push-reminder,public-repo-writing-reminder,wago-verb-reminder,git-add-own-checkandturn-state) now all read it the same way, as the shell would.- Quoted text, comments and heredoc bodies are data. A PR body or a commit message that mentions
git push(gh pr create --body "$(cat <<'EOF' …)",git commit -F - <<'EOF') is no longer taken for a push. - What is handed to a shell runs and is read:
bash -c "…",bash <<'EOF',cat <<'EOF' | bash, and a heredoc written to a script that the command then runs. Substitutions run too. - A
cdinside a subshell, a substitution or a function's body counts only there:(cd x) && git pushpushes from the working folder.
- Quoted text, comments and heredoc bodies are data. A PR body or a commit message that mentions
- Whether a push or a
gh pr/gh releasecommand runs at all is also still matched against the whole command outside quotes, as before. Only text shown to be data (see "How commands are read" in the README) is left out of that match, so a shell handed text in a way the new reading does not follow still counts. git-add-own-checknow joins lines continued with\. The files listed after a continued line were not checked before.
v0.12.0
New built-in check git-add-own-check (PreToolUse, Bash): stops git add <file> of a tracked file that differs from HEAD unless this session made its first change with Edit or Write, as known from the mark stage-own-edit-reminder leaves (enable both). It stops once per session and file, so the diff can be checked first, and the same command sent again goes through; a file kept by git stage-own-edit begin is stopped every time, asking to stage the session's own lines with git stage-own-edit stage. Only files named one by one are checked; -A, ., folders and globs are not. A file rewritten from the shell never meets stage-own-edit-reminder, so without this check git add could take another session's uncommitted lines into a commit.
v0.11.3
- Fix: the folder a
git push,gh pr …orgh release …runs in is now found by following thecdcommands before it, in order (a relative one from the folder reached so far), then agit -C <dir>at the start of the command itself. Text inside quotes or heredoc bodies no longer counts. Before, acdorgit -Canywhere in the command could be taken, so acdline in a PR body given with--body "$(cat <<'EOF' …)"sentpush-check-reminder,private-word-guard,post-push-reminder,public-repo-writing-reminderandwago-verb-reminderto the wrong folder. Where that folder was not a repository,push-check-reminderstopped such a push only once for the same command text, even after new commits, andprivate-word-guardlet it through unchecked.
v0.11.2
push-check-reminder: agit pushchained after agit commitin the same command (git commit -m … && git push) is now stopped every time, with a message asking to send the commit first and the push as a command of its own. A hook sees the command before it runs, so the commit made in it could not be checked before it was pushed, neither by this check (which stops the first push of each HEAD) nor byprivate-word-guard(which reads the commits not pushed yet). A push without a commit before it in the same command is stopped as before, once per session, repository and HEAD.
v0.11.1
push-check-reminderandprivate-word-guard: when the stopped command runs other commands besides the push (git add … && git commit … && git push), the message now starts by saying that the whole command was stopped and none of those commands ran either, and asks to check withgit statusandgit log -1before sending it again. Before, the message spoke only of the push, so a commit in the same command could be taken as made. Changing folders (cd) and commands that only filter the output (git push 2>&1 | tail -3) do not count.
v0.11.0
wago-verb-remindernow also notes phrases that make Japanese read as machine-written or translated from English: translated software terms (版 for "version", 回帰 for "regression"), metaphors translated from English (静かに壊れる, 黙って無視される, 〜した瞬間), words that seldom say anything (解像度, 手触り and the like), and set phrases (重要なのは, いかがでしたでしょうか and the like). Each note says when the phrase may stay. Quoted phrases (「…」,>), table rows and indented code are left out; headings are checked for words but not for set phrases. These notes, and the stop before sending, now work without the UniDic dictionary. The patterns come from yomiyasu under the MIT License; seeTHIRD-PARTY-NOTICES.md.wago-verb-remindernow also looks at the text ofgh pr create/editandgh release create/editin a public repository: the title, body and notes given in the command (inline or in a heredoc) and the files named by--body-file,--notes-fileor-F. When it finds something to note, it stops the command once per session and text, since published text is seen at once; the same command sent again goes through.