Expand description
Script builders — ports of script_cd / script_mkdir_cd /
script_clone / script_worktree / script_delete / script_ascend /
script_rename (try.rb:1411-1467). Every byte matters: the emitted
strings are pinned by test_05/07/12/16/31/37.
Functions§
- script_
ascend script_ascend(try.rb:1441-1457):git worktree movewhen the source has a.gitfile (worktree marker), plainmvotherwise; then a symlink back into the tries dir, theGraduated:echo (with a literal→), and a cd to the destination.- script_
cd script_cd(try.rb:1411-1413). The leadingtouchbumps mtime, which feedsbase_scorerecency — selecting a try boosts its future ranking. That feedback loop is a feature, not an accident.- script_
clone script_clone(try.rb:1419-1421). Upstream hardcodes single quotes around the URI (git clone '#{uri}') instead ofq()— preserved.- script_
delete script_delete(try.rb:1434-1439): cd into the base,test -dguard per basename, then restore the original PWD with a base-path fallback.- script_
mkdir_ cd script_mkdir_cd(try.rb:1415-1417).- script_
rename script_rename(try.rb:1459-1467).- script_
worktree script_worktree(try.rb:1423-1432). The innersh -cguard adds the worktree (detached) only when inside a work tree and always exits 0, so a non-git source still mkdir+cds.repo = Noneis the current-directory variant (no-C);srcis what the echo names.