Repository navigation
Description
Goal: install.sh and openRepoShape --install refuse, before any request and before any line that names it, a $OPENREPOSHAPE_BIN_DIR that holds a character a terminal draws as something other than itself, or print the directory so that it cannot be drawn so.
Filed by lane openRepoShape-5, from the checklist candidate 1 of #760's PR (#804, writer w760: "A bidi override or a zero-width character in $OPENREPOSHAPE_BIN_DIR is echoed as typed", measured by w760 under C.UTF-8). Candidate 2 of the same report (a C1 control under LC_ALL=C) is not here: #804's fix round (efd061a7) closed it. Read from source and measured here as the first line says; no run on macOS or Windows.
Lands after: lane 5's #760 (PR #804, fix/760-bin-dir-control-chars, head efd061a7, based on main). It adds the control-character refusal in both files, which this issue widens; main has a newline and a colon refusal in the command (openRepoShape) only. Every path:line below is at that head.
Lines
- The check passes every format character.
install.sh:389andopenRepoShape:471run(LC_ALL=C; case "$dir" in *[[:cntrl:]]* | *$'\302'[$'\200'-$'\237']*) exit 0 ;; *) exit 1 ;; esac): the C0 controls and DEL, and U+0080 to U+009F by their two bytes. Measured here (bash 5.2.21, that exact subshell, a value/tmp/x+ the character +yz): U+202E (RIGHT-TO-LEFT OVERRIDE), U+200B (ZERO WIDTH SPACE), U+2028 (LINE SEPARATOR) and U+FEFF (ZERO WIDTH NO-BREAK SPACE) all pass; U+009B and U+001B are refused. install.sh and openRepoShape: both refuse a$OPENREPOSHAPE_BIN_DIRholding a control character before they name it, and install.sh refuses a:before its fetch, so a carriage return or an escape is no longer echoed as typed (#760) #804's own comment says "U+2028 and U+2029 are refused in none" (install.sh:382). w760 judged that none of them forges a line or runs on a terminal (no terminal was tried here), but a U+202E in the directory makes what follows it read reversed, and the PATH note (openRepoShape:568-570:$dir is not on \$PATH. Add it:), theplaced in $dirline (:554), the colon refusal (:498, which names the directory) andinstall.sh'spreflight:(:514) anddone:lines (:541-553) print it as typed.checked_repoand the other[![:print:]]checks of both files (install.sh:128,:151;openRepoShape:614,:657) have the same gap under a UTF-8 locale, per w760 (not re-run here).
Direction: decide the set, and keep U+200C and U+200D (ZERO WIDTH NON-JOINER and JOINER) out of it: a directory named in Persian, in an Indic script or with an emoji sequence holds them, andNOT_CONTROLS(tests/test_openreposhape_command.py, install.sh and openRepoShape: both refuse a$OPENREPOSHAPE_BIN_DIRholding a control character before they name it, and install.sh refuses a:before its fetch, so a carriage return or an escape is no longer echoed as typed (#760) #804's list of names the check must not refuse, which holds a no-break space for its first byte 0xC2) is where such a name is pinned. The bidi controls (U+061C, U+200E, U+200F, U+202A to U+202E, U+2066 to U+2069), U+2028 and U+2029, U+200B and U+FEFF are the candidates. Name their bytes in the sameLC_ALL=Csubshell as the C1 rule does (U+202E is the three bytes\342\200\256), so the answer does not depend on the locale. The other way is to refuse nothing more and print the directory throughLC_ALL=C printf '%q': measured here, underLC_ALL=Cit prints U+202E as$'/tmp/x\342\200\256yz', and underC.UTF-8it prints the character raw, so theLC_ALL=Cis what does it, and acaf+ U+00E9 directory is printed as octal too, which a person may not want. bash 3.2 (macOS) was not run, and itsprintf '%q'may differ.
Verify: tests/test_openreposhape_command.py, tests/test_install_sh.py, tests/test_install_sh_filter_repo.py and tests/test_openreposhape_package.py pass on Linux. New cases beside #804's UNNAMEABLE_BIN_DIRS and C1_BIN_DIRS, for each character chosen, under C and C.UTF-8 (LOCALES), through install.sh and through the command: exit 2, install.sh makes no request (the fake curl records none), nothing is placed, neither stream holds the value. A new NOT_CONTROLS entry for U+200C and U+200D, and for a name that holds a letter the locale prints. A mutant for each byte named, in the order #804's mutation table uses, each caught. The three files tests-git-bash runs, with CRLF write_text emulated as #804 ran them. A value crossing the environment into Git Bash is Windows-only and is not run here.
Overlaps. #804 (fix/760-bin-dir-control-chars) is the only open branch that edits install.sh, openRepoShape, tests/test_install_sh.py or tests/test_openreposhape_command.py. install.sh is a release asset and openRepoShape is the launcher: neither is a pinned shape copy, so no upstream-changed row follows. No README, handbook or docs/cli.md sentence names these characters; --help is unchanged.
Parent: #461.
Milestone: v1.1.1. The value is the person's own environment variable; nothing is lost, and a directory that reads as another is a display fault the person who typed it sees. It is not a regression and blocks nothing in v1.1.0.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 17, 2026
CLAIMED — lane openRepoShape-2, session 81650e29-c906-4fe8-96c9-55580bfe0c44@Eagle, 2026-10-17T17:13:10Z, for #837
Logged in
lanes/log/openRepoShape-2.mdatc7d287e9665bb6ae827f1dcd63aa36913913651f.The three reads (lane-collision-protocol Rule 1):
install.sh and openRepoShape: the repository, a version, a ref, an op…
install.sh and openRepoShape: a `$OPENREPOSHAPE_BIN_DIR` the bytes re…