repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

harness setting

8effe1eb6b25bdb00fa93ef2e7b72143a0844897

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (7)

claude/settings.json

Modified
2 + "cleanupPeriodDays": 99999,
3 + "env": {
4 + "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "300000"
5 + },
2 6 "permissions": {
3 7 "defaultMode": "bypassPermissions"
47 51 "feature-dev@claude-plugins-official": true,
48 52 "commit-commands@claude-plugins-official": true,
49 53 "atlassian@claude-plugins-official": true,
50 - "jdtls-lsp@claude-plugins-official": true,
54 + "jdtls-lsp@claude-plugins-official": false,
51 55 "remember@claude-plugins-official": false,
52 56 "caveman@caveman": true,
53 57 "superpowers@claude-plugins-official": true,
54 58 "frontend-design@claude-plugins-official": true,
55 - "learning-output-style@claude-plugins-official": true,
56 - "coderabbit@claude-plugins-official": true,
59 + "learning-output-style@claude-plugins-official": false,
60 + "coderabbit@claude-plugins-official": false,
57 61 "desktop-commander@claude-plugins-official": true,
58 - "code-modernization@claude-plugins-official": true
62 + "code-modernization@claude-plugins-official": true,
63 + "playwright@claude-plugins-official": false,
64 + "security-guidance@claude-plugins-official": true,
65 + "pr-review-toolkit@claude-plugins-official": false,
66 + "claude-code-setup@claude-plugins-official": true,
67 + "claude-md-management@claude-plugins-official": true,
68 + "chrome-devtools-mcp@claude-plugins-official": true,
69 + "plugin-dev@claude-plugins-official": true,
70 + "explanatory-output-style@claude-plugins-official": false,
71 + "playground@claude-plugins-official": true,
72 + "terraform@claude-plugins-official": true,
73 + "security-guidance@claude-code-plugins": true,
74 + "kernel-cli@kernel": true
60 76 "extraKnownMarketplaces": {
61 77 "claude-code-plugins": {
69 85 "source": "github",
70 86 "repo": "JuliusBrussee/caveman"
88 + },
89 + "kernel": {
90 + "source": {
91 + "source": "github",
92 + "repo": "kernel/skills"
93 + }
74 - "effortLevel": "xhigh",
96 + "effortLevel": "high",
75 97 "advisorModel": "opus",
76 98 "promptSuggestionEnabled": false,
77 99 "tui": "fullscreen",
81 103 "verbose": true,
82 104 "inputNeededNotifEnabled": true,
83 105 "agentPushNotifEnabled": true,
84 - "skipAutoPermissionPrompt": true,
85 - "cleanupPeriodDays": 99999,
86 - "env": {
87 - "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "300000"
88 - }
106 + "skipAutoPermissionPrompt": true

claude/statusline.js

Modified
27 27 usageAlways: true,
28 28 usageWarnPct: 50,
29 29 usageCritPct: 80,
30 31 costStyle: "icon", // "slash" → $0.15/turn | "icon" → bright $0.15 + dim trailing glyph
31 32 gitCacheTtlMs: 8000, // git status spawn is ~400ms cold on win32 — cache harder
32 33 extraTtlMs: 120000,
36 37 burnWindowMs: 10 * 60000, // sliding window of cost samples to rate over
37 38 burnMinSpanMs: 60000, // need ≥ this much elapsed inside window before showing
38 39 burnMaxSamples: 60, // cap stored samples per session (keeps ledger small)
40 + // burn-rate color: truecolor gradient stops ($/hr). grounded in this ledger
41 + // (median ~$9.5, p90 ~$19, peak intervals ~$50) + Opus 4.8 pricing ($5/$25/MTok):
42 + // ~$8 calm single-stream · ~$18 heavy/active · ~$36+ parallel-agent burn.
43 + // smooth lerp between stops — these are gradient anchors, not hard tiers.
44 + burnCool: 8, // ≤ this → pure green (calm)
45 + burnWarn: 18, // amber midpoint (≈ p90 — notably elevated)
46 + burnHot: 36, // ≥ this → pure red (HOT — deep tail)
47 + burnBold: 28, // ≥ this → bold weight (visual alarm)
41 50 const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), ".claude");
52 61 blue: (s) => `${E}[34m${s}${R}`,
53 62 dim: (s) => `${E}[2m${s}${R}`,
54 63 white: (s) => `${E}[97m${s}${R}`,
55 - orange: (s) => `${E}[38;5;172m${s}${R}`,
64 + accent: (s) => `${E}[93m${s}${R}`, // bright yellow — warm badge accent (no orange in the 16-index palette)
57 -const pctColor = (p, warn, crit) => (p >= crit ? c.red : p >= warn ? c.yellow : c.green);
59 -const PARTIALS = ["", "▏", "▎", "▍", "▌", "▋", "▊", "▉"];
60 -function bar(pct, width, color) {
61 - let p = Math.max(0, Math.min(100, pct));
62 - let filled = (p / 100) * width;
63 - let full = Math.floor(filled);
64 - let pIdx = Math.round((filled - full) * 8);
65 - if (pIdx === 8) {
66 - full += 1;
67 - pIdx = 0;
68 - }
69 - if (full > width) full = width;
70 - const partial = pIdx > 0 && full < width ? PARTIALS[pIdx] : "";
71 - const used = full + (partial ? 1 : 0);
72 - const empty = Math.max(0, width - used);
73 - return color("█".repeat(full) + partial) + c.dim("░".repeat(empty));
67 +const lerp = (a, b, t) => Math.round(a + (b - a) * t); // single channel
68 +const mix = (from, to, t) => from.map((v, i) => lerp(v, to[i], t)); // 3-channel lerp
70 +// Shared color basis. Base colors are ANSI 16-index (38;5;N, N<16) so the terminal THEME
71 +// remaps them on dark↔light. A gradient between two indices can't itself be an index, so
72 +// it's lerp'd in truecolor from each index's reference RGB — only the transient middle of
73 +// a ramp is non-adaptive; every anchor follows the theme.
74 +const IDX = { calm: 12, warn: 13, crit: 9 }; // bars: blue → magenta → red (all theme-adaptive)
75 +const BURN = { cool: 2, warm: 3, hot: 1 }; // 🔥 burn: green → yellow → red (kept distinct from bars)
76 +const IDX_RGB = { 1: [205, 0, 0], 2: [0, 205, 0], 3: [205, 205, 0], 9: [255, 0, 0], 13: [255, 0, 255] }; // xterm refs — lerp blends only
77 +const sgr = (code, s) => `${E}[${code}m${s}${R}`;
78 +const idxColor = (n, bold) => (s) => sgr(`${bold ? "1;" : ""}38;5;${n}`, s); // adaptive anchor
79 +const rgbColor = (rgb, bold) => (s) => sgr(`${bold ? "1;" : ""}38;2;${rgb[0]};${rgb[1]};${rgb[2]}`, s); // blend
81 +// 🔥 burn-rate color: green (calm) → yellow → red (HOT, bold past burnBold). anchors are
82 +// indices; the warming middle is a truecolor blend. render gates on burnRate>0 (no NaN).
83 +function burnColor(rate, label) {
84 + const { burnCool, burnWarn, burnHot, burnBold } = CONFIG;
85 + const bold = rate >= burnBold;
86 + if (rate <= burnCool) return idxColor(BURN.cool, bold)(label);
87 + if (rate >= burnHot) return idxColor(BURN.hot, bold)(label);
88 + const rgb =
89 + rate <= burnWarn
90 + ? mix(IDX_RGB[BURN.cool], IDX_RGB[BURN.warm], (rate - burnCool) / (burnWarn - burnCool))
91 + : mix(IDX_RGB[BURN.warm], IDX_RGB[BURN.hot], (rate - burnWarn) / (burnHot - burnWarn));
92 + return rgbColor(rgb, bold)(label);
95 +const trough = idxColor(IDX.calm, false); // empty cells — same adaptive index as calm, ░ glyph separates
96 +// severity → colorizer. all three anchors are ANSI indices (theme-adaptive); only the
97 +// strictly-between warn→crit blend is truecolor (lerp of the two anchors' reference RGB).
98 +function meterColor(pct, warn, crit) {
99 + if (pct < warn) return idxColor(IDX.calm, false); // calm — blue
100 + if (pct >= crit) return idxColor(IDX.crit, true); // crit — red + bold
101 + const t = (pct - warn) / (crit - warn);
102 + if (t === 0) return idxColor(IDX.warn, false); // exactly at warn — yellow
103 + return rgbColor(mix(IDX_RGB[IDX.warn], IDX_RGB[IDX.crit], t), false); // smooth blend
105 +// fill bar with shade-density leading edge (░▒▓); color from meterColor (index-based).
106 +function bar(pct, width, warn, crit) {
107 + const p = Math.max(0, Math.min(100, pct));
108 + const filled = (p / 100) * width;
109 + const full = Math.min(width, Math.floor(filled));
110 + const frac = filled - full;
111 + const tip = frac > 0 && full < width ? (frac < 1 / 3 ? "░" : frac < 2 / 3 ? "▒" : "▓") : "";
112 + const empty = Math.max(0, width - full - (tip ? 1 : 0));
113 + return meterColor(p, warn, crit)("█".repeat(full) + tip) + trough("░".repeat(empty));
75 115 const money = (n) => (n < 1 ? n.toFixed(3) : n.toFixed(2));
117 +// label + 8-cell bar + pct% — shared by ctx and usage. severity drives color (subtle→loud).
118 +const meter = (label, pct, warn, crit) =>
119 + `${c.dim(label)} ${bar(pct, CONFIG.barWidth, warn, crit)} ${meterColor(pct, warn, crit)(pct + "%")}`;
120 +// drop control chars (ANSI-injection / newline guard) before printing untrusted file text.
121 +const stripCtl = (s) => s.replace(/[\x00-\x1F]/g, "");
123 +// ─── crash-safe IO helpers (all swallow — a failed read/write must never blank the bar) ──
124 +// atomic write: tmp + rename so a concurrent reader never sees a half-written file.
125 +function atomicWrite(file, data) {
126 + try {
127 + const tmp = `${file}.${process.pid}.tmp`;
128 + fs.writeFileSync(tmp, data);
129 + fs.renameSync(tmp, file);
130 + } catch {}
132 +// read a small plain file as text, or null. rejects symlinks (don't follow a planted
133 +// link out of the config dir) and oversized files; lstat keeps the symlink unfollowed.
134 +function readSmallFile(file, maxSize) {
135 + try {
136 + const st = fs.lstatSync(file);
137 + if (st.isSymbolicLink() || st.size > maxSize) return null;
138 + return fs.readFileSync(file, "utf8");
139 + } catch {
140 + return null;
143 +// parse a JSON file, or null on missing/corrupt.
144 +function readJson(file) {
145 + try {
146 + return JSON.parse(fs.readFileSync(file, "utf8"));
147 + } catch {
148 + return null;
77 152 // ─── stdin ───────────────────────────────────────────────────────────────────
78 153 let d = {};
87 162 const push = (s) => {
88 163 if (s) parts.push(s);
165 +const cwd = d?.workspace?.current_dir || d?.cwd;
91 167 // ─── 1. dir ──────────────────────────────────────────────────────────────────
93 - const cwd = d?.workspace?.current_dir || d?.cwd;
94 169 if (cwd) push(c.cyan(path.basename(cwd) || cwd));
95 170 } catch {}
111 186 } catch {}
113 188 // ─── 4. git / jj (smart-cached) ────────────────────────────────────────────────
114 -push(gitOrJjSegment(d?.workspace?.current_dir || d?.cwd));
189 +push(gitOrJjSegment(cwd));
116 191 // ─── 5. context (gated) ────────────────────────────────────────────────────────
193 + // used_percentage is model-aware (relative to context_window_size: 1M for extended models).
194 + // Do NOT use exceeds_200k_tokens — it's a fixed 200k threshold, so it falsely reads 100%
195 + // on a 1M-window model once a long session passes 200k tokens.
118 196 const cw = d?.context_window || {};
119 197 let pct = cw.used_percentage;
120 198 if (pct == null && cw.context_window_size && cw.total_input_tokens != null) {
121 199 pct = (cw.total_input_tokens / cw.context_window_size) * 100;
123 - const exceeds = d?.exceeds_200k_tokens === true;
124 - if (exceeds || (pct != null && pct >= CONFIG.contextWarnPct)) {
125 - const shown = pct != null ? Math.round(pct) : 100;
126 - const col = exceeds || shown >= CONFIG.contextCritPct ? c.red : c.yellow;
127 - push(`${c.dim("ctx")} ${bar(shown, CONFIG.barWidth, col)} ${col(shown + "%")}`);
128 - }
201 + if (pct != null) push(meter("ctx", Math.round(pct), CONFIG.contextWarnPct, CONFIG.contextCritPct));
129 202 } catch {}
131 204 // ─── 6. usage bars (rate limits) ───────────────────────────────────────────────
136 209 if (win && typeof win.used_percentage === "number") {
137 210 const p = Math.round(win.used_percentage);
138 211 if (CONFIG.usageAlways || p >= CONFIG.usageWarnPct) {
139 - const col = pctColor(p, CONFIG.usageWarnPct, CONFIG.usageCritPct);
140 - let seg = `${c.dim(label)} ${bar(p, CONFIG.barWidth, col)} ${col(p + "%")}`;
212 + let seg = meter(label, p, CONFIG.usageWarnPct, CONFIG.usageCritPct);
141 213 // resets_at is UNIX EPOCH SECONDS — ×1000 to compare with Date.now() (ms)
142 214 if (withReset && typeof win.resets_at === "number") {
143 215 const left = win.resets_at * 1000 - Date.now();
159 231 if (typeof total === "number") {
160 232 const { turn, month, burnRate } = updateLedger(sid, total);
161 233 // 🔥 burn rate: own segment, before the cost cluster (matches bars · 🔥 · cost)
162 - if (burnRate > 0) push(c.orange(`🔥$${burnRate.toFixed(2)}/hr`));
234 + if (burnRate > 0) push(burnColor(burnRate, ` $${burnRate.toFixed(2)}/hr`));
163 235 // icon style: bright $number (emphasis) + dim trailing glyph (muted icon).
164 236 // turn has no glyph (bare $num); session Σ / month ☾. slash: $num/type.
165 237 const fmt = (n, type, icon) =>
180 252 // ─── 9. extra badges (hooks: workflow, …) ──────────────────────────────────────
182 - const f = path.join(claudeDir, ".cc-statusline-extra");
183 - const st = fs.lstatSync(f);
184 - if (!st.isSymbolicLink() && st.size <= 4096) {
254 + const content = readSmallFile(path.join(claudeDir, ".cc-statusline-extra"), 4096);
255 + if (content) {
185 256 const now = Date.now();
186 - for (const line of fs.readFileSync(f, "utf8").split(/\r?\n/)) {
257 + for (const line of content.split(/\r?\n/)) {
187 258 const i = line.indexOf("|");
188 259 if (i <= 0) continue;
189 260 const ts = Number(line.slice(0, i));
190 261 if (!Number.isFinite(ts) || now - ts > CONFIG.extraTtlMs) continue;
191 - const text = line.slice(i + 1).replace(/[\x00-\x1F]/g, "").slice(0, 60);
192 - if (text) push(c.orange(text));
262 + const text = stripCtl(line.slice(i + 1)).slice(0, 60);
263 + if (text) push(c.accent(text));
195 266 } catch {}
210 281 const now = Date.now();
211 282 const mk = monthKey();
212 283 let L = { month: mk, monthTotal: 0, sessions: {} };
213 - try {
214 - L = JSON.parse(fs.readFileSync(file, "utf8"));
215 - } catch {}
284 + const parsed = readJson(file);
285 + if (parsed) L = parsed;
216 286 if (!L.sessions) L.sessions = {};
217 287 let dirty = false; // persist (disk write) only when something material changed
272 342 // Persist only when something changed — skips stringify+write+rename (the bulk
273 343 // of this function's cost) on the common idle re-render path.
274 344 if (dirty) {
275 - try {
276 - const tmp = `${file}.${process.pid}.tmp`;
277 - fs.writeFileSync(tmp, JSON.stringify(L));
278 - fs.renameSync(tmp, file);
279 - } catch {}
345 + atomicWrite(file, JSON.stringify(L));
280 346 // Opportunistic GC (write-path only, so throttled to active turns): cancelled
281 347 // renders leave `.cc-*.tmp` atomic-write orphans; ended sessions leave
282 348 // `.cc-turn-*` markers. Sweep our own debris older than a day.
347 413 if (!repo) return "";
348 414 const key = crypto.createHash("sha1").update(repo.kind + ":" + repo.root).digest("hex").slice(0, 12);
349 415 const cacheFile = path.join(os.tmpdir(), `cc-statusline-${key}.json`);
350 - try {
351 - const o = JSON.parse(fs.readFileSync(cacheFile, "utf8"));
352 - if (Date.now() - o.ts < CONFIG.gitCacheTtlMs) return o.text;
353 - } catch {}
416 + const cached = readJson(cacheFile);
417 + if (cached && Date.now() - cached.ts < CONFIG.gitCacheTtlMs) return cached.text;
354 418 let text = "";
356 420 text = repo.kind === "jj" ? jjSegment(repo.root) : gitSegment(repo.root);
357 421 } catch {
358 422 text = "";
360 - try {
361 - const tmp = `${cacheFile}.${process.pid}.tmp`;
362 - fs.writeFileSync(tmp, JSON.stringify({ ts: Date.now(), text }));
363 - fs.renameSync(tmp, cacheFile);
364 - } catch {}
424 + atomicWrite(cacheFile, JSON.stringify({ ts: Date.now(), text }));
365 425 return text;
413 473 // ════════════════════════════════════════════════════════════════════════════
414 474 function cavemanBadge() {
416 - const flag = path.join(claudeDir, ".caveman-active");
417 - const st = fs.lstatSync(flag);
418 - if (st.isSymbolicLink() || st.size > 64) return "";
419 - let mode = (fs.readFileSync(flag, "utf8").split(/\r?\n/)[0] ?? "")
476 + const raw = readSmallFile(path.join(claudeDir, ".caveman-active"), 64);
477 + if (raw == null) return "";
478 + let mode = (raw.split(/\r?\n/)[0] ?? "")
420 479 .trim()
421 480 .toLowerCase()
422 481 .replace(/[^a-z0-9-]/g, "");
426 485 "commit", "review", "compress",
428 487 if (!valid.has(mode) || mode === "off") return "";
429 - let out = c.dim("caveman:") + c.orange(mode || "full"); // muted label, bright value
488 + let out = c.dim("caveman:") + c.accent(mode || "full"); // muted label, bright value
430 489 if (process.env.CAVEMAN_STATUSLINE_SAVINGS !== "0") {
431 - try {
432 - const sf = path.join(claudeDir, ".caveman-statusline-suffix");
433 - const sst = fs.lstatSync(sf);
434 - if (!sst.isSymbolicLink() && sst.size <= 64) {
435 - const sv = fs.readFileSync(sf, "utf8").replace(/[\x00-\x1F]/g, "").trimEnd();
436 - if (sv) out += " " + c.orange(sv);
437 - }
438 - } catch {}
490 + const sraw = readSmallFile(path.join(claudeDir, ".caveman-statusline-suffix"), 64);
491 + const sv = sraw && stripCtl(sraw).trimEnd();
492 + if (sv) out += " " + c.accent(sv);
440 494 return out;
441 495 } catch {

codex/config.toml

Modified
51 51 [projects.'c:\users\okr\workspace\dotfiles\notes\isp-insoft\kultur\ki_roadmap']
52 52 trust_level = "trusted"
54 +[projects.'c:\users\okr\workspace\isp-insoft-ai-skills']
55 +trust_level = "trusted"
57 +[projects.'c:\users\okr\workspace\kkg_borke']
58 +trust_level = "trusted"
54 60 [plugins."atlassian-rovo@openai-curated"]
55 61 enabled = true
81 87 [plugins."superpowers@openai-curated"]
82 88 enabled = true
90 +[mcp_servers.idea]
91 +url = "http://127.0.0.1:64342/stream"

nushell/login.nu

Modified
17 17 use zai.nu
18 18 use kimi.nu
19 19 use shim.nu
20 +use git.nu
21 22 use std/clip
22 23 use std/util "path add"

nushell/modules/dwnld.nu

Modified
1 1 export def main [
2 2 url: path
3 + out?: path
3 4 ] {
4 - let basename = ( $url | path basename )
5 + mut basename = ''
6 + if ($out | is-not-empty) {
7 + $basename = $out
8 + } else {
9 + $basename = ( $url | path basename )
10 + }
5 11 http get $url | save --raw $basename

nushell/modules/git.nu

Modified
193 193 (git-dir-complete $git_dir ["show-ref" "--verify" "--quiet" $"($REF_HEADS)($branch)"]).exit_code == 0
196 -def add-worktree [git_dir: path, path: path, branch: string, base: string] {
196 +# Init + checkout submodules inside a freshly added worktree.
197 +# No-op when disabled or the worktree has no .gitmodules. Best-effort:
198 +# failure (e.g. no network/auth) warns but leaves the worktree intact.
199 +def init-submodules [path: path, enabled: bool] {
200 + if not $enabled { return }
201 + if not (([$path ".gitmodules"] | path join) | path exists) { return }
203 + let res = (git-complete ["submodule" "update" "--init" "--recursive"] $path)
204 + if $res.exit_code != 0 {
205 + print -e $"warning: submodule init failed in ($path); run `git -C ($path) submodule update --init --recursive` to retry"
206 + let detail = ($res.stderr | str trim)
207 + if not ($detail | is-empty) { print -e $detail }
211 +def add-worktree [git_dir: path, path: path, branch: string, base: string, submodules: bool] {
197 212 let args = if (branch-exists $git_dir $branch) {
198 213 ["worktree" "add" $path $branch]
199 214 } else {
203 218 git-dir-output $git_dir $args | ignore
219 + init-submodules $path $submodules
206 222 # Create branch + worktree, or add existing branch.
207 -def create-worktree [branch: string, base: string] {
223 +def create-worktree [branch: string, base: string, submodules: bool] {
208 224 let l = (layout)
209 225 let path = (wt-path $branch)
212 228 error make {msg: $"path exists: ($path)"}
215 - add-worktree $l.git_dir $path $branch $base
231 + add-worktree $l.git_dir $path $branch $base $submodules
291 307 # Create fresh layout from remote/local repo URL/path.
292 -def --env co-fresh [source: string, name?: string, branch?: string, dir?: path] {
308 +def --env co-fresh [source: string, name?: string, branch?: string, dir?: path, submodules: bool = true] {
293 309 let repo = if ($name == null) { repo-name-from $source } else { $name }
294 310 let parent = if ($dir == null) { "." } else { $dir }
295 311 let root = ([$parent $repo] | path join | path expand)
309 325 let worktree = ([$root $"($repo).(branch-slug $chosen_branch)"] | path join)
310 326 git-dir-output $git_dir ["worktree" "add" $worktree $chosen_branch] | ignore
327 + init-submodules $worktree $submodules
311 328 cd $worktree
313 330 {root: $root, worktree: $worktree, branch: $chosen_branch}
433 -def create-migration-layout [plan: record] {
450 +def create-migration-layout [plan: record, submodules: bool] {
434 451 mkdir $plan.target_root
435 452 init-bare-layout $plan.source $plan.target_git_dir $plan.repo $plan.branch
436 453 remember-source $plan.target_git_dir $plan.source
437 454 git-dir-output $plan.target_git_dir ["worktree" "add" $plan.target_worktree $plan.branch] | ignore
455 + init-submodules $plan.target_worktree $submodules
440 458 # Migrate current checkout into sibling .wt layout; original untouched.
441 -def --env co-current [name?: string, branch?: string, plan: bool = false, dirty: string = $DIRTY_REFUSE] {
459 +def --env co-current [name?: string, branch?: string, plan: bool = false, dirty: string = $DIRTY_REFUSE, submodules: bool = true] {
442 460 let migration = (migration-plan $dirty $name $branch)
443 461 if $plan { return (public-migration $migration) }
451 469 let patches = if $migration.dirty { write-dirty-patches $migration.source $tmp } else { null }
452 - create-migration-layout $migration
470 + create-migration-layout $migration $submodules
453 471 if $migration.dirty {
454 472 copy-dirty-state $migration $patches
469 487 name?: string # repo/root name
470 488 --branch (-b): string = "" # branch to check out; default remote HEAD
471 489 --dir (-d): path = "." # parent dir
490 + --no-submodules # skip submodule init in the new worktree
473 - co-fresh $source $name $branch $dir
492 + co-fresh $source $name $branch $dir (not $no_submodules)
476 495 # Migrate the current checkout into a sibling bare+worktree layout.
479 498 --branch (-b): string = "" # branch to check out; default current branch
480 499 --plan # preview only
481 500 --dirty: string = $DIRTY_REFUSE # `refuse` | `copy`
501 + --no-submodules # skip submodule init in the new worktree
483 - co-current $name $branch $plan $dirty
503 + co-current $name $branch $plan $dirty (not $no_submodules)
486 506 # Summary.
513 533 branch: string
514 534 --base (-b): string = $HEAD
515 535 --switch (-s)
536 + --no-submodules # skip submodule init in the new worktree
517 - let path = (create-worktree $branch $base)
538 + let path = (create-worktree $branch $base (not $no_submodules))
518 539 if $switch { cd $path }
523 544 branch: string
524 545 --create (-c)
525 546 --base (-b): string = $HEAD
547 + --no-submodules # with --create: skip submodule init
527 549 let path = (path-for-branch $branch)
528 550 if not ($path | path exists) {
529 551 if not $create {
530 552 error make {msg: $"no worktree for branch `($branch)`; rerun with --create"}
532 - create-worktree $branch $base | ignore
554 + create-worktree $branch $base (not $no_submodules) | ignore
534 556 cd $path
563 585 # Thin native aliases for muscle memory / git parity.
564 -export def --env "wt add" [branch: string, --base (-b): string = $HEAD, --switch (-s)] {
565 - wt new $branch --base $base --switch=$switch
586 +export def --env "wt add" [branch: string, --base (-b): string = $HEAD, --switch (-s), --no-submodules] {
587 + wt new $branch --base $base --switch=$switch --no-submodules=$no_submodules
568 590 export def "wt list" [] { wt ls }

pi-ext

Modified
1 -Subproject commit f8d69b10dd53a73a5a80398fabc33ae3bfe73e50
1 +Subproject commit f47b1654b852d4ded527bc9b3abf4cd735dcd1be