Reusable shell helpers
  • Shell 93.9%
  • Python 6.1%
Find a file
dikkadev 64edc8690b feat(scripts): add WSL shell helpers and cross-platform dev tooling
This adds shell-safe documentation and helper wrappers for launching common tools, while extending existing developer utilities to work better in WSL by supporting Windows port cleanup, PowerShell transcript capture, and externally reachable vp dev servers.
2026-07-10 11:47:24 +02:00
allow-new.sh feat(shell): add allow-new wrapper to bypass package age guards per command 2026-05-23 11:21:19 +02:00
catenv.sh feat(catenv): accept an explicit env file argument 2026-05-28 09:50:33 +02:00
cda.sh scsripts 2025-10-23 11:00:34 +02:00
clank.sh feat(shell): add vpdev helper for routed Vite+ dev servers 2026-06-29 09:07:22 +02:00
fjurl.sh fix(fjurl): add lab to known owners for typo correction 2026-06-06 00:35:31 +02:00
ghget.sh feat(ghget): add helper to download github paths as zip archives 2026-03-19 18:28:03 +01:00
gig.sh feat(cli): add gig helper for intelligent gitignore management 2026-01-26 13:07:50 +01:00
git-qol.sh feat(git): add sync alias to fetch single branch without full remote update 2025-11-17 17:40:48 +01:00
git_worktree_orphan.sh scsripts 2025-10-23 11:00:34 +02:00
gotest.sh scsripts 2025-10-23 11:00:34 +02:00
image-namer-wrapper.sh 2 mroe 2026-01-12 23:57:24 +01:00
jjauthor.sh feat(git): add sync alias to fetch single branch without full remote update 2025-11-17 17:40:48 +01:00
jjdesc.sh scsripts 2025-10-23 11:00:34 +02:00
jjut.sh feat(jj): add bookmark completion and safe forward-move helper 2026-05-14 16:48:09 +02:00
mkcd.sh scsripts 2025-10-23 11:00:34 +02:00
notif.sh feat(scripts): add notif and runfunc shell helpers 2026-05-26 21:30:11 +02:00
pocock.sh feat(scripts): add WSL shell helpers and cross-platform dev tooling 2026-07-10 11:47:24 +02:00
portkill.sh feat(scripts): add WSL shell helpers and cross-platform dev tooling 2026-07-10 11:47:24 +02:00
pwsh_func.sh scsripts 2025-10-23 11:00:34 +02:00
pwshlog.sh feat(scripts): add WSL shell helpers and cross-platform dev tooling 2026-07-10 11:47:24 +02:00
pwshlog_sanitize.py feat(scripts): add WSL shell helpers and cross-platform dev tooling 2026-07-10 11:47:24 +02:00
README.md feat(scripts): add WSL shell helpers and cross-platform dev tooling 2026-07-10 11:47:24 +02:00
runfunc feat(scripts): add notif and runfunc shell helpers 2026-05-26 21:30:11 +02:00
tcn.sh feat(shell): add tcnA helper for append mode 2026-04-11 14:15:42 +02:00
tcnjjut.sh feat(shell): add tcnjjut helper to run tcn before jjut 2026-04-18 10:16:46 +02:00
tmsave.sh 2 mroe 2026-01-12 23:57:24 +01:00
tmux-later.sh feat(scripts): add WSL shell helpers and cross-platform dev tooling 2026-07-10 11:47:24 +02:00
upload_patch.sh scsripts 2025-10-23 11:00:34 +02:00
uri.sh feat(uri): add help and clipboard copy flags 2026-03-19 18:28:34 +01:00
vpdev.sh feat(scripts): add WSL shell helpers and cross-platform dev tooling 2026-07-10 11:47:24 +02:00
wcd.sh scsripts 2025-10-23 11:00:34 +02:00
worktree-new.sh scsripts 2025-10-23 11:00:34 +02:00
worktree.sh scsripts 2025-10-23 11:00:34 +02:00

~/scripts — sourced into EVERY login shell

Every *.sh here is sourced by ~/.bash_aliases into the login shell itself. One file = one topic, defines a function named like the file (mkcd.shmkcd). New command = drop NAME.sh defining function NAME. Done.

A mistake here breaks every new terminal, including plain wsl. Has happened.

Rules (MUST)

  • Only DEFINE: functions, aliases, completions, env vars. Nothing runs at load time.
  • Idempotent. Sourcing twice = harmless.
  • Guard external tools: command -v tool >/dev/null 2>&1 || return 0
  • return, never exit.
  • NO set -e|-u|-o pipefail|-x, no exit, no exec — these hit the login shell.
  • PATH not final at load time (~/.local/bin, ~/bin not appended yet). Use absolute paths if unavoidable.

set -euo pipefail = marker of an executable script → belongs in ~/bin, not here. Run-once-per-login → ~/.profile (guarded). Periodic → cron/systemd timer.

Before adding a file

  • No set -e/-u/pipefail/-x, no exit, no exec, nothing executes at load
  • bash --norc -c 'source ~/scripts/NEWFILE.sh; echo OK'
  • wsl -e bash -l -c 'echo login OK'

The loader skips files containing set -e/exit/exec and sandboxes shell options per file — safety net, not permission.

If startup broke

  • Safe shell: wsl -u <user> -e bash --noprofile --norc (or wsl -u root)
  • Trace: env -i HOME=$HOME TERM=xterm PS4='+ ${BASH_SOURCE}:${LINENO}: ' bash -lixc true 2>/tmp/trace.log
  • Backup without shell: wsl --export <distro> backup.tar