Compare commits

..

70 Commits

Author SHA1 Message Date
e918a41d75 fix: guard success messages on command exit status
- Source x-path instead of capturing empty stdout via command substitution
- Validate --dry-run argument in cleanup script, reject unknown flags
- Gate success messages on preceding command's exit status with &&
- Applies to dfm (fmt, reset_nvim, shfmt) and install scripts
  (fonts, gh-extensions, python-packages, shellspec, z)
2026-03-18 12:33:00 +02:00
9df2996a5d fix: harden error handling and shell-agnostic mise activation
- Guard x-path call to prevent PATH clobber when missing
- Make husky init.sh use shell-agnostic mise activate --shims
- Add fail-fast to Tier 2 install steps in dfm install all
- Check brew update exit status before reporting success
- Always run mise install during reset_nvim (handles bootstrap)
- Use double-bracket conditional in cleanup script
2026-03-18 11:17:31 +02:00
63977f81db fix(git): use XDG path for host excludesfile
Point excludesfile to ~/.config/git/overrides/ignore instead of
~/.dotfiles/config/git/overrides/ignore for consistency with the
Dotbot-installed symlink layout.
2026-03-18 09:59:55 +02:00
e0ac135352 fix(mise): correct PATH precedence, error handling, and shell detection
- Append non-mise PATH entries so mise shims keep highest precedence
- Remove legacy cargo bin from initial PATH bootstrap
- Detect current shell for mise activate instead of hardcoding bash
- Rename AWS_SESSION_TOKEN to AWS_SESSION_TOKEN_FILE (was a file path)
- Add exit-on-failure checks to dfm mise install block
- Fix reset_nvim to call mise instead of removed npm installer
- Forward all args in dfm mise-cleanup
- Auto-detect DOTFILES in cleanup script when not pre-exported
- Report brew uninstall failures instead of masking with || true
- Fix p10k segment name from MISE to ASDF
- Replace npm with yarn in CLAUDE.md Bash whitelist
2026-03-18 09:15:10 +02:00
df84f1dc0e chore(mise): update configs and add cleanup script documentation
Update tooling configs, shell settings, and editor configurations
as part of the mise migration. Add companion documentation for the
cleanup-old-version-managers script and remove unused fish completions.
2026-03-18 08:43:32 +02:00
d5e692e997 chore(mise): trust project directories for auto-activation 2026-03-18 04:08:01 +02:00
fedb3c7cd1 chore: update project tooling and metadata 2026-03-18 04:04:39 +02:00
026aa8afa7 refactor(mise): consolidate version files into .mise.toml 2026-03-18 04:03:41 +02:00
8db8cbbe38 feat(dfm): add cleanup script for old version manager installations 2026-03-18 04:03:31 +02:00
bf61ccd8fb chore(brew): remove tools now managed by mise 2026-03-18 04:03:24 +02:00
425543b40a refactor(dfm): replace per-language install commands with mise 2026-03-18 04:03:15 +02:00
2d316bfed7 refactor(shell): replace version managers with mise activate 2026-03-18 04:03:06 +02:00
cccb64a703 feat(mise): add global mise config for unified tool management 2026-03-18 04:02:55 +02:00
052813695a feat(shell): align fish, bash, and zsh shell configurations
Synchronize environment variables, PATH entries, and aliases across
all three shell configs to ensure consistent behavior on all hosts.
2026-03-18 02:11:38 +02:00
51bb734998 style(karabiner): reformat karabiner.json 2026-03-18 01:33:10 +02:00
b530a6d8e9 feat(git): add host-specific git ignore and excludesfile 2026-03-18 01:33:03 +02:00
ed1fe05681 feat(tmux): enable allow-passthrough for terminal queries 2026-03-18 01:32:55 +02:00
f6cd1a4e6e update(fish): add dark-mode section to Catppuccin themes 2026-03-18 01:32:48 +02:00
85345121b2 feat(fish): add kubectl and orbctl completions 2026-03-18 01:32:38 +02:00
1341aaf3b0 feat(fish): add dotnet tools to PATH 2026-03-18 01:32:32 +02:00
10aa7be8f8 fix(fish): use $HOME instead of hardcoded path in rustup.fish 2026-03-18 01:32:18 +02:00
renovate[bot]
035405b22f chore(actions): update ivuorinen/actions action (v2026.03.11 → v2026.03.14) (#307)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-17 15:29:24 +02:00
renovate[bot]
7dd6ccbc6c chore(actions): update softprops/action-gh-release action (v2.5.0 → v2.6.1) (#308)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-17 14:56:51 +02:00
8a5c9f9089 chore: general maintenance and cleanup (#306) 2026-03-15 19:14:36 +02:00
renovate[bot]
2410f343c2 chore(deps): update pre-commit hook astral-sh/ruff-pre-commit (v0.15.5 → v0.15.6) (#305) 2026-03-13 20:06:51 +02:00
renovate[bot]
d120839830 chore(actions): update ivuorinen/actions action (v2026.03.02 → v2026.03.11) (#304)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-13 08:40:10 +02:00
renovate[bot]
5662d09202 chore(deps): update pre-commit hook johnnymorganz/stylua (v2.3.1 → v2.4.0) (#303)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-08 19:31:45 +02:00
renovate[bot]
076050ad58 chore(deps): update pre-commit hook astral-sh/ruff-pre-commit (v0.15.4 → v0.15.5) (#302) 2026-03-07 03:46:31 +02:00
renovate[bot]
313915e55c chore(deps): update loopwerk/tag-changelog action (v1.3.0 → v1.5.0) (#300) 2026-03-05 22:07:58 +02:00
renovate[bot]
e490a735c8 chore(deps): lock file maintenance (#301) 2026-03-05 22:06:11 +02:00
renovate[bot]
5fe82b2898 chore(deps): lock file maintenance (#299) 2026-03-03 08:19:51 +02:00
renovate[bot]
6621bcb470 chore(deps): update ivuorinen/actions action (v2026.02.24 → v2026.03.02) (#298)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-03 05:54:49 +00:00
3b6ace12e9 feat(scripts): add shellspec installation to dfm (#296)
* feat(scripts): add shellspec installation to dfm

Add install-shellspec.sh script that clones shellspec to
~/.cache/shellspec and installs via make to ~/.local/bin.
Wire it into dfm install menu and the Tier 4 install-all pipeline.

* fix(scripts): address PR review feedback for shellspec installer

Add companion install-shellspec.md documentation file to match
codebase convention. Add --depth=1 to git pull for consistent
shallow clone behavior.

* fix(scripts): pin shellspec install to latest release tag

Use x-gh-get-latest-version to fetch the latest release tag from
GitHub and clone/checkout that specific version. Addresses supply
chain concern and normalizes --depth=1 style.

* docs(scripts): update shellspec docs to reflect release-tag pinning
2026-03-02 16:39:17 +02:00
renovate[bot]
f92e4a606f chore(deps): lock file maintenance (#295)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-02 00:58:41 +02:00
fae7a8f13f feat(bin): add x-visit-folders script for bulk zoxide registration (#294)
* feat(bin): add x-visit-folders script for bulk zoxide registration

* fix(bin): fix x-visit-folders usage exit code, no-op fallback, and count increment

- usage() now accepts optional exit code; --help exits 0
- Remove no-op subshell cd fallback in visit_dir(), just log failure
- Replace ((count++)) with count=$((count + 1)) to avoid set -e trap
2026-03-01 22:02:49 +02:00
eaa7680671 chore(config): sesh config additions 2026-03-01 21:37:34 +02:00
070c94a244 docs: update CLAUDE.md with biome migrate command and gotchas 2026-02-28 10:50:44 +02:00
70cf8ccf6d style(fish): reformat phpenv files with fish_indent 2026-02-28 10:50:43 +02:00
63faf4c4bf feat(claude): add fish-validate and lua-format skills
Add fish-validate skill for syntax checking and formatting .fish files,
lua-format skill for stylua formatting, and fish_indent PostToolUse hook.
2026-02-28 10:50:43 +02:00
renovate[bot]
d81ff6dabb chore(deps): update pre-commit hook astral-sh/ruff-pre-commit (v0.15.2 → v0.15.4) (#293)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-28 10:44:34 +02:00
ed6bef5c7e fix(deps): resolve minimatch to latest 10.x
Add resolutions field to pin minimatch to ^10.2.4.
2026-02-28 10:40:19 +02:00
46b9e3ebeb build(deps): upgrade devDependencies to latest
Bump @biomejs/biome ^2.4.4, @types/node ^25.3.2, bats ^1.13.0,
editorconfig-checker ^6.1.1, typescript ^5.9.3.
2026-02-28 10:39:50 +02:00
f26303a0ff build(biome): migrate schema to v2.4.4 2026-02-28 10:39:04 +02:00
8379135c81 fix(skills): wrap long lines in shell-validate skill
Break lines exceeding 120 chars in the description frontmatter,
intro paragraph, and shellcheck section.
2026-02-28 10:38:42 +02:00
73d0d6b35f fix(scripts): remove exit-on-error from cargo install script
Remove -e from set -euo pipefail so the script continues past
individual cargo install failures.
2026-02-28 10:37:35 +02:00
6a839eea56 fix(gh): update git protocol to ssh
Switch gh CLI git_protocol from https to ssh. Add hosts.yml to
prettierignore since the file is managed by gh CLI.
2026-02-28 10:37:22 +02:00
28c8332058 fix(wezterm): adjust font size and window padding
Reduce font size from 16 to 12, increase window padding from 5 to 10.
2026-02-28 10:36:58 +02:00
b956119b98 feat(fish): add mise version manager integration
Add mise activate and shims PATH for fish shell, plus rustup
cargo env sourcing in conf.d/rustup.fish.
2026-02-28 10:36:49 +02:00
renovate[bot]
0f82f8e65b chore(deps): update node.js (v24.13.1 → v24.14.0) (#292)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-26 08:37:40 +02:00
renovate[bot]
f1277ddf99 chore(deps): update ivuorinen/actions action (v2026.02.18 → v2026.02.24) (#291)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-26 06:36:36 +00:00
renovate[bot]
c834eab42b chore(deps): lock file maintenance (#290) 2026-02-23 21:34:33 +02:00
renovate[bot]
f93deb8bca chore(deps): update pre-commit hook astral-sh/ruff-pre-commit (v0.15.1 → v0.15.2) (#289) 2026-02-21 18:23:46 +02:00
renovate[bot]
248f57b914 chore(deps): update ivuorinen/actions action (v2026.02.10 → v2026.02.18) (#287)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-20 13:58:20 +02:00
renovate[bot]
86e4f9618c chore(deps): lock file maintenance (#288)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-20 13:40:40 +02:00
renovate[bot]
7eb97392fb chore(deps): lock file maintenance (#286) 2026-02-17 19:09:11 +02:00
renovate[bot]
8be1a9e7e2 chore(deps): update pre-commit hook rhysd/actionlint (v1.7.10 → v1.7.11) (#285)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-16 01:46:56 +00:00
renovate[bot]
a7c03fc3d6 chore(deps): update pre-commit hook astral-sh/ruff-pre-commit (v0.15.0 → v0.15.1) (#284)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-14 10:10:21 +02:00
renovate[bot]
3368e3b6dc chore(deps): update ivuorinen/actions action (v2026.02.03 → v2026.02.10) (#283)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-12 01:51:09 +00:00
renovate[bot]
5d87452224 chore(deps): update node.js (v24.13.0 → v24.13.1) (#282)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-12 01:49:42 +00:00
renovate[bot]
d779d23723 chore(deps): update simek/yarn-lock-changes action (v0.14.0 → v0.14.1) (#281)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-09 14:35:28 +00:00
renovate[bot]
ee812de4af chore(deps): update image python to v3.14.3 (#280)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-09 08:02:46 +02:00
a18c16b0b9 fix(shell): harden shared.sh and dfm for set -euo pipefail
Use ${VAR:-} defaults in shared.sh to prevent set -u failures on
unset variables (DOTFILES, ZSH_CUSTOM_COMPLETION_PATH, FPATH).
Export DOTFILES/BREWFILE/HOSTFILES in dfm so sourced scripts see them.
2026-02-08 01:12:39 +02:00
785a8e8eb7 fix(exports): prevent set -e abort when optional files are missing
Replace `[ -f ] && source` with `if/then/fi` for conditional source
lines so the file returns 0 even when optional exports files don't
exist. Also use `${VAR:-}` for XDG defaults to avoid set -u failures.
2026-02-08 01:11:55 +02:00
1cda859999 docs(claude): expand CLAUDE.md with msgr, dfm commands, gotchas, and hooks 2026-02-08 00:31:33 +02:00
bc69560da4 feat(claude): add shfmt/vendor hooks and shell-validate skill 2026-02-08 00:26:19 +02:00
2ee9407a43 feat(dfm): add 6 install commands and reorder install all into tiers 2026-02-07 23:41:51 +02:00
765c2fce72 test(dfm): expand bats tests from 1 to 16
Add tests for menu output of all sections (install, helpers, docs,
dotfiles, check, scripts, tests), routing of invalid input, install
menu completeness for all 19 entries, and check arch/host commands.
2026-02-07 23:20:02 +02:00
88eceaf194 fix(dfm): restrict cheat-databases glob to .sh files only
The install-cheat-* glob was matching .md documentation files, causing
errors when bash tried to execute them.
2026-02-07 22:45:08 +02:00
6d72003446 fix(lint): fix all sonarcloud detected issues (#279)
* fix(ci): replace broad permissions with specific scopes in workflows

Replace read-all/write-all with minimum required permission scopes
across all GitHub Actions workflows to follow the principle of least
privilege (SonarCloud rule githubactions:S8234).

* fix(shell): use [[ instead of [ for conditional tests

Replace single brackets with double brackets in bash conditional
expressions across 14 files (28 changes). All scripts use bash
shebangs so [[ is safe everywhere (SonarCloud rule shelldre:S7688).

* fix(shell): add explicit return statements to functions

Add return 0 as the last statement in ~46 shell functions across
17 files that previously relied on implicit return codes
(SonarCloud rule shelldre:S7682).

* fix(shell): assign positional parameters to local variables

Replace direct $1/$2/$3 usage with named local variables in _log(),
msg(), msg_err(), msg_done(), msg_run(), msg_ok(), and array_diff()
(SonarCloud rule shelldre:S7679).

* fix(python): replace dict() constructor with literal

Use {} instead of dict() for empty dictionary initialization
(SonarCloud rule python:S7498).

* fix(shell): fix husky shebang and tolerate npm outdated exit code

* docs(shell): add function docstring comments

* fix(shell): fix heredoc indentation in x-sonarcloud

* feat(python): add ruff linter and formatter configuration

* fix(ci): align megalinter config with biome, ruff, and shfmt settings

* fix(ci): disable black and yaml-prettier in megalinter config

* chore(ci): update ruff-pre-commit to v0.15.0 and fix hook name

* fix(scripts): check for .git dir before skipping clone in install-fonts

* fix(shell): address code review issues in scripts and shared.sh

- Guard wezterm show-keys failure in create-wezterm-keymaps.sh
- Stop masking git failures with return 0 in install-cheat-purebashbible.sh
- Add missing shared.sh source in install-xcode-cli-tools.sh
- Replace exit 1 with return 1 in sourced shared.sh

* fix(scripts): address code review and security findings

- Guard wezterm show-keys failure in create-wezterm-keymaps.sh
- Stop masking git failures with return 0 in install-cheat-purebashbible.sh
- Add missing shared.sh source in install-xcode-cli-tools.sh
- Replace exit 1 with return 1 in sourced shared.sh
- Remove shell=True subprocess calls in x-git-largest-files.py

* style(shell): apply shfmt formatting and add args to pre-commit hook

* fix(python): suppress bandit false positives in x-git-largest-files

* fix(python): add nosemgrep suppression for check_output call

* feat(format): add prettier for YAML formatting

Install prettier, add .prettierrc.json config (200-char width, 2-space
indent, LF endings), .prettierignore, yarn scripts (lint:prettier,
fix:prettier, format:yaml), and pre-commit hook scoped to YAML files.

* style(yaml): apply prettier formatting

* fix(scripts): address remaining code review findings

- Python: use list comprehension to filter empty strings instead of
  slicing off the last element
- create-wezterm-keymaps: write to temp file and mv for atomic updates
- install-xcode-cli-tools: fix shellcheck source directive path

* fix(python): sort imports alphabetically in x-git-largest-files

* fix(lint): disable PYTHON_ISORT in MegaLinter, ruff handles it

* chore(git): add __pycache__ to gitignore

* fix(python): rename ambiguous variable l to line (E741)

* style: remove trailing whitespace and blank lines

* style(fzf): apply shfmt formatting

* style(shell): apply shfmt formatting

* docs(plans): add design documents

* style(docs): add language specifier to fenced code block

* feat(lint): add markdown-table-formatter to dev tooling

Add markdown-table-formatter as a dev dependency with yarn scripts
(lint:md-table, fix:md-table) and a local pre-commit hook to
automatically format markdown tables on commit.
2026-02-07 19:01:02 +02:00
cff3d1dd8a feat(scripts): add x-sonarcloud script for LLM-driven issue analysis
Bridges LLM agents with SonarCloud's REST API to fetch and format
code quality issues as structured markdown with processing instructions.
2026-02-07 13:24:29 +02:00
154 changed files with 3470 additions and 1599 deletions

View File

@@ -0,0 +1,14 @@
---
name: code-reviewer
description: Reviews shell/fish/lua changes for correctness and style
tools: [Read, Grep, Glob, Bash]
---
Review the changed files for:
1. **Shell scripts**: POSIX compliance for /bin/sh scripts, proper quoting, shellcheck issues
2. **Fish files**: fish syntax correctness, consistent function patterns
3. **Lua files**: stylua compliance, Neovim API usage patterns
4. **All**: EditorConfig compliance (2-space indent, LF endings)
Report only high-confidence issues. Skip vendor files (fzf-tmux).

34
.claude/settings.json Normal file
View File

@@ -0,0 +1,34 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && case \"$fp\" in */fzf-tmux|*/yarn.lock|*/.yarn/*) echo \"BLOCKED: $fp is a vendor/lock file — do not edit directly\" >&2; exit 2;; esac; exit 0"
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && [ -f \"$fp\" ] && case \"$fp\" in *.sh|*/bin/*) head -1 \"$fp\" | grep -qE '^#!.*(ba)?sh' && command -v shfmt > /dev/null && shfmt -i 2 -bn -ci -sr -fn -w \"$fp\";; esac; exit 0"
},
{
"type": "command",
"command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && [ -f \"$fp\" ] && case \"$fp\" in *.fish) command -v fish_indent > /dev/null && fish_indent -w \"$fp\";; esac; exit 0"
},
{
"type": "command",
"command": "fp=$(cat | jq -r '.tool_input.file_path // empty') && [ -n \"$fp\" ] && [ -f \"$fp\" ] && case \"$fp\" in *.lua) command -v stylua > /dev/null && stylua \"$fp\";; esac; exit 0"
}
]
}
]
}
}

View File

@@ -0,0 +1,38 @@
---
name: fish-validate
description: >-
Validate fish scripts after editing.
Apply when writing or modifying any .fish file
in config/fish/.
user-invocable: false
allowed-tools: Bash, Read
---
After editing any `.fish` file in `config/fish/`, validate it:
## 1. Syntax check
```bash
fish --no-execute <file>
```
If syntax check fails, fix the issue before proceeding.
## 2. Format check
Run `fish_indent` to verify formatting:
```bash
fish_indent --check <file>
```
If formatting differs, apply it:
```bash
fish_indent -w <file>
```
## Key files to never validate
- Files inside `config/fish/functions/` prefixed with `_tide_`
(managed by the tide prompt plugin)

View File

@@ -0,0 +1,22 @@
---
name: lua-format
description: >-
Format Lua files after editing.
Apply when writing or modifying any .lua file.
user-invocable: false
allowed-tools: Bash
---
After editing any `.lua` file, format it with stylua:
```bash
stylua <file>
```
Project settings are in `stylua.toml` (90-char line length).
If stylua is not available, skip formatting silently.
## Files to never format
- Files inside `config/nvim/` managed by plugins (lazy.nvim lockfile)

View File

@@ -0,0 +1,44 @@
---
name: shell-validate
description: >-
Validate shell scripts after editing.
Apply when writing or modifying any shell script
in local/bin/ or scripts/.
user-invocable: false
allowed-tools: Bash, Read, Grep
---
After editing any shell script in `local/bin/`, `scripts/`, or `config/`
(files with a `#!` shebang or `# shellcheck shell=` directive),
validate it:
## 1. Determine the shell
- `/bin/sh` or `#!/usr/bin/env sh` shebang -> POSIX, use `sh -n`
- `/bin/bash` or `#!/usr/bin/env bash` shebang -> Bash, use `bash -n`
- `# shellcheck shell=bash` directive (no shebang) -> use `bash -n`
- `# shellcheck shell=sh` directive (no shebang) -> use `sh -n`
- No shebang and no directive -> default to `bash -n`
## 2. Syntax check
Run the appropriate syntax checker:
```bash
bash -n <file> # for bash scripts
sh -n <file> # for POSIX sh scripts
```
If syntax check fails, fix the issue before proceeding.
## 3. ShellCheck
Run `shellcheck <file>`. The project `.shellcheckrc` already
disables SC2039, SC2166, SC2154, SC1091, SC2174, SC2016.
Only report and fix warnings that are NOT in that exclude list.
## Key files to never validate (not shell scripts)
- `local/bin/fzf-tmux` (vendor file)
- `*.md` files
- `*.bats` test files (Bats, not plain shell)

View File

@@ -0,0 +1,38 @@
---
name: yaml-validate
description: >-
Validate YAML files after editing.
Apply when writing or modifying any .yml or .yaml file.
user-invocable: false
allowed-tools: Bash, Read
---
After editing any YAML file, validate it:
## 1. Syntax check
Run yamllint on the file:
```bash
yamllint <file>
```
If yamllint is not available, fall back to:
```bash
python3 -c "import yaml; yaml.safe_load(open('<file>'))"
```
## 2. GitHub Actions workflows
If the file is under `.github/workflows/`, also run:
```bash
actionlint <file>
```
If actionlint is not available, skip silently.
## Files to skip
- `config/gh/hosts.yml` — managed by `gh` CLI, not hand-edited

View File

@@ -8,6 +8,10 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.py]
indent_size = 4
max_line_length = 120
[*.fish]
max_line_length = 120

View File

@@ -7,6 +7,7 @@
"Exclude": [
"base/plan",
"config/fish/completions/.*",
"config/karabiner/.*",
"config/fish/conf.d/.*",
"config/fish/functions/.*",
"config/fzf/key-bindings.fish",

6
.github/README.md vendored
View File

@@ -37,7 +37,7 @@ see what interesting stuff you've done with it. Sharing is caring.
### Interesting folders
| Path | Description |
| ------------------- | -------------------------------------------- |
|---------------------|----------------------------------------------|
| `.github` | GitHub Repository configuration files, meta. |
| `hosts/{hostname}/` | Configs that should apply to that host only. |
| `local/bin` | Helper scripts that I've collected or wrote. |
@@ -52,7 +52,7 @@ is processed by Dotbot during installation.
### dotfile folders
| Repo | Destination | Description |
| --------- | ----------- | ------------------------------------------- |
|-----------|-------------|---------------------------------------------|
| `base/` | `.*` | `$HOME` level files. |
| `config/` | `.config/` | Configurations for applications. |
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
@@ -86,7 +86,7 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
### XDG Variables
| Env | Default | Short description |
| ------------------ | -------------------- | ---------------------------------------------- |
|--------------------|----------------------|------------------------------------------------|
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |

View File

@@ -9,25 +9,27 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
permissions:
contents: read
jobs:
debug-changelog:
runs-on: ubuntu-latest
permissions: write-all
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@941366edb8920e2071eae0449031830984b9f26e # v1.3.0
uses: loopwerk/tag-changelog@8dd150d55fbf1fe93e0ea00a29a6153aaeb81912 # v1.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/tag-changelog-config.js
- name: 'Echo results'
- name: "Echo results"
id: output-changelog
run: |
echo "${{ steps.changelog.outputs.changes }}"

View File

@@ -5,13 +5,14 @@ name: Lint Code Base
# yamllint disable-line
on:
pull_request:
branches: [master, main]
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
permissions:
contents: read
jobs:
Linter:
@@ -30,9 +31,9 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Yarn Lock Changes
uses: Simek/yarn-lock-changes@c7543145aaafdd8fc925cea5d85b2bd5a73091f8 # v0.14.0
uses: Simek/yarn-lock-changes@59f47ee499424d2c2437c5aebf863b5c6d50a5bc # v0.14.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run PR Lint
uses: ivuorinen/actions/pr-lint@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03
uses: ivuorinen/actions/pr-lint@1da3a0e79fcd7da6bed9ee1979f1449ba11f58f9 # v2026.03.14

View File

@@ -5,19 +5,21 @@ name: Release Daily State
on:
workflow_dispatch:
schedule:
- cron: '0 21 * * *' # 00:00 at Europe/Helsinki
- cron: "0 21 * * *" # 00:00 at Europe/Helsinki
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
permissions:
contents: read
jobs:
new-daily-release:
runs-on: ubuntu-latest
permissions: write-all
permissions:
contents: write
outputs:
created: ${{ steps.daily-version.outputs.created }}
@@ -33,14 +35,14 @@ jobs:
- name: Create changelog text
if: steps.daily-version.outputs.created
id: changelog
uses: loopwerk/tag-changelog@941366edb8920e2071eae0449031830984b9f26e # v1.3.0
uses: loopwerk/tag-changelog@8dd150d55fbf1fe93e0ea00a29a6153aaeb81912 # v1.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/tag-changelog-config.js
- name: Create release
if: steps.daily-version.outputs.created
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.daily-version.outputs.version }}

View File

@@ -5,14 +5,15 @@ name: Pre-commit autoupdate
on:
schedule:
# At 04:00 on Monday and Thursday.
- cron: '0 4 * * 1,4'
- cron: "0 4 * * 1,4"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
permissions:
contents: read
jobs:
auto-update:
@@ -33,6 +34,6 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-hooks
title: 'chore: update pre-commit hooks'
commit-message: 'chore: update pre-commit hooks'
title: "chore: update pre-commit hooks"
commit-message: "chore: update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version.

View File

@@ -14,7 +14,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
permissions:
pull-requests: read
jobs:
semantic-pr:

View File

@@ -11,7 +11,7 @@ on:
- .github/workflows/sync-labels.yml
- .github/labels.yml
schedule:
- cron: '34 5 * * *'
- cron: "34 5 * * *"
workflow_call:
workflow_dispatch:
@@ -19,7 +19,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
permissions:
contents: read
jobs:
SyncLabels:
@@ -29,4 +30,4 @@ jobs:
issues: write
steps:
- uses: ivuorinen/actions/sync-labels@f371da218e9152e7d29ee39358454e41010c36dc # v2026.02.03
- uses: ivuorinen/actions/sync-labels@1da3a0e79fcd7da6bed9ee1979f1449ba11f58f9 # v2026.03.14

View File

@@ -5,20 +5,22 @@ name: Update submodules
on:
schedule:
# At 04:00 on Monday and Thursday.
- cron: '0 4 * * 1'
- cron: "0 4 * * 1,4"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
permissions:
contents: read
jobs:
update-submodules:
runs-on: ubuntu-latest
permissions: write-all
permissions:
contents: write
steps:
- name: Checkout repository

3
.gitignore vendored
View File

@@ -25,6 +25,8 @@ config/alacritty/theme-active.toml
config/cheat/cheatsheets/pure-bash-bible/*
config/cheat/cheatsheets/tldr/*
config/fish/completions/asdf.fish
config/fish/completions/kubectl.fish
config/fish/completions/orbctl.fish
config/fish/fish_variables
config/fish/fish_variables.*
config/gh/hosts.yml
@@ -56,5 +58,6 @@ local/man/yabai.1
local/share/fonts/*
lock
node_modules
__pycache__
ssh/local.d/*
config/fish/fish_variables*

View File

@@ -1 +0,0 @@
1.25.5

View File

@@ -9,16 +9,21 @@ VALIDATE_ALL_CODEBASE: true
FILEIO_REPORTER: false # Generate file.io report
GITHUB_STATUS_REPORTER: true # Generate GitHub status report
IGNORE_GENERATED_FILES: true # Ignore generated files
JAVASCRIPT_DEFAULT_STYLE: prettier # Default style for JavaScript
PRINT_ALPACA: false # Print Alpaca logo in console
SARIF_REPORTER: true # Generate SARIF report
SHOW_SKIPPED_LINTERS: false # Show skipped linters in MegaLinter log
TYPESCRIPT_DEFAULT_STYLE: prettier # Default style for TypeScript
DISABLE_LINTERS:
- REPOSITORY_DEVSKIM
- JAVASCRIPT_ES # using biome
- JAVASCRIPT_PRETTIER # using biome
- TYPESCRIPT_PRETTIER # using biome
- JSON_PRETTIER # using biome
- PYTHON_BLACK # using ruff
- PYTHON_FLAKE8 # using ruff
- PYTHON_PYLINT # using ruff
- PYTHON_ISORT # using ruff (I rules)
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
REPOSITORY_GIT_DIFF_DISABLE_ERRORS: true
BASH_SHFMT_ARGUMENTS: -i 2 -bn -ci -sr -fn
FILTER_REGEX_EXCLUDE: >
(node_modules|tools|config/cheat/cheatsheets/community|config/cheat/cheatsheets/tldr|config/fzf|config/zsh|config/tmux/plugins)

4
.mise.toml Normal file
View File

@@ -0,0 +1,4 @@
[tools]
node = "24.14.0"
python = "3.14.3"
go = "1.25.5"

1
.nvmrc
View File

@@ -1 +0,0 @@
24.13.0

View File

@@ -28,12 +28,25 @@ repos:
entry: yarn biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
language: system
files: \.(js|ts|jsx|tsx|json|md)$
- id: markdown-table-formatter
name: Markdown Table Formatter
entry: yarn markdown-table-formatter
language: system
types: [markdown]
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
- repo: local
hooks:
- id: prettier
name: Prettier (YAML)
entry: yarn prettier --write
language: system
types_or: [yaml]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
@@ -43,14 +56,15 @@ repos:
rev: v3.12.0-2
hooks:
- id: shfmt
args: [-i, "2", -bn, -ci, -sr, -fn, -w]
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
rev: v1.7.11
hooks:
- id: actionlint
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v2.3.1
rev: v2.4.0
hooks:
- id: stylua # or stylua-system / stylua-github
exclude: hammerspoon\.types\.lua$
@@ -60,3 +74,10 @@ repos:
hooks:
- id: fish_syntax
- id: fish_indent
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.6
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format

18
.prettierignore Normal file
View File

@@ -0,0 +1,18 @@
node_modules
.yarn
.pnp.*
.mypy_cache
Brewfile.lock.json
lazy-lock.json
config/cheat/cheatsheets/community
config/cheat/cheatsheets/tldr
config/fzf
config/nvim
config/op/plugins/used_plugins
config/tmux/plugins
config/vim/plugged
config/zsh
local/bin/antigen.zsh
local/bin/asdf
tools
config/gh/hosts.yml

9
.prettierrc.json Normal file
View File

@@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 200,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf",
"singleQuote": false,
"proseWrap": "preserve"
}

View File

@@ -1 +0,0 @@
3.14.2

View File

@@ -50,12 +50,11 @@ the primary installation framework to manage symlinks and setup configurations.
- **Platform**: Darwin (macOS) - Version 24.6.0
- **Architecture**: Universal (Intel/Apple Silicon via Homebrew)
- **Dependencies**: Git, Homebrew, Yarn, various CLI tools managed via asdf/aqua
- **Dependencies**: Git, Homebrew, Yarn, various CLI tools managed via mise
## Development Environment
- Node.js managed via nvm/asdf
- Go version specified (.go-version)
- Python version specified (.python-version)
- Node.js, Go, Python, Ruby, Rust managed via mise
- Version files (.nvmrc, .go-version, .python-version) consumed by mise via idiomatic_version_file
- Package management via Yarn with lockfile
- TypeScript support for configuration files

View File

@@ -30,7 +30,7 @@ Configuration files for development tools and applications:
- `starship.toml` - Starship prompt configuration
- `shared.sh` - Cross-shell compatibility functions
- `aerospace/`, `amethyst/`, `yabai/`, `skhd/` - Window managers
- `direnv/`, `asdf/`, `aqua/` - Development environment tools
- `direnv/`, `mise/`, `aqua/` - Development environment tools
- `gpg-tui/`, `op/`, `gh/` - Security and CLI tools
- Theme configurations: everforest color schemes across multiple tools
@@ -97,7 +97,7 @@ Installation and setup automation scripts
- `.shellcheckrc` - ShellCheck configuration
- `.mega-linter.yml` - MegaLinter configuration
- `.luarc.json` - Lua language server configuration
- `.nvmrc`, `.go-version`, `.python-version` - Version management
- `.nvmrc`, `.go-version`, `.python-version` - Version files (consumed by mise)
- Various ignore files (.gitignore, .prettierignore, .yamlignore, etc.)
## Testing Infrastructure

View File

@@ -59,10 +59,11 @@ pre-commit run --all-files
## Version Management
```bash
# Check current versions
node --version # Managed by nvm (.nvmrc: v20.18.1)
go version # Managed by asdf (.go-version)
python --version # Managed by asdf (.python-version)
# Check current versions (all managed by mise)
node --version # mise (.nvmrc via idiomatic_version_file)
go version # mise (.go-version)
python --version # mise (.python-version)
mise ls # List all installed tool versions
```
## System Utilities (Darwin-specific)

View File

@@ -13,11 +13,11 @@ ignore_all_files_in_gitignore: true
# Was previously called `ignored_dirs`, please update your config if you are using that.
# Added (renamed) on 2025-04-07
ignored_paths:
- '*.swp'
- '*.tmp'
- '*.tmp.*'
- '.DS_Store'
- '.git/**'
- "*.swp"
- "*.tmp"
- "*.tmp.*"
- ".DS_Store"
- ".git/**"
- /config/cheat/cheatsheets/community/**
- /config/cheat/cheatsheets/pure-bash-bible/**
- /config/cheat/cheatsheets/tldr/**
@@ -85,6 +85,6 @@ excluded_tools: []
# initial prompt for the project. It will always be given to the LLM upon activating the project
# (contrary to the memories, which are loaded on demand).
initial_prompt: ''
initial_prompt: ""
project_name: '.dotfiles'
project_name: ".dotfiles"

View File

@@ -1,55 +0,0 @@
# Project guidelines
This repository contains configuration files and helper scripts for managing
a development environment.
Dotbot drives installation, and host-specific folders under `hosts/` contain extra configs.
## Setup
1. Run `yarn install` to fetch linting tools and the Bats test framework.
2. Re-run `yarn install` whenever `package.json` changes.
3. Yarn is the package manager of choice; avoid `npm` commands.
## Keeping the repository up to date
1. Update submodules with `git submodule update --remote --merge`.
2. Pull the latest changes and run `./install`.
## Linting and tests
- Format files with:
```bash
yarn fix:prettier
yarn fix:markdown
```
- Shell scripts must pass `shellcheck`.
```bash
find . -path ./node_modules -prune -o -name '*.sh' -print0 | xargs -0 shellcheck
```
- Ensure `.editorconfig` rules pass:
```bash
tools/install-ec.sh
ec
```
- Execute tests with `yarn test` when code changes.
## Debugging lint issues
- `yarn lint:prettier` and `yarn lint:markdown` show formatting errors.
- Ensure shell scripts have a shebang or `# shellcheck shell=bash` directive.
- Consult `.shellcheckrc` for project specific checks.
Scripts rely on helpers in `config/shared.sh` so they run under Bash, Zsh and Fish by default.
## Commits and PRs
- Use Semantic Commit messages: `type(scope): summary`.
- Keep PR titles in the same format.
<!-- vim: set ft=markdown spell spelllang=en_us cc=80 : -->

255
CLAUDE.md Normal file
View File

@@ -0,0 +1,255 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code)
when working with code in this repository.
## Repository Overview
Personal dotfiles repository for Ismo Vuorinen.
Uses **Dotbot** (not GNU Stow) to symlink configuration files into place.
The directory layout follows the XDG Base Directory Specification.
## Directory Layout and Linking
| Source | Destination | Notes |
|---------------------|-------------------|-------------------------------------------|
| `base/*` | `~/.*` | Home-level dotfiles (`.` added by Dotbot) |
| `config/*` | `~/.config/` | Application configurations |
| `local/bin/*` | `~/.local/bin/` | Helper scripts and utilities |
| `local/share/*` | `~/.local/share/` | Data files |
| `local/man/**` | `~/.local/man/` | Manual pages |
| `ssh/*` | `~/.ssh/` | SSH configuration (mode 0600) |
| `hosts/<hostname>/` | Overlays | Host-specific overrides |
Installation: `./install` runs Dotbot with `install.conf.yaml`,
then applies `hosts/<hostname>/install.conf.yaml` if it exists.
## Commands
```bash
# Install dependencies (required before lint/test)
yarn install
# Linting
yarn lint # Run biome + prettier + editorconfig-checker
yarn lint:biome # Biome only
yarn lint:ec # EditorConfig checker only
yarn lint:md-table # Markdown table formatting check
yarn fix:md-table # Auto-fix markdown tables
# Formatting
yarn fix:biome # Autofix with biome (JS/TS/JSON/MD)
yarn fix:prettier # Autofix with prettier (YAML)
yarn format # Format with biome
yarn format:yaml # Format YAML files with prettier
# Testing (Bats - Bash Automated Testing System)
yarn test # Run all tests in tests/
# Run a single test file:
./node_modules/.bin/bats tests/dfm.bats
# Shell linting
shellcheck <script> # Lint shell scripts
# Tooling maintenance
npx @biomejs/biome migrate --write # Update biome schema version
```
## Pre-commit Hooks
Configured in `.pre-commit-config.yaml`: shellcheck, shfmt, biome,
yamllint, prettier, actionlint, stylua, fish_syntax/fish_indent, ruff.
Run `pre-commit run --all-files` to check everything.
## Commit Convention
Semantic Commit messages: `type(scope): summary`
(e.g., `fix(tmux): correct prefix binding`).
Enforced by commitlint extending `@ivuorinen/commitlint-config`.
## Architecture
### Shell Configuration Chain
Both `base/bashrc` and `base/zshrc` source `config/shared.sh`,
which loads:
- `config/exports` — environment variables, XDG dirs, PATH
- `config/alias` — shell aliases
Zsh additionally uses **antidote** (in `tools/antidote/`)
for plugin management and **oh-my-posh** for the prompt.
### msgr — Messaging Helper
`local/bin/msgr` provides colored output functions (`msgr msg`,
`msgr run`, `msgr yay`, `msgr err`, `msgr warn`). Sourced by `dfm`
and most scripts in `local/bin/`.
### dfm — Dotfiles Manager
`local/bin/dfm` is the main management script. Key commands:
- `dfm install all` — install everything in tiered stages
- `dfm brew install` / `dfm brew update` — Homebrew management
- `dfm apt upkeep` — APT package maintenance (Debian/Ubuntu)
- `dfm dotfiles fmt` / `dfm dotfiles shfmt` — format configs/scripts
- `dfm helpers <name>` — inspect aliases, colors, env, functions, path
- `dfm docs all` — regenerate documentation under `docs/`
- `dfm check arch` / `dfm check host` — system info
- `dfm scripts` — run scripts from `scripts/` (discovered via `@description` tags)
- `dfm tests` — test visualization helpers
### Submodules
External dependencies are git submodules (Dotbot, plugins,
tmux plugins, cheatsheets, antidote).
Managed by `add-submodules.sh`. All set to `ignore = dirty`.
Updated automatically via GitHub Actions on a schedule.
### Host-specific Configs
Machine-specific overrides live in `hosts/<hostname>/`
with their own `base/`, `config/`, and `install.conf.yaml`.
These are layered on top of the global config during installation.
## Code Style
- **EditorConfig**: 2-space indent, UTF-8, LF line endings.
See `.editorconfig` for per-filetype overrides
(4-space for PHP/fish, tabs for git config).
- **Shell scripts**: Must have a shebang or
`# shellcheck shell=bash` directive.
Follow shfmt settings in `.editorconfig`
(2-space indent, `binary_next_line`,
`switch_case_indent`, `space_redirects`, `function_next_line`).
- **Lua** (neovim config): Formatted with stylua (`stylua.toml`),
90-char line length.
- **JSON/JS/TS/Markdown**: Formatted with Biome (`biome.json`),
80-char width (Markdown uses 120-char override).
- **YAML**: Formatted with Prettier (`.prettierrc.json`),
validated with yamllint (`.yamllint.yml`).
## ShellCheck Disabled Rules
Defined in `.shellcheckrc`:
SC2039 (POSIX `local`), SC2166 (`-o` in test),
SC2154 (unassigned variables), SC1091 (source following),
SC2174 (mkdir -p -m), SC2016 (single-quote expressions).
## Gotchas
- **POSIX scripts**: `x-ssh-audit`, `x-codeql`, `x-until-error`,
`x-until-success`, `x-ssl-expiry-date` use `/bin/sh`.
Validate with `sh -n`, not `bash -n`.
- **Vendor file**: `local/bin/fzf-tmux` is vendored from
junegunn/fzf — do not modify.
- **Fish config**: `config/fish/` has its own config chain
(`config.fish`, `exports.fish`, `alias.fish`) plus 60+ functions.
- **gh CLI config**: `config/gh/hosts.yml` is managed by `gh` CLI
and excluded from prettier (see `.prettierignore`).
- **Python**: Two scripts (`x-compare-versions.py`,
`x-git-largest-files.py`) linted by Ruff (config in `pyproject.toml`).
## Claude Code Configuration
- **Hooks** (`.claude/settings.json`):
- *PreToolUse*: Blocks edits to `fzf-tmux`, `yarn.lock`, `.yarn/`
- *PostToolUse*: Auto-runs `shfmt` on shell scripts after Edit/Write
- *PostToolUse*: Auto-runs `fish_indent` on `.fish` files after Edit/Write
- *PostToolUse*: Auto-runs `stylua` on `.lua` files after Edit/Write
- **Skills** (`.claude/skills/`):
- `shell-validate`: Auto-validates shell scripts (syntax + shellcheck)
- `fish-validate`: Auto-validates fish scripts (syntax + fish_indent)
- `lua-format`: Auto-formats Lua files with stylua
- `yaml-validate`: Auto-validates YAML files (yamllint + actionlint)
- **Subagents** (`.claude/agents/`):
- `code-reviewer`: Reviews shell/fish/lua changes for correctness and style
- **MCP Servers**:
- `context7`: Live documentation lookup for tools and libraries
## Package Manager
Yarn (v4.12.0) is the package manager. Do not use npm.
# context-mode — MANDATORY routing rules
You have context-mode MCP tools available. These rules are NOT optional —
they protect your context window from flooding.
A single unrouted command can dump 56 KB into context and waste the entire session.
## BLOCKED commands — do NOT attempt these
### curl / wget — BLOCKED
Any Bash command containing `curl` or `wget` is intercepted and replaced with an error message. Do NOT retry.
Instead use:
- `ctx_fetch_and_index(url, source)` to fetch and index web pages
- `ctx_execute(language: "javascript", code: "const r = await fetch(...)")` to run HTTP calls in sandbox
### Inline HTTP — BLOCKED
Any Bash command containing `fetch('http`, `requests.get(`, `requests.post(`,
`http.get(`, or `http.request(` is intercepted and replaced with an error message.
Do NOT retry with Bash.
Instead use:
- `ctx_execute(language, code)` to run HTTP calls in sandbox — only stdout enters context
### WebFetch — BLOCKED
WebFetch calls are denied entirely. The URL is extracted and you are told to use `ctx_fetch_and_index` instead.
Instead use:
- `ctx_fetch_and_index(url, source)` then `ctx_search(queries)` to query the indexed content
## REDIRECTED tools — use sandbox equivalents
### Bash (>20 lines output)
Bash is ONLY for: `git`, `mkdir`, `rm`, `mv`, `cd`, `ls`, `yarn install`, `pip install`,
and other short-output commands.
For everything else, use:
- `ctx_batch_execute(commands, queries)` — run multiple commands + search in ONE call
- `ctx_execute(language: "shell", code: "...")` — run in sandbox, only stdout enters context
### Read (for analysis)
If you are reading a file to **Edit** it → Read is correct (Edit needs content in context).
If you are reading to **analyze, explore, or summarize**
use `ctx_execute_file(path, language, code)` instead.
Only your printed summary enters context. The raw file content stays in the sandbox.
### Grep (large results)
Grep results can flood context.
Use `ctx_execute(language: "shell", code: "grep ...")` to run searches in sandbox.
Only your printed summary enters context.
## Tool selection hierarchy
1. **GATHER**: `ctx_batch_execute(commands, queries)` — Primary tool.
Runs all commands, auto-indexes output, returns search results.
ONE call replaces 30+ individual calls.
2. **FOLLOW-UP**: `ctx_search(queries: ["q1", "q2", ...])`
Query indexed content. Pass ALL questions as array in ONE call.
3. **PROCESSING**: `ctx_execute(language, code)` |
`ctx_execute_file(path, language, code)`
Sandbox execution. Only stdout enters context.
4. **WEB**: `ctx_fetch_and_index(url, source)` then
`ctx_search(queries)` — Fetch, chunk, index, query.
Raw HTML never enters context.
5. **INDEX**: `ctx_index(content, source)`
Store content in FTS5 knowledge base for later search.
## Subagent routing
When spawning subagents (Agent/Task tool), the routing block is automatically
injected into their prompt. Bash-type subagents are upgraded to general-purpose
so they have access to MCP tools.
You do NOT need to manually instruct subagents about context-mode.
## Output constraints
- Keep responses under 500 words.
- Write artifacts (code, configs, PRDs) to FILES — never return them
as inline text. Return only: file path + 1-line description.
- When indexing content, use descriptive source labels so others can `ctx_search(source: "label")` later.
## ctx commands
| Command | Action |
|---------------|---------------------------------------------------------------------------------------|
| `ctx stats` | Call the `ctx_stats` MCP tool and display the full output verbatim |
| `ctx doctor` | Call the `ctx_doctor` MCP tool, run the returned shell command, display as checklist |
| `ctx upgrade` | Call the `ctx_upgrade` MCP tool, run the returned shell command, display as checklist |

View File

@@ -42,19 +42,25 @@ done
# Mark certain repositories shallow
git config -f .gitmodules submodule.antidote.shallow true
_log() {
# Log a message using msgr if available, else echo
_log()
{
local msg="$1"
if command -v msgr > /dev/null 2>&1; then
msgr run_done "$1"
msgr run_done "$msg"
else
echo " [ok] $1"
echo " [ok] $msg"
fi
return 0
}
remove_old_submodule() {
# Remove a stale git submodule and clean up references
remove_old_submodule()
{
local name="$1" path="$2"
# Remove working tree
if [ -d "$path" ]; then
if [[ -d "$path" ]]; then
rm -rf "$path"
_log "Removed $path"
fi
@@ -66,13 +72,13 @@ remove_old_submodule() {
git config --remove-section "submodule.$path" 2> /dev/null || true
# Skip name-based cleanup if no submodule name provided
[ -z "$name" ] && return 0
[[ -z "$name" ]] && return 0
# Remove .git/config section keyed by name
git config --remove-section "submodule.$name" 2> /dev/null || true
# Remove .git/modules/<name>/ cached repository
if [ -d ".git/modules/$name" ]; then
if [[ -d ".git/modules/$name" ]]; then
rm -rf ".git/modules/$name"
_log "Removed .git/modules/$name"
fi

View File

@@ -22,4 +22,3 @@ x-have antidot && {
PROMPT_DIRTRIM=3
PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null)'
PS1='\[\e[95m\]\u\[\e[0m\]@\[\e[38;5;22;2m\]\h\[\e[0m\] \[\e[38;5;33m\]\w\[\e[0m\] \[\e[92;2m\]${PS1_CMD1}\n\[\e[39m\]➜\[\e[0m\] '

View File

@@ -38,4 +38,3 @@ bashcompinit
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
export P10K_CONFIG="$DOTFILES/config/zsh/p10k.zsh"
[[ ! -f "$P10K_CONFIG" ]] || source "$P10K_CONFIG"

View File

@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
@@ -20,6 +20,7 @@
"!!**/config/op/plugins/used_plugins",
"!!**/config/tmux/plugins",
"!!**/config/zsh",
"!!**/config/karabiner",
"!!**/config/vim",
"!!**/lazy-lock.json",
"!!**/local/bin/antigen.zsh",

View File

@@ -33,6 +33,8 @@ alias .c='cd $HOME/Code'
alias .d='cd $DOTFILES'
alias .l='cd $HOME/.local'
alias .o='cd $HOME/Code/ivuorinen/obsidian/'
alias .s='cd $HOME/Code/s'
alias .p='cd $HOME/Code/ivuorinen'
# Shortcuts for listing
alias ll="ls -la"

View File

@@ -93,13 +93,13 @@ expand-main:
# Note that not all layouts respond to this command.
increase-main:
mod: mod1
key: ','
key: ","
# Decrease the number of windows in the main pane.
# Note that not all layouts respond to this command.
decrease-main:
mod: mod1
key: '.'
key: "."
# General purpose command for custom layouts.
# Functionality is layout-dependent.

View File

@@ -4,17 +4,30 @@
# Set XDG directories if not already set
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config"
[ -z "$XDG_DATA_HOME" ] && export XDG_DATA_HOME="$HOME/.local/share"
[ -z "$XDG_CACHE_HOME" ] && export XDG_CACHE_HOME="$HOME/.cache"
[ -z "$XDG_STATE_HOME" ] && export XDG_STATE_HOME="$HOME/.local/state"
[ -z "$XDG_BIN_HOME" ] && export XDG_BIN_HOME="$HOME/.local/bin"
[ -z "$XDG_RUNTIME_DIR" ] && export XDG_RUNTIME_DIR="$HOME/.local/run"
[ -z "${XDG_CONFIG_HOME:-}" ] && export XDG_CONFIG_HOME="$HOME/.config"
[ -z "${XDG_DATA_HOME:-}" ] && export XDG_DATA_HOME="$HOME/.local/share"
[ -z "${XDG_CACHE_HOME:-}" ] && export XDG_CACHE_HOME="$HOME/.cache"
[ -z "${XDG_STATE_HOME:-}" ] && export XDG_STATE_HOME="$HOME/.local/state"
[ -z "${XDG_BIN_HOME:-}" ] && export XDG_BIN_HOME="$HOME/.local/bin"
[ -z "${XDG_RUNTIME_DIR:-}" ] && export XDG_RUNTIME_DIR="$HOME/.local/run"
# if DOTFILES is not set, set it to the default location
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles"
[ -z "${DOTFILES:-}" ] && export DOTFILES="$HOME/.dotfiles"
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
# Editor settings
[ -z "${EDITOR:-}" ] && export EDITOR="nvim"
[ -z "${VISUAL:-}" ] && export VISUAL="code"
# Bootstrap: ensure local/bin is on PATH so x-path is available
PATH="$DOTFILES/local/bin:$PATH"
# Use x-path to deduplicate PATH entries (only if x-path is available)
if command -v x-path &> /dev/null; then
# shellcheck source=../local/bin/x-path
source "$(command -v x-path)"
normalize_path_var
do_prepend "$XDG_BIN_HOME" "$DOTFILES/local/bin" "/opt/homebrew/bin" "/usr/local/bin"
fi
export PATH
if ! command -v msg &> /dev/null; then
# Function to print messages if VERBOSE is enabled
@@ -150,6 +163,7 @@ commit()
git commit -a -m "$commitMessage"
}
# Run Laravel scheduler in a loop
scheduler()
{
while :; do
@@ -303,7 +317,7 @@ export ANTIDOTE_PLUGINS="$XDG_CONFIG_HOME/zsh/antidote_plugins"
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
msg "Setting up Ansible configuration"
export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible.cfg"
export ANSIBLE_CONFIG="$ANSIBLE_HOME/ansible.cfg"
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy_cache"
x-dc "$ANSIBLE_HOME"
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
@@ -324,10 +338,25 @@ export AWS_CONFIGURE_OUTPUT=true
export AWS_CONFIGURE_PROFILE=true
export AWS_CONFIGURE_PROMPT=true
export AWS_CONFIGURE_PROMPT_DEFAULT="default"
export AWS_SESSION_TOKEN_FILE="${XDG_STATE_HOME}/aws/session_token"
export AWS_CONFIGURE_SESSION=true
export AWS_CONFIGURE_SESSION_DURATION=7200
export AWS_CONFIGURE_SESSION_MFA=true
# bob manages nvim versions
msg "Setting up bob configuration"
x-path-prepend "$XDG_DATA_HOME/bob/nvim-bin"
# Mason (nvim package manager)
msg "Setting up Mason configuration"
export MASON_HOME="$XDG_DATA_HOME/nvim/mason"
# Neovim environment variables
msg "Setting up Neovim configuration"
[ -z "${NVIM_STATE:-}" ] && export NVIM_STATE="$XDG_STATE_HOME/nvim"
[ -z "${NVIM_CONFIG_HOME:-}" ] && export NVIM_CONFIG_HOME="$XDG_CONFIG_HOME/nvim"
[ -z "${NVIM_DATA_HOME:-}" ] && export NVIM_DATA_HOME="$XDG_DATA_HOME/nvim"
[ -z "${NVIM_CACHE_HOME:-}" ] && export NVIM_CACHE_HOME="$XDG_CACHE_HOME/nvim"
[ -z "${NVIM_LOG_PATH:-}" ] && export NVIM_LOG_PATH="$NVIM_STATE/log"
[ -z "${NVIM_SESSION_PATH:-}" ] && export NVIM_SESSION_PATH="$NVIM_STATE/session"
[ -z "${NVIM_SHADA_PATH:-}" ] && export NVIM_SHADA_PATH="$NVIM_STATE/shada"
[ -z "${NVIM_UNDO_PATH:-}" ] && export NVIM_UNDO_PATH="$NVIM_STATE/undo"
# bkt (shell command caching tool) configuration
msg "Setting up bkt configuration"
@@ -349,12 +378,21 @@ export COMPOSER_HOME="$XDG_STATE_HOME/composer"
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
export PATH="$COMPOSER_BIN:$PATH"
# Yarn
msg "Setting up Yarn configuration"
export YARN_GLOBAL_FOLDER="$XDG_DATA_HOME/yarn"
# docker, https://docs.docker.com/engine/reference/commandline/cli/
msg "Setting up Docker configuration"
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
x-dc "$DOCKER_CONFIG"
# Docker: Disable snyk ad
export DOCKER_SCAN_SUGGEST=false
export DOCKER_HIDE_LEGACY_COMMANDS=true
# direnv
msg "Setting up direnv configuration"
export DIRENV_LOG_FORMAT=""
# fzf
export FZF_BASE="${XDG_CONFIG_HOME}/fzf"
@@ -374,13 +412,6 @@ export GOBIN="$XDG_BIN_HOME"
# Lando
export PATH="$HOME/.lando/bin${PATH+:$PATH}" #landopath
# NPM: Add npm packages to path
msg "Setting up NPM configuration"
x-have node && {
NVM_NODE_BIN_DIR="$(dirname "$(which node)")"
export PATH="$NVM_NODE_BIN_DIR:$PATH"
}
# oh-my-posh (omp) configuration
msg "Setting up oh-my-posh configuration"
export OHMYPOSH_CFG="$DOTFILES/config/omp/own.toml"
@@ -390,20 +421,21 @@ msg "Setting up 1Password CLI configuration"
export OP_CACHE="$XDG_STATE_HOME/1password"
# Python
#
# pyenv, python environments
msg "Setting up Python configuration"
export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
## for MichaelAquilina/zsh-autoswitch-virtualenv
export AUTOSWITCH_VIRTUAL_ENV_DIR="$WORKON_HOME"
export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
x-have pyenv && eval "$(pyenv init -)"
# Rust / cargo
msg "Setting up Rust/Cargo configuration"
export RUST_WITHOUT=rust-docs
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export CARGO_BIN_HOME="$XDG_BIN_HOME"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export RUST_WITHOUT="clippy,docs,rls"
# Poetry
msg "Setting up Poetry configuration"
export POETRY_HOME="$XDG_DATA_HOME/poetry"
# sonarlint
# https://www.sonarlint.org/
@@ -432,6 +464,10 @@ export ZSH_TMUX_UNICODE=true
export ZSH_TMUX_AUTOQUIT=false
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
# tms (tmux session manager)
msg "Setting up tms configuration"
export TMS_CONFIG_FILE="$XDG_CONFIG_HOME/tms/config.toml"
# wakatime, https://github.com/wakatime/wakatime-cli
msg "Setting up Wakatime configuration"
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
@@ -441,15 +477,42 @@ x-dc "$WAKATIME_HOME"
msg "Setting up LM Studio configuration"
export PATH="$PATH:$HOME/.lmstudio/bin"
# Screen
msg "Setting up screen configuration"
export SCREENRC="$XDG_CONFIG_HOME/misc/screenrc"
# Zoxide
msg "Setting up Zoxide configuration"
export _ZO_DATA_DIR="$XDG_DATA_HOME/zoxide"
export _ZO_EXCLUDE_DIRS="$XDG_DATA_HOME"
# Misc
msg "Setting up miscellaneous configuration"
export ZSHZ_DATA="$XDG_STATE_HOME/z"
export CHEAT_USE_FZF=true
export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
[ -f "$XDG_CONFIG_HOME/exports-secret" ] && source "$XDG_CONFIG_HOME/exports-secret"
[ -f "$XDG_CONFIG_HOME/exports-local" ] && source "$XDG_CONFIG_HOME/exports-local"
# Additional PATH entries (aligned with fish config)
[ -d "$XDG_DATA_HOME/mise/shims" ] && export PATH="$XDG_DATA_HOME/mise/shims:$PATH"
[ -d "$YARN_GLOBAL_FOLDER/bin" ] && export PATH="$PATH:$YARN_GLOBAL_FOLDER/bin"
[ -d "$MASON_HOME/bin" ] && export PATH="$PATH:$MASON_HOME/bin"
[ -d "$HOME/.dotnet/tools" ] && export PATH="$PATH:$HOME/.dotnet/tools"
[ -d "$POETRY_HOME/bin" ] && export PATH="$PATH:$POETRY_HOME/bin"
[ -d "$HOME/.opencode/bin" ] && export PATH="$PATH:$HOME/.opencode/bin"
# mise — unified tool version manager
# https://mise.jdx.dev
if command -v mise &> /dev/null; then
if [ -n "${ZSH_NAME:-}" ]; then
eval "$(mise activate zsh)"
else
eval "$(mise activate bash)"
fi
fi
if [ -f "$XDG_CONFIG_HOME/exports-secret" ]; then source "$XDG_CONFIG_HOME/exports-secret"; fi
if [ -f "$XDG_CONFIG_HOME/exports-local" ]; then source "$XDG_CONFIG_HOME/exports-local"; fi
# shellcheck source=./exports-lakka
[ -f "$XDG_CONFIG_HOME/exports-$(hostname)" ] && source "$XDG_CONFIG_HOME/exports-$(hostname)"
if [ -f "$XDG_CONFIG_HOME/exports-$(hostname)" ]; then source "$XDG_CONFIG_HOME/exports-$(hostname)"; fi
# shellcheck source=./exports-lakka-secret
[ -f "$XDG_CONFIG_HOME/exports-$(hostname)-secret" ] && source "$XDG_CONFIG_HOME/exports-$(hostname)-secret"
if [ -f "$XDG_CONFIG_HOME/exports-$(hostname)-secret" ]; then source "$XDG_CONFIG_HOME/exports-$(hostname)-secret"; fi

View File

@@ -1,6 +1,7 @@
# Set aliases for fish shell
alias vim='vim -u "$XDG_CONFIG_HOME/vim/vimrc"'
alias vim='nvim'
alias vi='nvim'
# eza aliases if eza is installed
if type -q eza >/dev/null
@@ -92,5 +93,41 @@ function configure_tide \
--transient=Yes
end
# Navigation aliases
abbr --add .. 'cd ..'
abbr --add ... 'cd ../..'
abbr --add .... 'cd ../../..'
# Interesting folders
function .b --wraps='cd $XDG_BIN_HOME' --description 'cd $XDG_BIN_HOME'
cd $XDG_BIN_HOME $argv
end
function .l --wraps='cd ~/.local' --description 'cd ~/.local'
cd ~/.local $argv
end
function .o --wraps='cd ~/Code/ivuorinen/obsidian/' --description 'cd ~/Code/ivuorinen/obsidian/'
cd ~/Code/ivuorinen/obsidian/ $argv
end
# cd to git root directory
function cdgr --description 'cd to git root'
if git rev-parse --is-inside-work-tree &>/dev/null
cd (git rev-parse --show-toplevel); or return $status
else
echo >&2 "Not in a git repository"
return 1
end
end
# Colored grep
abbr --add grep 'grep --color'
# Date helpers
alias isodate="date +'%Y-%m-%d'"
alias x-datetime="date +'%Y-%m-%d %H:%M:%S'"
alias x-timestamp="date +'%s'"
# Random abbreviations
abbr --add stats onefetch --nerd-fonts --true-color never

View File

@@ -2,21 +2,21 @@
# Place in ~/.config/fish/completions/phpenv.fish
# Complete main commands
complete -c phpenv -f -n "__fish_use_subcommand" -a "install" -d "Install a PHP version"
complete -c phpenv -f -n "__fish_use_subcommand" -a "uninstall" -d "Uninstall a PHP version"
complete -c phpenv -f -n "__fish_use_subcommand" -a "use" -d "Use PHP version for current shell"
complete -c phpenv -f -n "__fish_use_subcommand" -a "local" -d "Set PHP version for current project"
complete -c phpenv -f -n "__fish_use_subcommand" -a "global" -d "Set global PHP version"
complete -c phpenv -f -n "__fish_use_subcommand" -a "list" -d "List installed PHP versions"
complete -c phpenv -f -n "__fish_use_subcommand" -a "ls" -d "List installed PHP versions"
complete -c phpenv -f -n "__fish_use_subcommand" -a "current" -d "Show current PHP version"
complete -c phpenv -f -n "__fish_use_subcommand" -a "which" -d "Show path to PHP binary"
complete -c phpenv -f -n "__fish_use_subcommand" -a "versions" -d "Show all available versions"
complete -c phpenv -f -n "__fish_use_subcommand" -a "doctor" -d "Check phpenv installation"
complete -c phpenv -f -n "__fish_use_subcommand" -a "config" -d "Manage configuration"
complete -c phpenv -f -n "__fish_use_subcommand" -a "extensions" -d "Manage PHP extensions"
complete -c phpenv -f -n "__fish_use_subcommand" -a "ext" -d "Manage PHP extensions"
complete -c phpenv -f -n "__fish_use_subcommand" -a "help" -d "Show help"
complete -c phpenv -f -n __fish_use_subcommand -a install -d "Install a PHP version"
complete -c phpenv -f -n __fish_use_subcommand -a uninstall -d "Uninstall a PHP version"
complete -c phpenv -f -n __fish_use_subcommand -a use -d "Use PHP version for current shell"
complete -c phpenv -f -n __fish_use_subcommand -a local -d "Set PHP version for current project"
complete -c phpenv -f -n __fish_use_subcommand -a global -d "Set global PHP version"
complete -c phpenv -f -n __fish_use_subcommand -a list -d "List installed PHP versions"
complete -c phpenv -f -n __fish_use_subcommand -a ls -d "List installed PHP versions"
complete -c phpenv -f -n __fish_use_subcommand -a current -d "Show current PHP version"
complete -c phpenv -f -n __fish_use_subcommand -a which -d "Show path to PHP binary"
complete -c phpenv -f -n __fish_use_subcommand -a versions -d "Show all available versions"
complete -c phpenv -f -n __fish_use_subcommand -a doctor -d "Check phpenv installation"
complete -c phpenv -f -n __fish_use_subcommand -a config -d "Manage configuration"
complete -c phpenv -f -n __fish_use_subcommand -a extensions -d "Manage PHP extensions"
complete -c phpenv -f -n __fish_use_subcommand -a ext -d "Manage PHP extensions"
complete -c phpenv -f -n __fish_use_subcommand -a help -d "Show help"
# Helper functions for completions
function __phpenv_complete_installed_versions
@@ -26,13 +26,13 @@ end
function __phpenv_complete_available_versions
# Try to get dynamic versions first
if command -q curl -a command -q jq; and functions -q __phpenv_parse_version_field
echo "latest"
echo "nightly"
echo latest
echo nightly
echo "5.x"
echo "7.x"
echo "8.x"
__phpenv_parse_version_field "latest" "8.4"
__phpenv_parse_version_field "nightly" "8.5"
__phpenv_parse_version_field latest "8.4"
__phpenv_parse_version_field nightly "8.5"
__phpenv_parse_version_field "5.x" "5.6"
__phpenv_parse_version_field "7.x" "7.4"
__phpenv_parse_version_field "8.x" "8.4"
@@ -64,18 +64,18 @@ complete -c phpenv -f -n "__fish_seen_subcommand_from uninstall use local global
-a "(__phpenv_complete_installed_versions)" -d "Installed PHP version"
# Add system option for use command
complete -c phpenv -f -n "__fish_seen_subcommand_from use" -a "system" -d "Use system PHP"
complete -c phpenv -f -n "__fish_seen_subcommand_from use" -a system -d "Use system PHP"
# Complete binaries for which command
complete -c phpenv -f -n "__fish_seen_subcommand_from which" -a "(__phpenv_complete_binaries)" -d "PHP binary"
# Complete config subcommands
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
-a "get" -d "Get configuration value"
-a get -d "Get configuration value"
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
-a "set" -d "Set configuration value"
-a set -d "Set configuration value"
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and not __fish_seen_subcommand_from get set list" \
-a "list" -d "List all configuration"
-a list -d "List all configuration"
# Complete config keys
complete -c phpenv -f -n "__fish_seen_subcommand_from config; and __fish_seen_subcommand_from get set" \
@@ -91,27 +91,27 @@ complete -c phpenv -f \
complete -c phpenv -f \
-n "__fish_seen_subcommand_from extensions ext" \
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
-a "install" -d "Install PHP extension"
-a install -d "Install PHP extension"
complete -c phpenv -f \
-n "__fish_seen_subcommand_from extensions ext" \
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
-a "uninstall" -d "Uninstall PHP extension"
-a uninstall -d "Uninstall PHP extension"
complete -c phpenv -f \
-n "__fish_seen_subcommand_from extensions ext" \
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
-a "remove" -d "Remove PHP extension"
-a remove -d "Remove PHP extension"
complete -c phpenv -f \
-n "__fish_seen_subcommand_from extensions ext" \
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
-a "list" -d "List installed extensions"
-a list -d "List installed extensions"
complete -c phpenv -f \
-n "__fish_seen_subcommand_from extensions ext" \
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
-a "ls" -d "List installed extensions"
-a ls -d "List installed extensions"
complete -c phpenv -f \
-n "__fish_seen_subcommand_from extensions ext" \
-n "not __fish_seen_subcommand_from install uninstall remove list ls available" \
-a "available" -d "Show available extensions"
-a available -d "Show available extensions"
# Complete extension names
complete -c phpenv -f \

View File

@@ -1,22 +0,0 @@
function ___paths_plugin_set_colors
if not set -q ___paths_plugin_colors
set -Ux ___paths_plugin_colors 27e6ff 29e0ff 5cd8ff 77d0ff 8ac8ff 9cbfff afb5ff c5a7ff d99bfe ea8feb f684d5 fe7abd ff73a3 ff708a fa7070 ff708a ff73a3 fe7abd f684d5 ea8feb d99bfe c5a7ff afb5ff 9cbfff 8ac8ff 77d0ff 5cd8ff 29e0ff
end
return 0
end
function _paths_uninstall --on-event paths_uninstall
for i in ___paths_plugin_wrap_color ___paths_plugin_output ___paths_plugin_handle_found_item ___paths_plugin_handle_source ___paths_plugin_cycle_color
functions -e $i
end
set -e ___paths_plugin_colors
set -e ___paths_plugin_current_color
end
function _paths_install --on-event _paths_install
___paths_plugin_set_colors
end
function _paths_update --on-event paths_update
___paths_plugin_set_colors
end

View File

@@ -23,7 +23,7 @@ if not set -q PHPENV_AUTO_SWITCH
end
if not set -q PHPENV_DEFAULT_EXTENSIONS
set -g PHPENV_DEFAULT_EXTENSIONS "opcache"
set -g PHPENV_DEFAULT_EXTENSIONS opcache
end
# Initialize PATH on shell startup if global version is set (less aggressive)

View File

@@ -2,6 +2,8 @@
# │ fish/config.fish
# ╰──────────────────────────────────────────────────────────╯
set -g fish_greeting
fish_config theme choose "Catppuccin Mocha"
test -e "$HOME/.config/fish/alias.fish" &&
@@ -20,19 +22,17 @@ if status is-interactive
type -q op; and test -e "$HOME/.config/op/plugins.sh" &&
source "$HOME/.config/op/plugins.sh"
# version manager initializers
type -q rbenv; and source (rbenv init -|psub)
type -q pyenv; and source (pyenv init -|psub)
type -q pyenv; and source (pyenv virtualenv-init -|psub)
type -q goenv; and source (goenv init -|psub)
# type -q fnm; and fnm env --use-on-cd --shell fish | source
type -q load_nvm; and load_nvm >/dev/stderr
# mise version manager
type -q mise; and mise activate fish | source
# Initialize other tools if available
type -q zoxide; and zoxide init fish | source
# Start tmux if not already running and not in SSH
#open-tmux # defined in functions/open-tmux.fish
#.t # defined in functions/.t.fish
else
# Non-interactive shells (IDE subprocesses) use shims for tool discovery
type -q mise; and mise activate fish --shims | source
end
# Added by LM Studio CLI (lms)
@@ -47,3 +47,8 @@ fish_add_path $HOME/.opencode/bin
# Added by OrbStack: command-line tools and integration
# This won't be added again if you remove it.
source ~/.orbstack/shell/init2.fish 2>/dev/null || :
# Warn if GITHUB_TOKEN is not set
if status is-interactive; and not set -q GITHUB_TOKEN
echo "Warning: GITHUB_TOKEN is not set" >&2
end

View File

@@ -17,13 +17,11 @@ set -q HOSTNAME; or set -x HOSTNAME (hostname -s)
# Add local bin to path
fish_add_path "$XDG_BIN_HOME"
# Add cargo bin to path
fish_add_path "$XDG_SHARE_HOME/cargo/bin"
# Add mise shims to path
fish_add_path "$XDG_DATA_HOME/mise/shims"
# NPM/NVM configuration
set -q NVM_DIR; or set -x NVM_DIR "$XDG_DATA_HOME/nvm"
fish_add_path "$NVM_DIR/bin"
fish_add_path "$XDG_CONFIG_HOME/nvm"
# Add cargo bin to path
fish_add_path "$XDG_DATA_HOME/cargo/bin"
# Yarn configuration
set -q YARN_GLOBAL_FOLDER; or set -x YARN_GLOBAL_FOLDER "$XDG_DATA_HOME/yarn"
@@ -33,6 +31,9 @@ fish_add_path "$YARN_GLOBAL_FOLDER/bin"
set -q MASON_HOME; or set -x MASON_HOME "$XDG_DATA_HOME/nvim/mason"
fish_add_path "$MASON_HOME/bin"
# Add dotnet tools to path
fish_add_path "$HOME/.dotnet/tools/"
# Set Neovim environment variables
test -z "$NVIM_STATE" && set -x NVIM_STATE "$XDG_STATE_HOME/nvim"
test -z "$NVIM_CONFIG_HOME" && set -x NVIM_CONFIG_HOME "$XDG_CONFIG_HOME/nvim"
@@ -55,11 +56,14 @@ set -q AWS_CONFIG_FILE; or set -x AWS_CONFIG_FILE "$XDG_STATE_HOME/aws/config"
set -q AWS_SHARED_CREDENTIALS_FILE; or set -x AWS_SHARED_CREDENTIALS_FILE "$XDG_STATE_HOME/aws/credentials"
set -q AWS_SESSION_TOKEN; or set -x AWS_SESSION_TOKEN "$XDG_STATE_HOME/aws/session_token"
set -q AWS_DATA_PATH; or set -x AWS_DATA_PATH "$XDG_DATA_HOME/aws"
set -q AWS_DEFAULT_REGION; or set -x AWS_DEFAULT_REGION eu-west-1
set -q AWS_DEFAULT_OUTPUT; or set -x AWS_DEFAULT_OUTPUT table
set -q AWS_CONFIGURE_KEYS; or set -x AWS_CONFIGURE_KEYS true
set -q AWS_CONFIGURE_SESSION; or set -x AWS_CONFIGURE_SESSION true
set -q AWS_CONFIGURE_SESSION_DURATION; or set -x AWS_CONFIGURE_SESSION_DURATION 7200
set -q AWS_CONFIGURE_SESSION_MFA; or set -x AWS_CONFIGURE_SESSION_MFA true
set -q AWS_CONFIGURE_REGION; or set -x AWS_CONFIGURE_REGION true
set -q AWS_CONFIGURE_OUTPUT; or set -x AWS_CONFIGURE_OUTPUT true
set -q AWS_CONFIGURE_PROFILE; or set -x AWS_CONFIGURE_PROFILE true
set -q AWS_CONFIGURE_PROMPT; or set -x AWS_CONFIGURE_PROMPT true
set -q AWS_CONFIGURE_PROMPT_DEFAULT; or set -x AWS_CONFIGURE_PROMPT_DEFAULT true
@@ -84,14 +88,6 @@ x-dc "$DOCKER_CONFIG"
set -q DOCKER_HIDE_LEGACY_COMMANDS; or set -x DOCKER_HIDE_LEGACY_COMMANDS true
set -q DOCKER_SCAN_SUGGEST; or set -x DOCKER_SCAN_SUGGEST false
# FNM / Node.js configuration
set -q FNM_DIR; or set -x FNM_DIR "$XDG_DATA_HOME/fnm"
fish_add_path "$FNM_DIR"
set -q FNM_VERSION_FILE_STRATEGY; or set -x FNM_VERSION_FILE_STRATEGY recursive
set -q FNM_USE_ON_CD; or set -x FNM_USE_ON_CD true
set -q FNM_COREPACK_ENABLED; or set -x FNM_COREPACK_ENABLED true
set -q FNM_RESOLVE_ENGINES; or set -x FNM_RESOLVE_ENGINES true
# fzf configuration
set -q FZF_BASE; or set -x FZF_BASE "$XDG_CONFIG_HOME/fzf"
set -q FZF_DEFAULT_OPTS; or set -x FZF_DEFAULT_OPTS \
@@ -101,19 +97,14 @@ set -q FZF_DEFAULT_OPTS; or set -x FZF_DEFAULT_OPTS \
set -q GNUPGHOME; or set -x GNUPGHOME "$XDG_DATA_HOME/gnupg"
# Go configuration
# set -q GOPATH; or set -x GOPATH "$XDG_DATA_HOME/go"
set -q GOPATH; or set -x GOPATH "$XDG_DATA_HOME/go"
set -q GOBIN; or set -x GOBIN "$XDG_BIN_HOME"
set -q GOENV_ROOT; or set -x GOENV_ROOT "$XDG_DATA_HOME/goenv"
set -q GOENV_RC_FILE; or set -x GOENV_RC_FILE "$XDG_CONFIG_HOME/goenv/goenvrc.fish"
# 1Password configuration
set -q OP_CACHE; or set -x OP_CACHE "$XDG_STATE_HOME/1password"
# Python configuration
set -q WORKON_HOME; or set -x WORKON_HOME "$XDG_DATA_HOME/virtualenvs"
set -q PYENV_ROOT; or set -x PYENV_ROOT "$XDG_DATA_HOME/pyenv"
fish_add_path "$PYENV_ROOT/bin"
# Poetry configuration
set -q POETRY_HOME; or set -x POETRY_HOME "$XDG_DATA_HOME/poetry"
@@ -125,7 +116,6 @@ set -q CARGO_BIN_HOME; or set -x CARGO_BIN_HOME "$XDG_BIN_HOME"
set -q RUSTUP_HOME; or set -x RUSTUP_HOME "$XDG_DATA_HOME/rustup"
set -x RUST_WITHOUT "clippy,docs,rls"
fish_add_path "$CARGO_HOME/bin"
fish_add_path "$XDG_SHARE_HOME/bob/nvim-bin"
# screen configuration
set -q SCREENRC; or set -x SCREENRC "$XDG_CONFIG_HOME/misc/screenrc"
@@ -163,6 +153,15 @@ x-dc "$WAKATIME_HOME"
set -q _ZO_DATA_DIR; or set -x _ZO_DATA_DIR "$XDG_DATA_HOME/zoxide"
set -q _ZO_EXCLUDE_DIRS; or set -x _ZO_EXCLUDE_DIRS "$XDG_DATA_HOME"
# bkt (shell command caching tool) configuration
set -q BKT_TTL; or set -x BKT_TTL 1m
# Manpager
set -q MANPAGER; or set -x MANPAGER "less -X"
# Lando
fish_add_path "$HOME/.lando/bin"
# Miscellaneous configuration
set -q CHEAT_USE_FZF; or set -x CHEAT_USE_FZF true
set -q SQLITE_HISTORY; or set -x SQLITE_HISTORY "$XDG_CACHE_HOME/sqlite/sqlite_history"

View File

@@ -3,3 +3,4 @@ jethrokuan/z
ivuorinen/phpenv.fish
ilancosman/tide@v6
catppuccin/fish
edc/bass

View File

@@ -1,7 +1,7 @@
# Description: Open tmux session if not already open
# Dependencies: tmux
# Usage: open-tmux
function open-tmux --wraps='tmux attach-session -t main || tmux new-session -s main' --description 'open tmux session'
# Usage: .t
function .t --wraps='tmux attach-session -t main || tmux new-session -s main' --description 'open tmux session'
# Check if not in an SSH session and not already in a tmux session
if test -z "$SSH_TTY"; and not set -q TMUX
command tmux attach-session -t main || command tmux new-session -s main

View File

@@ -7,65 +7,67 @@ To be used with a companion fish function like this:
"""
from __future__ import print_function
import json
import os
import signal
import subprocess
import sys
import traceback
BASH = 'bash'
BASH = "bash"
FISH_READONLY = [
'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version',
'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode'
"PWD",
"SHLVL",
"history",
"pipestatus",
"status",
"version",
"FISH_VERSION",
"fish_pid",
"hostname",
"_",
"fish_private_mode",
]
IGNORED = [
'PS1', 'XPC_SERVICE_NAME'
]
IGNORED = ["PS1", "XPC_SERVICE_NAME"]
def ignored(name):
if name == 'PWD': # this is read only, but has special handling
if name == "PWD": # this is read only, but has special handling
return False
# ignore other read only variables
if name in FISH_READONLY:
return True
if name in IGNORED or name.startswith("BASH_FUNC"):
return True
if name.startswith('%'):
return True
return False
return name.startswith("%")
def escape(string):
# use json.dumps to reliably escape quotes and backslashes
return json.dumps(string).replace(r'$', r'\$')
return json.dumps(string).replace(r"$", r"\$")
def escape_identifier(word):
return escape(word.replace('?', '\\?'))
return escape(word.replace("?", "\\?"))
def comment(string):
return '\n'.join(['# ' + line for line in string.split('\n')])
return "\n".join(["# " + line for line in string.split("\n")])
def gen_script():
# Use the following instead of /usr/bin/env to read environment so we can
# deal with multi-line environment variables (and other odd cases).
env_reader = "%s -c 'import os,json; print(json.dumps({k:v for k,v in os.environ.items()}))'" % (sys.executable)
args = [BASH, '-c', env_reader]
env_reader = f"{sys.executable} -c 'import os,json; print(json.dumps({{k:v for k,v in os.environ.items()}}))'"
args = [BASH, "-c", env_reader]
output = subprocess.check_output(args, universal_newlines=True)
old_env = output.strip()
pipe_r, pipe_w = os.pipe()
if sys.version_info >= (3, 4):
os.set_inheritable(pipe_w, True)
command = 'eval $1 && ({}; alias) >&{}'.format(
env_reader,
pipe_w
)
args = [BASH, '-c', command, 'bass', ' '.join(sys.argv[1:])]
os.set_inheritable(pipe_w, True)
command = f"eval $1 && ({env_reader}; alias) >&{pipe_w}"
args = [BASH, "-c", command, "bass", " ".join(sys.argv[1:])]
p = subprocess.Popen(args, universal_newlines=True, close_fds=False)
os.close(pipe_w)
with os.fdopen(pipe_r) as f:
@@ -73,9 +75,7 @@ def gen_script():
alias_str = f.read()
if p.wait() != 0:
raise subprocess.CalledProcessError(
returncode=p.returncode,
cmd=' '.join(sys.argv[1:]),
output=new_env + alias_str
returncode=p.returncode, cmd=" ".join(sys.argv[1:]), output=new_env + alias_str
)
new_env = new_env.strip()
@@ -89,41 +89,41 @@ def gen_script():
continue
v1 = old_env.get(k)
if not v1:
script_lines.append(comment('adding %s=%s' % (k, v)))
script_lines.append(comment(f"adding {k}={v}"))
elif v1 != v:
script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v)))
script_lines.append(comment(f"updating {k}={v1} -> {v}"))
# process special variables
if k == 'PWD':
script_lines.append('cd %s' % escape(v))
if k == "PWD":
script_lines.append(f"cd {escape(v)}")
continue
else:
continue
if k == 'PATH':
value = ' '.join([escape(directory)
for directory in v.split(':')])
if k == "PATH": # noqa: SIM108
value = " ".join([escape(directory) for directory in v.split(":")])
else:
value = escape(v)
script_lines.append('set -g -x %s %s' % (k, value))
script_lines.append(f"set -g -x {k} {value}")
for var in set(old_env.keys()) - set(new_env.keys()):
script_lines.append(comment('removing %s' % var))
script_lines.append('set -e %s' % var)
script_lines.append(comment(f"removing {var}"))
script_lines.append(f"set -e {var}")
script = '\n'.join(script_lines)
script = "\n".join(script_lines)
alias_lines = []
for line in alias_str.splitlines():
_, rest = line.split(None, 1)
k, v = rest.split("=", 1)
alias_lines.append("alias " + escape_identifier(k) + "=" + v)
alias = '\n'.join(alias_lines)
alias = "\n".join(alias_lines)
return script + '\n' + alias
return script + "\n" + alias
script_file = os.fdopen(3, 'w')
script_file = os.fdopen(3, "w")
if not sys.argv[1:]:
print('__bass_usage', file=script_file, end='')
print("__bass_usage", file=script_file, end="")
sys.exit(0)
try:
@@ -131,8 +131,8 @@ try:
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
except Exception:
print('Bass internal error!', file=sys.stderr)
raise # traceback will output to stderr
print("Bass internal error!", file=sys.stderr)
raise # traceback will output to stderr
except KeyboardInterrupt:
signal.signal(signal.SIGINT, signal.SIG_DFL)
os.kill(os.getpid(), signal.SIGINT)

View File

@@ -8,8 +8,8 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
echo "fisher, version $fisher_version"
case "" -h --help
echo "Usage: fisher install <plugins...> Install plugins"
echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher uninstall <plugins...> Remove installed plugins (alias)"
echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher uninstall <plugins...> Remove installed plugins (alias)"
echo " fisher update <plugins...> Update installed plugins"
echo " fisher update Update all installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex"
@@ -41,7 +41,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end
set arg_plugins $file_plugins
else if test "$cmd" = install && ! set --query old_plugins[1]
else if test "$cmd" = install && ! set --query old_plugins[1]
set --append arg_plugins $file_plugins
end

View File

@@ -1,16 +0,0 @@
function load_nvm --on-variable="PWD"
set -l default_node_version (nvm version default)
set -l node_version (nvm version)
set -l nvmrc_path (nvm_find_nvmrc)
if test -n "$nvmrc_path"
set -l nvmrc_node_version (nvm version (cat $nvmrc_path))
if test "$nvmrc_node_version" = N/A
nvm install (cat $nvmrc_path)
else if test "$nvmrc_node_version" != "$node_version"
nvm use $nvmrc_node_version
end
else if test "$node_version" != "$default_node_version"
echo "Reverting to default Node version"
nvm use default
end
end

View File

@@ -1,3 +0,0 @@
function nvm
bass source $NVM_DIR/nvm.sh --no-use ';' nvm $argv
end

View File

@@ -1,3 +0,0 @@
function nvm_find_nvmrc
bass source $NVM_DIR/nvm.sh --no-use ';' nvm_find_nvmrc
end

View File

@@ -1,175 +0,0 @@
function ___paths_plugin_wrap_color
set_color normal
set_color "$argv[1]"
echo -n (set_color "$argv[1]")"$argv[2..]"
set_color normal
end
# duplicated in conf.d
function ___paths_plugin_set_colors
if not set -q ___paths_plugin_colors
set -Ux ___paths_plugin_colors 27e6ff 29e0ff 5cd8ff 77d0ff 8ac8ff 9cbfff afb5ff c5a7ff d99bfe ea8feb f684d5 fe7abd ff73a3 ff708a fa7070 ff708a ff73a3 fe7abd f684d5 ea8feb d99bfe c5a7ff afb5ff 9cbfff 8ac8ff 77d0ff 5cd8ff 29e0ff
end
return 0
end
function ___paths_plugin_cycle_color
if not set -q ___paths_plugin_current_color
set -Ux ___paths_plugin_current_color 1
else if test $___paths_plugin_current_color -gt (count $___paths_plugin_colors)
set -Ux ___paths_plugin_current_color 1
end
echo $___paths_plugin_colors[$___paths_plugin_current_color]
set -Ux ___paths_plugin_current_color (math $___paths_plugin_current_color + 1)
end
function ___paths_plugin_handle_found_item -a testName outFlags
set -f flags (string split -n ' ' -- "$outFlags")
set -f options (fish_opt -s c -l clean)
set -a options (fish_opt -s s -l single)
set -a options (fish_opt -s k -l no-color)
set -a options (fish_opt -s n -l inline)
argparse $options -- $flags
set -f arrow "=>"
# check if file exists
if test -e "$testName"
set -f nameOut (string trim -- "$testName")
if not set -q _flag_c # is not clean
if test -L "$testName" # is symlink
set -f __linkname (readlink -f "$testName")
set __linkname (string trim -- "$__linkname")
set testName (string trim -- "$testName")
if not set -q _flag_k # is color
set nameOut (___paths_plugin_wrap_color (___paths_plugin_cycle_color) $testName) (___paths_plugin_wrap_color "yellow" "$arrow") (___paths_plugin_wrap_color (___paths_plugin_cycle_color) $__linkname)
else # is color
set nameOut (echo -n "$testName" "$arrow" "$__linkname")
end
else # is not symlink
if not set -q _flag_k # is color
set testName (string trim -- "$testName")
set nameOut (___paths_plugin_wrap_color (___paths_plugin_cycle_color) "$testName")
else
set testName (string trim -- "$testName")
set nameOut "$testName"
end
end
set nameOut (string trim -- "$nameOut")
# do the tick
if set -q _flag_k # is not color
set nameOut "- $nameOut"
else # is color
set nameOut (___paths_plugin_wrap_color "yellow" "-") "$nameOut"
end
end
set nameOut (string trim -- "$nameOut")
echo -n $nameOut
end
end
function paths --description "Reveal the executable matches in shell paths or fish autoload."
set -f options (fish_opt -s c -l clean)
set -a options (fish_opt -s s -l single)
set -a options (fish_opt -s k -l no-color)
set -a options (fish_opt -s q -l quiet)
set -a options (fish_opt -s n -l inline)
argparse $options -- $argv
if test (count $argv) -lt 1
echo "paths - executable matches in shell paths or fish autoload."
and echo "usage: paths [-c|-s|-k] <name>"
and echo -e "\t-c or --no-color: output without color"
and echo -e "\t-s or --single: output without color or headers, the first result"
and echo -e "\t-k or --clean: output without tick marks or headers"
# and echo -e "\t-n or --inline: output without endline"
and return 1
end
set -f foundStatus 1
set -f input (string trim -- $argv)
# deprecated
if set -q _flag_q
set _flag_c True
end
if set -q _flag_s
set _flag_k True
set _flag_c True
end
set -f outFlags ''
set -q _flag_n; and set -a outFlags -n
set -q _flag_c; and set -a outFlags -c
set -q _flag_k; and set -a outFlags -k
set -q _flag_s; and set -a outFlags -s
set outFlags (string split -n " " -- "$outFlags")
___paths_plugin_set_colors
# loop over list of path lists
for pVar in VIRTUAL_ENV fisher_path fish_function_path fish_user_paths PATH
set -e acc
set -f acc ''
set -e hit
# see if variable is empty
if test -z "$pVar"
continue
end
set -f acc (begin
for t in $$pVar
for snit in "$t/$input.fish" "$t/$input"
set -f found (___paths_plugin_handle_found_item "$snit" "$outFlags")
set found (string trim -- "$found")
if test -n "$found"
set -f hit True
echo "$found"
if set -q _flag_s
break
end
end
end
if set -q _flag_s
if set -q hit
break
end
end
end
end)
# prepend source
if not set -q _flag_c
if set -q hit
set pVar (string trim -- "$pVar")
echo -e -n "$pVar\n"
end
end
if test -n "$acc"
set foundStatus 0
for fk in $acc
echo $fk
if set -q _flag_s
# stop after one
return $foundStatus
end
end
end
end
# check
set -l built (type --type $input 12&>/dev/null)
if test -n "$built"
and test "$built" = builtin
set $foundStatus 0
if not set -q _flag_c
echo -e -n "builtin\n"
if set -q _flag_k
echo - "$input"
else # is color
echo (___paths_plugin_wrap_color "yellow" "-") (___paths_plugin_wrap_color (___paths_plugin_cycle_color) "$input")
end
else
echo "$input"
end
end
return $foundStatus
end

View File

@@ -103,7 +103,7 @@ end
function __phpenv_find_version_file -a phpenv_filename
set -l phpenv_dir (pwd)
while test "$phpenv_dir" != "/"
while test "$phpenv_dir" != /
if test -f "$phpenv_dir/$phpenv_filename"
echo "$phpenv_dir/$phpenv_filename"
return
@@ -130,13 +130,13 @@ function __phpenv_parse_composer_version
end
set -l phpenv_platform_php (jq -r '.config.platform.php // empty' composer.json 2>/dev/null)
if test $status -eq 0 -a -n "$phpenv_platform_php" -a "$phpenv_platform_php" != "null"
if test $status -eq 0 -a -n "$phpenv_platform_php" -a "$phpenv_platform_php" != null
echo $phpenv_platform_php
return
end
set -l phpenv_require_php (jq -r '.require.php // empty' composer.json 2>/dev/null)
if test $status -eq 0 -a -n "$phpenv_require_php" -a "$phpenv_require_php" != "null"
if test $status -eq 0 -a -n "$phpenv_require_php" -a "$phpenv_require_php" != null
__phpenv_parse_semver_constraint $phpenv_require_php
return
end
@@ -196,7 +196,7 @@ set -g __phpenv_version_cache_time 0
function __phpenv_get_version_info
set -l current_time (date +%s)
set -l cache_duration 300 # 5 minutes
set -l cache_duration 300 # 5 minutes
# Return cached version if still valid
if test -n "$__phpenv_version_cache"
@@ -236,12 +236,12 @@ end
# Check if Ondřej PPA is configured on the system
function __phpenv_has_ondrej_ppa
if test -d /etc/apt/sources.list.d
if grep -rq "ondrej/php" /etc/apt/sources.list.d/ 2>/dev/null
if grep -rq ondrej/php /etc/apt/sources.list.d/ 2>/dev/null
return 0
end
end
if test -f /etc/apt/sources.list
if grep -q "ondrej/php" /etc/apt/sources.list 2>/dev/null
if grep -q ondrej/php /etc/apt/sources.list 2>/dev/null
return 0
end
end
@@ -262,34 +262,34 @@ function __phpenv_get_provider
end
# macOS always uses Homebrew
if test (uname -s) = "Darwin"
echo "homebrew"
if test (uname -s) = Darwin
echo homebrew
return 0
end
# Linux: check for apt with Ondřej PPA first
if test (uname -s) = "Linux"
if test (uname -s) = Linux
if command -q apt-get; and __phpenv_has_ondrej_ppa
echo "apt"
echo apt
return 0
end
# Fall back to Homebrew (Linuxbrew) if available
if command -q brew
echo "homebrew"
echo homebrew
return 0
end
# If apt is available but no PPA yet, still use apt provider
# (it will prompt to add the PPA when needed)
if command -q apt-get
echo "apt"
echo apt
return 0
end
end
# Default fallback
echo "homebrew"
echo homebrew
return 0
end
@@ -319,7 +319,7 @@ function __phpenv_provider_homebrew_ensure_source
end
# Check and add required taps only if missing
set -l required_taps "shivammathur/php" "shivammathur/extensions"
set -l required_taps shivammathur/php shivammathur/extensions
for tap in $required_taps
if not brew tap | grep -qx $tap 2>/dev/null
if not brew tap $tap 2>/dev/null
@@ -343,7 +343,7 @@ function __phpenv_provider_homebrew_list_installed
continue
end
if test "$phpenv_basename" = "php"
if test "$phpenv_basename" = php
set -l phpenv_latest (__phpenv_parse_version_field "latest" "8.4")
set -a phpenv_versions $phpenv_latest
else if echo $phpenv_basename | grep -qE '^php@[0-9]+\.[0-9]+$'
@@ -375,7 +375,7 @@ function __phpenv_provider_homebrew_list_available
continue
end
if test "$phpenv_clean_name" = "php"
if test "$phpenv_clean_name" = php
set -a phpenv_versions "$phpenv_latest_version (latest)"
else if echo $phpenv_clean_name | grep -qE '^php@[0-9]+\.[0-9]+$'
set -l phpenv_version (echo $phpenv_clean_name | sed 's/php@//')
@@ -502,7 +502,7 @@ function __phpenv_provider_homebrew_ext_list -a phpenv_version
for phpenv_ext_dir in $phpenv_cellar_path/*@$phpenv_version
if test -d $phpenv_ext_dir
set -l phpenv_ext_name (basename $phpenv_ext_dir | sed "s/@$phpenv_version//")
if test "$phpenv_ext_name" != "php"
if test "$phpenv_ext_name" != php
echo $phpenv_ext_name
end
end
@@ -574,7 +574,7 @@ function __phpenv_provider_apt_ensure_source
echo ""
read -P "Add ppa:ondrej/php? [y/N] " -l confirm
if test "$confirm" = "y" -o "$confirm" = "Y"
if test "$confirm" = y -o "$confirm" = Y
echo "Adding ppa:ondrej/php..."
if command -q add-apt-repository
if sudo add-apt-repository -y ppa:ondrej/php
@@ -603,8 +603,7 @@ function __phpenv_provider_apt_list_installed
return 1
end
dpkg -l 'php[0-9]*-cli' 2>/dev/null | grep '^ii' | \
sed -E 's/^ii\s+php([0-9]+\.[0-9]+)-cli.*/\1/' | sort -V | uniq
dpkg -l 'php[0-9]*-cli' 2>/dev/null | grep '^ii' | sed -E 's/^ii\s+php([0-9]+\.[0-9]+)-cli.*/\1/' | sort -V | uniq
end
function __phpenv_provider_apt_list_available
@@ -613,8 +612,7 @@ function __phpenv_provider_apt_list_available
return
end
apt-cache search '^php[0-9]+\.[0-9]+-cli$' 2>/dev/null | \
sed -E 's/^php([0-9]+\.[0-9]+)-cli.*/\1/' | sort -V | uniq
apt-cache search '^php[0-9]+\.[0-9]+-cli$' 2>/dev/null | sed -E 's/^php([0-9]+\.[0-9]+)-cli.*/\1/' | sort -V | uniq
end
function __phpenv_provider_apt_get_php_path -a phpenv_version
@@ -644,7 +642,7 @@ function __phpenv_provider_apt_get_php_path -a phpenv_version
set -l temp_link "$target.$fish_pid"
ln -s "$source" "$temp_link" 2>/dev/null
and mv -f "$temp_link" "$target" 2>/dev/null
else if test "$binary" = "phar"; and test -x "/usr/bin/phar$phpenv_version"
else if test "$binary" = phar; and test -x "/usr/bin/phar$phpenv_version"
set -l temp_link "$target.$fish_pid"
ln -s "/usr/bin/phar$phpenv_version" "$temp_link" 2>/dev/null
and mv -f "$temp_link" "$target" 2>/dev/null
@@ -819,8 +817,7 @@ function __phpenv_provider_apt_ext_list -a phpenv_version
# Filter out core packages (cli, common, etc.)
set -l core_packages cli common opcache fpm cgi phpdbg
dpkg -l "php$phpenv_version-*" 2>/dev/null | grep '^ii' | awk '{print $2}' | \
sed "s/php$phpenv_version-//" | while read ext
dpkg -l "php$phpenv_version-*" 2>/dev/null | grep '^ii' | awk '{print $2}' | sed "s/php$phpenv_version-//" | while read ext
# Skip core packages
set -l is_core 0
for core in $core_packages
@@ -837,9 +834,7 @@ end
function __phpenv_provider_apt_ext_available -a phpenv_version
# List available extensions from apt cache
apt-cache search "^php$phpenv_version-" 2>/dev/null | \
sed "s/php$phpenv_version-//" | awk '{print $1}' | \
grep -v -E '^(cli|common|fpm|cgi|phpdbg|dev)$' | sort | uniq
apt-cache search "^php$phpenv_version-" 2>/dev/null | sed "s/php$phpenv_version-//" | awk '{print $1}' | grep -v -E '^(cli|common|fpm|cgi|phpdbg|dev)$' | sort | uniq
end
function __phpenv_provider_apt_get_path_pattern
@@ -979,9 +974,9 @@ end
function __phpenv_resolve_version_alias -a phpenv_version
switch $phpenv_version
case latest
__phpenv_parse_version_field "latest" "8.4"
__phpenv_parse_version_field latest "8.4"
case nightly
__phpenv_parse_version_field "nightly" "8.5"
__phpenv_parse_version_field nightly "8.5"
case '8.x'
__phpenv_parse_version_field "8.x" "8.4"
case '7.x'
@@ -997,7 +992,7 @@ function __phpenv_get_formula_name -a phpenv_version
set -l phpenv_latest_version (__phpenv_parse_version_field "latest" "8.4")
if test "$phpenv_version" = "$phpenv_latest_version"
echo "shivammathur/php/php"
echo shivammathur/php/php
else
echo "shivammathur/php/php@$phpenv_version"
end
@@ -1140,7 +1135,7 @@ function __phpenv_use
set -l phpenv_version $argv[1]
# Handle special case: restore system PHP
if test "$phpenv_version" = "system"
if test "$phpenv_version" = system
__phpenv_restore_system_path
echo "Restored system PHP"
return 0
@@ -1157,7 +1152,7 @@ function __phpenv_use
end
if not __phpenv_is_version_installed $phpenv_version
if test "$(__phpenv_config_get auto-install)" = "true"
if test "$(__phpenv_config_get auto-install)" = true
__phpenv_install $phpenv_version
else
echo "PHP $phpenv_version is not installed. Install with: phpenv install $phpenv_version"
@@ -1179,7 +1174,7 @@ function __phpenv_local -a phpenv_version
return 1
end
echo $phpenv_version > .php-version
echo $phpenv_version >.php-version
echo "Set local PHP version to $phpenv_version"
end
@@ -1272,7 +1267,7 @@ function __phpenv_get_tap_versions
continue
end
if test "$phpenv_clean_name" = "php"
if test "$phpenv_clean_name" = php
set -a phpenv_versions "$phpenv_latest_version (latest)"
else if echo $phpenv_clean_name | grep -qE '^php@[0-9]+\.[0-9]+$'
set -l phpenv_version (echo $phpenv_clean_name | sed 's/php@//')
@@ -1310,7 +1305,7 @@ function __phpenv_doctor
# Show provider information
set -l provider (__phpenv_get_provider)
set -l provider_source "auto-detected"
set -l provider_source auto-detected
if set -q PHPENV_PROVIDER; and test -n "$PHPENV_PROVIDER"
set provider_source "PHPENV_PROVIDER override"
end
@@ -1429,7 +1424,7 @@ function __phpenv_config_get -a phpenv_key
end
end
if test "$argv[2]" = "--verbose"
if test "$argv[2]" = --verbose
if test -n "$phpenv_value"
echo "$phpenv_key = $phpenv_value (from $phpenv_source)"
else
@@ -1581,19 +1576,18 @@ function __phpenv_get_tap_formulas -a tap_name
return 1
end
brew tap-info $tap_name --json 2>/dev/null | \
jq -r '.[]|(.formula_names[]?)' 2>/dev/null
brew tap-info $tap_name --json 2>/dev/null | jq -r '.[]|(.formula_names[]?)' 2>/dev/null
end
function __phpenv_get_available_extensions
__phpenv_get_tap_formulas "shivammathur/extensions"
__phpenv_get_tap_formulas shivammathur/extensions
end
function __phpenv_extension_available -a phpenv_extension phpenv_version
set -l phpenv_available_extensions (__phpenv_get_available_extensions)
if test -z "$phpenv_available_extensions"
return 0 # Assume available if can't check
return 0 # Assume available if can't check
end
for phpenv_ext_formula in $phpenv_available_extensions
@@ -1695,7 +1689,7 @@ function __phpenv_auto_switch --on-variable PWD
end
set -l phpenv_auto_switch (__phpenv_config_get auto-switch)
if test "$phpenv_auto_switch" = "false"
if test "$phpenv_auto_switch" = false
return 0
end
@@ -1718,7 +1712,7 @@ function __phpenv_auto_switch --on-variable PWD
set -g PHPENV_LAST_SWITCH_TIME $phpenv_current_time
else
set -l phpenv_auto_install (__phpenv_config_get auto-install)
if test "$phpenv_auto_install" = "true"
if test "$phpenv_auto_install" = true
echo "Auto-installing PHP $phpenv_new_version..."
if phpenv install "$phpenv_new_version"
set -g PHPENV_LAST_SWITCH_TIME $phpenv_current_time
@@ -1771,7 +1765,7 @@ function __phpenv_help
end
function __phpenv_validate_boolean -a phpenv_value
test "$phpenv_value" = "true" -o "$phpenv_value" = "false"
test "$phpenv_value" = true -o "$phpenv_value" = false
end
function __phpenv_validate_version -a phpenv_version

View File

@@ -59,3 +59,31 @@ fish_pager_color_prefix f4b8e4
fish_pager_color_completion c6d0f5
fish_pager_color_description 737994
[unknown]
# preferred_background: 303446
fish_color_normal c6d0f5
fish_color_command 8caaee
fish_color_param eebebe
fish_color_keyword ca9ee6
fish_color_quote a6d189
fish_color_redirection f4b8e4
fish_color_end ef9f76
fish_color_comment 838ba7
fish_color_error e78284
fish_color_gray 737994
fish_color_selection --background=414559
fish_color_search_match --background=414559
fish_color_option a6d189
fish_color_operator f4b8e4
fish_color_escape ea999c
fish_color_autosuggestion 737994
fish_color_cancel e78284
fish_color_cwd e5c890
fish_color_user 81c8be
fish_color_host 8caaee
fish_color_host_remote a6d189
fish_color_status e78284
fish_pager_color_progress 737994
fish_pager_color_prefix f4b8e4
fish_pager_color_completion c6d0f5
fish_pager_color_description 737994

View File

@@ -59,3 +59,31 @@ fish_pager_color_prefix f5bde6
fish_pager_color_completion cad3f5
fish_pager_color_description 6e738d
[unknown]
# preferred_background: 24273a
fish_color_normal cad3f5
fish_color_command 8aadf4
fish_color_param f0c6c6
fish_color_keyword c6a0f6
fish_color_quote a6da95
fish_color_redirection f5bde6
fish_color_end f5a97f
fish_color_comment 8087a2
fish_color_error ed8796
fish_color_gray 6e738d
fish_color_selection --background=363a4f
fish_color_search_match --background=363a4f
fish_color_option a6da95
fish_color_operator f5bde6
fish_color_escape ee99a0
fish_color_autosuggestion 6e738d
fish_color_cancel ed8796
fish_color_cwd eed49f
fish_color_user 8bd5ca
fish_color_host 8aadf4
fish_color_host_remote a6da95
fish_color_status ed8796
fish_pager_color_progress 6e738d
fish_pager_color_prefix f5bde6
fish_pager_color_completion cad3f5
fish_pager_color_description 6e738d

View File

@@ -59,3 +59,31 @@ fish_pager_color_prefix f5c2e7
fish_pager_color_completion cdd6f4
fish_pager_color_description 6c7086
[unknown]
# preferred_background: 1e1e2e
fish_color_normal cdd6f4
fish_color_command 89b4fa
fish_color_param f2cdcd
fish_color_keyword cba6f7
fish_color_quote a6e3a1
fish_color_redirection f5c2e7
fish_color_end fab387
fish_color_comment 7f849c
fish_color_error f38ba8
fish_color_gray 6c7086
fish_color_selection --background=313244
fish_color_search_match --background=313244
fish_color_option a6e3a1
fish_color_operator f5c2e7
fish_color_escape eba0ac
fish_color_autosuggestion 6c7086
fish_color_cancel f38ba8
fish_color_cwd f9e2af
fish_color_user 94e2d5
fish_color_host 89b4fa
fish_color_host_remote a6e3a1
fish_color_status f38ba8
fish_pager_color_progress 6c7086
fish_pager_color_prefix f5c2e7
fish_pager_color_completion cdd6f4
fish_pager_color_description 6c7086

View File

@@ -13,32 +13,37 @@
if [[ $- =~ i ]]; then
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
if ! declare -f _fzf_compgen_path >/dev/null; then
_fzf_compgen_path() {
if ! declare -f _fzf_compgen_path > /dev/null; then
_fzf_compgen_path()
{
echo "$1"
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
-a -not -path "$1" -print 2>/dev/null | sed 's@^\./@@'
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
if ! declare -f _fzf_compgen_dir >/dev/null; then
_fzf_compgen_dir() {
if ! declare -f _fzf_compgen_dir > /dev/null; then
_fzf_compgen_dir()
{
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
-a -not -path "$1" -print 2>/dev/null | sed 's@^\./@@'
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
###########################################################
# To redraw line after fzf closes (printf '\e[5n')
bind '"\e[0n": redraw-current-line' 2>/dev/null
bind '"\e[0n": redraw-current-line' 2> /dev/null
__fzf_comprun() {
__fzf_comprun()
{
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
_fzf_comprun "$@"
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then
elif [[ -n "${TMUX_PANE-}" ]] && {
[[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]
}; then
shift
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
else
@@ -47,7 +52,8 @@ if [[ $- =~ i ]]; then
fi
}
__fzf_orig_completion() {
__fzf_orig_completion()
{
local l comp f cmd
while read -r l; do
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
@@ -63,7 +69,8 @@ if [[ $- =~ i ]]; then
done
}
_fzf_opts_completion() {
_fzf_opts_completion()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
@@ -112,18 +119,18 @@ if [[ $- =~ i ]]; then
--sync"
case "${prev}" in
--tiebreak)
COMPREPLY=($(compgen -W "length begin end index" -- "$cur"))
return 0
;;
--color)
COMPREPLY=($(compgen -W "dark light 16 bw" -- "$cur"))
return 0
;;
--history)
COMPREPLY=()
return 0
;;
--tiebreak)
COMPREPLY=($(compgen -W "length begin end index" -- "$cur"))
return 0
;;
--color)
COMPREPLY=($(compgen -W "dark light 16 bw" -- "$cur"))
return 0
;;
--history)
COMPREPLY=()
return 0
;;
esac
if [[ "$cur" =~ ^-|\+ ]]; then
@@ -134,7 +141,8 @@ if [[ $- =~ i ]]; then
return 0
}
_fzf_handle_dynamic_completion() {
_fzf_handle_dynamic_completion()
{
local cmd orig_var orig ret orig_cmd orig_complete
cmd="$1"
shift
@@ -142,15 +150,15 @@ if [[ $- =~ i ]]; then
orig_var="_fzf_orig_completion_$cmd"
orig="${!orig_var-}"
orig="${orig##*#}"
if [[ -n "$orig" ]] && type "$orig" >/dev/null 2>&1; then
if [[ -n "$orig" ]] && type "$orig" > /dev/null 2>&1; then
$orig "$@"
elif [[ -n "${_fzf_completion_loader-}" ]]; then
orig_complete=$(complete -p "$orig_cmd" 2>/dev/null)
orig_complete=$(complete -p "$orig_cmd" 2> /dev/null)
_completion_loader "$@"
ret=$?
# _completion_loader may not have updated completion for the command
if [[ "$(complete -p "$orig_cmd" 2>/dev/null)" != "$orig_complete" ]]; then
__fzf_orig_completion < <(complete -p "$orig_cmd" 2>/dev/null)
if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then
__fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then
eval "${orig_complete/ -F / -o nospace -F }"
else
@@ -161,7 +169,8 @@ if [[ $- =~ i ]]; then
fi
}
__fzf_generic_path_completion() {
__fzf_generic_path_completion()
{
local cur base dir leftover matches trigger cmd
cmd="${COMP_WORDS[0]}"
if [[ $cmd == \\* ]]; then
@@ -207,7 +216,8 @@ if [[ $- =~ i ]]; then
fi
}
_fzf_complete() {
_fzf_complete()
{
# Split arguments around --
local args rest str_arg i sep
args=("$@")
@@ -231,7 +241,7 @@ if [[ $- =~ i ]]; then
local cur selected trigger cmd post
post="$(caller 0 | awk '{print $2}')_post"
type -t "$post" >/dev/null 2>&1 || post=cat
type -t "$post" > /dev/null 2>&1 || post=cat
cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}"
trigger=${FZF_COMPLETION_TRIGGER-'**'}
@@ -253,50 +263,59 @@ if [[ $- =~ i ]]; then
fi
}
_fzf_path_completion() {
_fzf_path_completion()
{
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
}
# Deprecated. No file only completion.
_fzf_file_completion() {
_fzf_file_completion()
{
_fzf_path_completion "$@"
}
_fzf_dir_completion() {
_fzf_dir_completion()
{
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
}
_fzf_complete_kill() {
_fzf_complete_kill()
{
_fzf_proc_completion "$@"
}
_fzf_proc_completion() {
_fzf_proc_completion()
{
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
command ps -eo user,pid,ppid,start,time,command 2>/dev/null ||
command ps -eo user,pid,ppid,time,args # For BusyBox
command ps -eo user,pid,ppid,start,time,command 2> /dev/null \
|| command ps -eo user,pid,ppid,time,args # For BusyBox
)
}
_fzf_proc_completion_post() {
_fzf_proc_completion_post()
{
awk '{print $2}'
}
_fzf_host_completion() {
_fzf_host_completion()
{
_fzf_complete +m -- "$@" < <(
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2>/dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
awk '{if (length($2) > 0) {print $2}}' | sort -u
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') \
| awk '{if (length($2) > 0) {print $2}}' | sort -u
)
}
_fzf_var_completion() {
_fzf_var_completion()
{
_fzf_complete -m -- "$@" < <(
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
)
}
_fzf_alias_completion() {
_fzf_alias_completion()
{
_fzf_complete -m -- "$@" < <(
alias | sed -En 's|^alias ([^=]+).*|\1|p'
)
@@ -321,13 +340,14 @@ if [[ $- =~ i ]]; then
svn tar unzip zip"
# Preserve existing completion
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2>/dev/null)
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2> /dev/null)
if type _completion_loader >/dev/null 2>&1; then
if type _completion_loader > /dev/null 2>&1; then
_fzf_completion_loader=1
fi
__fzf_defc() {
__fzf_defc()
{
local cmd func opts orig_var orig def
cmd="$1"
func="$2"
@@ -354,22 +374,23 @@ if [[ $- =~ i ]]; then
unset cmd d_cmds a_cmds
_fzf_setup_completion() {
_fzf_setup_completion()
{
local kind fn cmd
kind=$1
fn=_fzf_${1}_completion
if [[ $# -lt 2 ]] || ! type -t "$fn" >/dev/null; then
if [[ $# -lt 2 ]] || ! type -t "$fn" > /dev/null; then
echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."
return 1
fi
shift
__fzf_orig_completion < <(complete -p "$@" 2>/dev/null)
__fzf_orig_completion < <(complete -p "$@" 2> /dev/null)
for cmd in "$@"; do
case "$kind" in
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
esac
done
}

View File

@@ -4,7 +4,7 @@
# Auto-completion
# ---------------
# shellcheck source=completion.bash
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.bash" 2>/dev/null
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.bash" 2> /dev/null
# Key bindings
# ------------

View File

@@ -13,7 +13,8 @@
# Key bindings
# ------------
__fzf_select__() {
__fzf_select__()
{
local cmd opts
cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type f -print \
@@ -21,27 +22,32 @@ __fzf_select__() {
-o -type l -print 2> /dev/null | cut -b3-"}"
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-} -m"
# shellcheck disable=SC2091 # Intentionally execute output of __fzfcmd
eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
while read -r item; do
eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" \
| while read -r item; do
printf '%q ' "$item" # escape special chars
done
}
if [[ $- =~ i ]]; then
__fzfcmd() {
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } &&
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
__fzfcmd()
{
[[ -n "${TMUX_PANE-}" ]] && {
[[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]
} \
&& echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
}
fzf-file-widget() {
fzf-file-widget()
{
local selected
selected="$(__fzf_select__ "$@")"
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
READLINE_POINT=$((READLINE_POINT + ${#selected}))
}
__fzf_cd__() {
__fzf_cd__()
{
local cmd opts dir
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type d -print 2> /dev/null | cut -b3-"}"
@@ -53,16 +59,17 @@ if [[ $- =~ i ]]; then
) && printf 'builtin cd -- %q' "$dir"
}
__fzf_history__() {
__fzf_history__()
{
local output opts script
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
# shellcheck disable=SC2091 # Intentionally execute output of __fzfcmd
output=$(
set +o pipefail
builtin fc -lnr -2147483648 |
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
builtin fc -lnr -2147483648 \
| last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" \
| FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
) || return
READLINE_LINE=${output#*$'\t'}
if [[ -z "$READLINE_POINT" ]]; then

View File

@@ -52,4 +52,4 @@ keybindings:
prs: []
repoPaths: {}
pager:
diff: ''
diff: ""

View File

@@ -1,3 +1,3 @@
---
git_protocol: https
version: '1'
version: "1"

View File

@@ -1,6 +1,5 @@
---
github.com:
git_protocol: https
users:
ivuorinen:
user: ivuorinen
git_protocol: ssh
users:
ivuorinen:
user: ivuorinen

View File

@@ -7,6 +7,7 @@
*-secret
__secret
__ignored
__ignored/*
__test_*.php
__test_*.txt
__test.php

View File

@@ -1,2 +1,3 @@
!.gitkeep
config
ignore

View File

@@ -19,8 +19,8 @@
logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit
nah = !git reset --hard && git clean -df
recent = "!r() { count=$1; git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' --color=always --count=${count:=10} | column -ts'|';}; r"
reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d
reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d
reset-origin = !git fetch origin && git reset --hard origin/HEAD && git clean -f -d
reset-upstream = !git fetch upstream && git reset --hard upstream/HEAD && git clean -f -d
rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)'
tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\"
undo = reset --soft HEAD^

View File

@@ -1,17 +1,13 @@
tap "1password/tap"
tap "anchore/grype"
tap "cormacrelf/tap"
tap "ddosify/tap"
tap "dm3ch/tap"
tap "doron-cohen/tap"
tap "gesquive/tap"
tap "github/gh"
tap "golangci/tap"
tap "homebrew/autoupdate"
tap "homebrew/bundle"
tap "homebrew/services"
tap "jesseduffield/lazygit"
tap "k8sgpt-ai/k8sgpt"
tap "keith/formulae"
tap "koekeishiya/formulae"
tap "mongodb/brew"
@@ -20,14 +16,9 @@ tap "pantheon-systems/external"
tap "reviewdog/tap"
tap "shivammathur/extensions"
tap "shivammathur/php"
tap "snyk/tap"
tap "tabbyml/tabby"
tap "teamookla/speedtest"
tap "xwmx/taps"
# Run your GitHub Actions locally
brew "act"
# Simple, modern, secure file encryption
brew "age"
# Mozilla CA certificate store
brew "ca-certificates"
# Mozilla CA bundle for Python
@@ -40,10 +31,6 @@ brew "cryptography"
brew "libyaml"
# Display directories as trees (with optional color/HTML output)
brew "tree"
# Automate deployment, configuration, and upgrading
brew "ansible"
# Checks ansible playbooks for practices and behaviour
brew "ansible-lint"
# Generic-purpose lossless compression algorithm by Google
brew "brotli"
# Library and utilities for processing GIFs
@@ -80,18 +67,12 @@ brew "pkgconf"
brew "autogen"
# Tool for generating GNU Standards-compliant Makefiles
brew "automake"
# Official Amazon AWS command-line interface
brew "awscli"
# GNU internationalization (i18n) and localization (l10n) library
brew "gettext"
# Bourne-Again SHell, a UNIX command interpreter
brew "bash"
# Clone of cat(1) with syntax highlighting and Git integration
brew "bat"
# GNU File, Shell, and Text utilities
brew "coreutils"
# Bash Automated Testing System
brew "bats-core"
# Parser generator
brew "bison"
# Freely available high-quality data compressor
@@ -102,22 +83,12 @@ brew "freetype"
brew "fontconfig"
# Core application library for C
brew "glib"
# Binary installation for rust projects
brew "cargo-binstall"
# Multi-platform support library with a focus on asynchronous I/O
brew "libuv"
# Open-source, cross-platform JavaScript runtime environment
brew "node", link: false
# CLI tool for analyzing Claude Code usage from local JSONL files
brew "ccusage"
# JSON Schema CLI
brew "check-jsonschema"
# Prevent cloud misconfigurations during build-time for IaC tools
brew "checkov"
# Human-friendly and fast alternative to cut and (sometimes) awk
brew "choose-rust"
# Cross-platform make
brew "cmake"
# Get a file from an HTTP, HTTPS or FTP server
brew "curl"
# Network authentication protocol
@@ -154,14 +125,8 @@ brew "flock"
brew "freetds"
# Monitor a directory for changes and run a shell command
brew "fswatch"
# Command-line fuzzy finder written in Go
brew "fzf"
# Graphics library to dynamically manipulate images
brew "gd"
# Disk usage analyzer with console interface written in Go
brew "gdu"
# GitHub command-line tool
brew "gh"
# Distributed revision control system
brew "git"
# Enable transparent encryption/decryption of files in a git repo
@@ -170,14 +135,10 @@ brew "git-crypt"
brew "git-extras"
# Browse your latest git branches, formatted real fancy
brew "git-recent"
# Render markdown on the CLI
brew "glow"
# GNU implementation of the famous stream editor
brew "gnu-sed"
# GNU Pretty Good Privacy (PGP) package
brew "gnupg"
# Go version management
brew "goenv"
# Library access to GnuPG
brew "gpgme"
# Manage your GnuPG keys with ease!
@@ -190,8 +151,6 @@ brew "librsvg"
brew "graphviz"
# GNU grep, egrep and fgrep
brew "grep"
# Vulnerability scanner for container images and filesystems
brew "grype"
# Popular GNU data compression program
brew "gzip"
# Improved top (interactive process viewer)
@@ -206,8 +165,6 @@ brew "imagemagick"
brew "irssi"
# Image manipulation library
brew "jpeg"
# Lightweight and flexible command-line JSON processor
brew "jq"
# JSON parser for C
brew "json-c"
# Crawling and spidering framework
@@ -244,8 +201,6 @@ brew "nginx"
brew "nmap"
# Libraries for security-enabled client and server applications
brew "nss"
# Command-line Git information tool
brew "onefetch"
# General-purpose speech recognition model
brew "openai-whisper"
# Open source suite of directory software
@@ -258,46 +213,18 @@ brew "php", link: false
brew "php@8.2", link: true
# General-purpose scripting language
brew "php@8.3"
# Pins GitHub Actions to full hashes and versions
brew "pinact"
# Python version management
brew "pyenv"
# Migrate pip packages from one Python version to another
brew "pyenv-pip-migrate"
# Pyenv plugin to manage virtualenv
brew "pyenv-virtualenv"
# Interpreted, interactive, object-oriented programming language
brew "python@3.11"
# Install various Ruby versions and implementations
brew "ruby-build"
# Ruby version manager
brew "rbenv"
# Generate C-based recognizers from regular expressions
brew "re2c"
# Rust toolchain installer
brew "rustup"
# Static analysis and lint tool, for (ba)sh scripts
brew "shellcheck"
# User interface to the TELNET protocol
brew "telnet"
# Send macOS User Notifications from the command-line
brew "terminal-notifier"
# Tool which checks for the support of TLS/SSL ciphers and flaws
brew "testssl"
# Terraform version manager inspired by rbenv
brew "tfenv"
# Linter for Terraform files
brew "tflint"
# Static analysis security scanner for your terraform code
brew "tfsec"
# Terminal multiplexer
brew "tmux"
# Extremely fast Python package installer and resolver, written in Rust
brew "uv"
# Tool for creating isolated virtual python environments
brew "virtualenv"
# Command-line interface to the WakaTime api
brew "wakatime-cli"
# Executes a program periodically, showing output fullscreen
brew "watch"
# Internet file retriever
@@ -336,8 +263,6 @@ brew "shivammathur/extensions/yaml@8.3"
brew "shivammathur/php/php-debug"
# General-purpose scripting language
brew "shivammathur/php/php@8.2-debug"
# Find & fix known vulnerabilities in open-source dependencies
brew "snyk/tap/snyk"
# Tabby: AI Coding Assistant
brew "tabbyml/tabby/tabby"
# Command-line interface for 1Password

View File

@@ -1,4 +1,2 @@
#!/bin/env bash
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
#!/usr/bin/env bash
eval "$(mise activate --shims)"

View File

@@ -1,68 +1,68 @@
{
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Change right_command+hjkl to arrow keys",
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": ["right_command"],
"optional": ["any"]
}
},
"to": [{ "key_code": "left_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": ["right_command"],
"optional": ["any"]
}
},
"to": [{ "key_code": "down_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": ["right_command"],
"optional": ["any"]
}
},
"to": [{ "key_code": "up_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": ["right_command"],
"optional": ["any"]
}
},
"to": [{ "key_code": "right_arrow" }],
"type": "basic"
}
]
}
]
},
"name": "Default profile",
"selected": true,
"simple_modifications": [
"profiles": [
{
"from": { "key_code": "caps_lock" },
"to": [{ "key_code": "f18" }]
"complex_modifications": {
"rules": [
{
"description": "Change right_command+hjkl to arrow keys",
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": ["right_command"],
"optional": ["any"]
}
},
"to": [{ "key_code": "left_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": ["right_command"],
"optional": ["any"]
}
},
"to": [{ "key_code": "down_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": ["right_command"],
"optional": ["any"]
}
},
"to": [{ "key_code": "up_arrow" }],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": ["right_command"],
"optional": ["any"]
}
},
"to": [{ "key_code": "right_arrow" }],
"type": "basic"
}
]
}
]
},
"name": "Default profile",
"selected": true,
"simple_modifications": [
{
"from": { "key_code": "caps_lock" },
"to": [{ "key_code": "f18" }]
}
],
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
}
],
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
}
]
}
]
}

105
config/mise/config.toml Normal file
View File

@@ -0,0 +1,105 @@
[tools]
# Language runtimes
node = "lts"
python = "3"
go = "latest"
rust = "stable"
# Pre-built binaries via ubi (fast — no compilation)
"ubi:sharkdp/fd" = "latest"
"ubi:BurntSushi/ripgrep" = "latest"
"ubi:eza-community/eza" = "latest"
"ubi:ClementTsang/bottom" = "latest"
"ubi:ajeetdsouza/zoxide" = "latest"
"ubi:tree-sitter/tree-sitter" = "latest"
"ubi:neovim/neovim" = "latest" # Neovim editor binary
"ubi:dandavison/delta" = "latest"
# Cargo-based tools (no pre-built binary available)
"cargo:bkt" = "latest"
"cargo:difftastic" = "latest"
"cargo:tmux-sessionizer" = "latest"
# Go-based tools
"go:github.com/google/yamlfmt/cmd/yamlfmt" = "latest"
"go:github.com/cheat/cheat/cmd/cheat" = "latest"
"go:github.com/charmbracelet/glow" = "latest"
"go:github.com/junegunn/fzf" = "latest"
"go:github.com/charmbracelet/gum" = "latest"
"go:github.com/joshmedeski/sesh/v2" = "latest"
"go:github.com/dotzero/git-profile" = "latest"
# npm-based tools
"npm:editorconfig-checker" = "latest"
"npm:github-release-notes" = "latest"
"npm:neovim" = "latest" # Node.js client for Neovim's RPC API (required by plugins)
"npm:corepack" = "latest"
# Python tools (via pipx backend)
"pipx:ansible" = "latest"
"pipx:ansible-lint" = "latest"
"pipx:ruff" = "latest"
"pipx:openapi-python-client" = "latest"
# .NET tools (via dotnet backend)
"dotnet:coverlet.console" = "latest"
"dotnet:csharp-ls" = "latest"
"dotnet:csharpier" = "latest"
"dotnet:ilspycmd" = "latest"
"dotnet:dotnet-ef" = "latest"
# DevOps & security tools
act = "latest"
age = "latest"
aws-cli = "latest"
checkov = "latest"
grype = "latest"
pinact = "latest"
snyk = "latest"
# Dev tools (pre-built binaries)
lazygit = "latest"
bat = "latest"
bats = "latest"
choose = "latest"
cmake = "latest"
gdu = "latest"
github-cli = "latest"
jq = "latest"
shellcheck = "latest"
shfmt = "latest"
stylua = "latest"
actionlint = "latest"
"aqua:mpalmer/action-validator" = "latest"
oh-my-posh = "latest"
"ubi:o2sh/onefetch" = "latest"
"ubi:wakatime/wakatime-cli" = "latest"
# Terraform (replaces tfenv)
terraform = "latest"
tflint = "latest"
tfsec = "latest"
# Other useful tools
uv = "latest"
[settings]
trusted_config_paths = [
"~/Code/ivuorinen",
"~/Code/s",
"~/Code/masf",
]
# Respect .nvmrc, .python-version, .ruby-version, etc. in other projects.
# This repo uses .mise.toml at the repo root for pinned versions.
idiomatic_version_file = true
idiomatic_version_file_enable_tools = [
"node", "python", "ruby", "go", "java",
"terraform", "yarn", "bun", "deno", "dotnet",
]
# Generate mise.lock for reproducible installs
lockfile = true
# Save disk space — don't keep downloaded archives or failed installs
always_keep_download = false
always_keep_install = false

View File

@@ -2,7 +2,7 @@
-- │ ivuorinen's Neovim configuration │
-- ╰─────────────────────────────────────────────────────────╯
-- ── Install lazylazy ────────────────────────────────────────────────
-- ── Install lazy ────────────────────────────────────────────────────
-- https://github.com/folke/lazy.nvim
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
@@ -27,8 +27,12 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
-- ── Add ~/.local/bin to the PATH ────────────────────────────────────
vim.fn.setenv('PATH', vim.fn.expand '$HOME/.local/bin' .. ':' .. vim.fn.expand '$PATH')
-- ── Add mise shims and ~/.local/bin to the PATH ───────────────────────
vim.env.PATH = vim.env.HOME
.. '/.local/share/mise/shims:'
.. vim.env.HOME
.. '/.local/bin:'
.. vim.env.PATH
require 'options'
require 'autogroups'
@@ -53,7 +57,7 @@ require('lazy').setup(
path = '~/Code/nvim', -- Load wip plugins from this path
},
install = {
colorscheme = { vim.g.colors_theme },
colorscheme = { 'catppuccin' },
},
profiling = {
loader = true,
@@ -61,8 +65,6 @@ require('lazy').setup(
}
)
-- require('nvm-default').setup()
require 'keymaps'
-- vim: set ts=2 sts=2 sw=2 wrap et :

View File

@@ -28,7 +28,6 @@ K.d('<C-k>', { 'n', 'v' }, ":m '<-2<CR>gv=gv", 'Move Block Up')
K.d('<C-j>', { 'n', 'v' }, ":m '>+1<CR>gv=gv", 'Move Block Down')
-- ── Other operations ────────────────────────────────────────────────
K.nl('o', function() require('snacks').gitbrowse() end, 'Open repo in browser')
K.n('<C-s>', ':w!<cr>', { desc = 'Save', noremap = true })
K.n('<esc><esc>', ':nohlsearch<cr>', { desc = 'Clear Search Highlighting' })
@@ -59,7 +58,6 @@ K.ld('cci', 'n', function() b().lsp_incoming_calls() end, 'Incoming calls')
K.ld('cco', 'n', function() b().lsp_outgoing_calls() end, 'Outgoing calls')
K.ld('cd', 'n', function() b().lsp_definitions() end, 'Definitions')
K.ld('cf', { 'n', 'x' }, ':lua vim.lsp.buf.format()<CR>', 'Format')
K.ld('cg', 'n', ':lua require("neogen").generate()<CR>', 'Generate annotations')
K.ld('ci', 'n', function() b().lsp_implementations() end, 'Implementations')
K.ld('cp', 'n', function() b().lsp_type_definitions() end, 'Type Definition')
K.ld('cr', 'n', vim.lsp.buf.rename, 'Rename')

View File

@@ -1,120 +0,0 @@
-- Get nvm default version and use it in node_host_prog
-- and g.copilot_node_command.
--
-- This module automatically configures Neovim to use the default Node.js version
-- from NVM. It requires a working NVM installation and 'default' alias to be set,
-- and also neovim npm package to be installed.
--
-- You can install the neovim package by running:
-- npm i --global neovim
--
-- Usage:
-- require('nvm-default').setup({
-- add_to_path = true, -- optional: add NVM bin directory to PATH
-- nvm_path = "~/.nvm", -- optional: custom NVM installation path
-- notify_level = "info" -- optional: notification level
-- })
local M = {}
M.name = 'nvm-default.nvim'
M.version = '0.1.0' -- x-release-please-version
-- Helper function to run a shell command
---@param cmd string Run a shell command
---@return string? Return the result of the command
local function run_command(cmd)
local result = vim.fn.system(cmd)
return vim.v.shell_error == 0 and result:gsub('%s+$', '') or nil
end
-- Helper function to show a notification
---@param msg string Show a message
---@param level "info"|"warn"|"error"|"trace" Notification level
local function n(msg, level)
if msg == nil then msg = M.name .. ': No message provided' end
if level == nil then level = 'trace' end
local log_level = vim.log.levels.INFO
if level == 'info' then
log_level = vim.log.levels.INFO
elseif level == 'warn' then
log_level = vim.log.levels.WARN
elseif level == 'error' then
log_level = vim.log.levels.ERROR
elseif level == 'trace' then
log_level = vim.log.levels.TRACE
end
vim.notify(M.name .. ': ' .. msg, log_level)
end
---@class NvmDefaultOptions
---@field add_to_path boolean Add found NVM bin directory to PATH
---@field nvm_path string Where nvm installation is located
---@field notify_level number|"info"|"warn"|"error"|"trace" Notification level filter
-- Default options
---@type NvmDefaultOptions
M.defaults = {
add_to_path = vim.g.nvm_default_add_to_path or true,
nvm_path = vim.fn.expand(os.getenv 'NVM_DIR' or '~/.nvm'),
notify_level = vim.g.nvm_default_notify_level or 'info',
}
-- Fetch the NVM default version or fallback to node version
---@param opts? NvmDefaultOptions Plugin options
function M.setup(opts)
local options = vim.tbl_deep_extend('force', M.defaults, opts or {})
local nvm_path = options.nvm_path
local node_version = run_command(
string.format('. %s/nvm.sh && nvm version default', nvm_path)
) or run_command(string.format('. %s/nvm.sh && nvm version node', nvm_path)) or nil
if node_version and node_version:match '^v' then
-- Set vim.g.node_host_prog and vim.g.copilot_node_command
local current_nvm_version_path =
string.format('%s/versions/node/%s', nvm_path, node_version)
local current_nvm_node_bin_path = string.format('%s/bin', current_nvm_version_path)
local current_nvm_node_bin = string.format('%s/node', current_nvm_node_bin_path)
local neovim_node_host_bin_path =
string.format('%s/neovim-node-host', current_nvm_node_bin_path)
-- Collect missing files and directories errors for error output
local missing = {}
-- If node_dir isn't there, stop and show error
if not vim.fn.isdirectory(current_nvm_version_path) then
table.insert(missing, 'Node.js directory: ' .. current_nvm_version_path)
end
-- If node_bin isn't there, stop and show error
if not vim.fn.filereadable(current_nvm_node_bin) then
table.insert(missing, 'Node.js binary: ' .. current_nvm_node_bin)
end
if not vim.fn.filereadable(neovim_node_host_bin_path) then
table.insert(missing, 'Neovim host binary: ' .. neovim_node_host_bin_path)
end
if #missing > 0 then
n('Missing required files:\n- ' .. table.concat(missing, '\n- '), 'error')
return
end
-- Add to PATH if requested. Can be turned off by setting if it messes with
-- other tools.
if options.add_to_path then
vim.env.PATH = current_nvm_node_bin_path .. ':' .. vim.env.PATH
end
vim.g.node_host_prog = neovim_node_host_bin_path
vim.g.copilot_node_command = current_nvm_node_bin
else
n('Unable to determine the Node.js version from nvm.', 'error')
end
end
return M

View File

@@ -13,10 +13,6 @@ local a = vim.api -- A table to store API functions
g.mapleader = ' ' -- Space as the leader key
g.maplocalleader = ' ' -- Space as the local leader key
-- g.colors_theme = 'onedark' -- Set the colorscheme
-- g.colors_variant_light = 'tokyonight-day' -- Set the light variant
-- g.colors_variant_dark = 'tokyonight-storm' -- Set the dark variant
g.editorconfig = true -- Make sure editorconfig support is enabled
g.loaded_perl_provider = 0 -- Disable perl provider
g.loaded_ruby_provider = 0 -- Disable ruby provider

View File

@@ -1,6 +1,6 @@
return {
-- Performant, batteries-included completion plugin for Neovim
-- https:/github.com/saghen/blink.cmp
-- https://github.com/saghen/blink.cmp
{
'saghen/blink.cmp',
version = '*',

View File

@@ -24,7 +24,14 @@ return {
-- https://github.com/fatih/vim-go
{
'fatih/vim-go',
config = function() end,
ft = 'go',
config = function()
vim.g.go_def_mode = 'gopls'
vim.g.go_info_mode = 'gopls'
vim.g.go_fmt_autosave = 0
vim.g.go_imports_autosave = 0
vim.g.go_mod_fmt_autosave = 0
end,
},
-- Clarify and beautify your comments using boxes and lines.

View File

@@ -223,7 +223,7 @@ return {
vim.env.VIMRUNTIME,
}
client.config.settings.Lua.runtime = { version = 'LuaJIT' }
client.notify(
client:notify(
'workspace/didChangeConfiguration',
{ settings = client.config.settings }
)

View File

@@ -89,15 +89,12 @@ return {
'f-person/auto-dark-mode.nvim',
opts = {
update_interval = 1000,
-- stylua: ignore
set_dark_mode = function()
vim.api.nvim_set_option_value('background', 'dark', {})
-- vim.cmd.colorscheme(vim.g.colors_variant_dark)
-- vim.cmd 'colorscheme rose-pine'
end,
set_light_mode = function()
vim.api.nvim_set_option_value('background', 'light', {})
-- vim.cmd.colorscheme(vim.g.colors_variant_light)
-- vim.cmd 'colorscheme rose-pine-dawn'
end,
},
},

View File

@@ -100,5 +100,6 @@ function GetIntelephenseLicense()
local f = assert(io.open(p, 'rb'))
local content = f:read '*a'
f:close()
return string.gsub(content, '%s+', '')[1] or nil
local stripped = string.gsub(content, '%s+', '')
return stripped == '' and nil or stripped
end

View File

@@ -1,5 +0,0 @@
# $NVM_DIR/default-packages
yarn
neovim
corepack

View File

@@ -8,8 +8,11 @@
#
# Smart session manager for the terminal
# https://github.com/joshmedeski/sesh
#:schema https://github.com/joshmedeski/sesh/raw/main/sesh.schema.json
strict_mode = false
dir_length = 2 # Uses last 2 directories: "projects/sesh" instead of just "sesh"
cache = true
# [marker]
# inactivity_threshold = 10 # Seconds before alerts start
@@ -52,3 +55,7 @@ disable_startup_command = true
name = "Downloads"
path = "~/Downloads"
startup_command = "lsa"
[[session]]
name = "Code/ivuorinen"
path = "~/Code/ivuorinen/"

View File

@@ -5,7 +5,7 @@
# shellcheck shell=bash
# Defaults
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles"
[[ -z "${DOTFILES:-}" ]] && export DOTFILES="$HOME/.dotfiles"
DOTFILES_CURRENT_SHELL=$(basename "$SHELL")
export DOTFILES_CURRENT_SHELL
@@ -15,7 +15,7 @@ VERBOSE="${VERBOSE:-0}"
DEBUG="${DEBUG:-0}"
# Enable debugging with DEBUG=1
[ "${DEBUG:-0}" -eq 1 ] && set -x
[[ "${DEBUG:-0}" -eq 1 ]] && set -x
# Detect the current shell
CURRENT_SHELL=$(ps -p $$ -ocomm= | awk -F/ '{print $NF}')
@@ -33,9 +33,10 @@ x-path-prepend()
;;
*)
echo "Unsupported shell: $CURRENT_SHELL"
exit 1
return 1
;;
esac
return 0
}
# Function to set environment variables based on the shell
@@ -52,9 +53,10 @@ x-set-env()
;;
*)
echo "Unsupported shell: $CURRENT_SHELL"
exit 1
return 1
;;
esac
return 0
}
# Explicitly set XDG folders, if not already set
@@ -69,21 +71,21 @@ x-set-env XDG_BIN_HOME "$HOME/.local/bin"
x-path-prepend "/usr/local/bin"
x-path-prepend "/opt/homebrew/bin"
x-path-prepend "$XDG_DATA_HOME/cargo/bin"
x-path-prepend "$XDG_DATA_HOME/bob/nvim-bin"
x-path-prepend "$DOTFILES/local/bin"
x-path-prepend "$XDG_BIN_HOME"
# Custom completion paths
[ -z "$ZSH_CUSTOM_COMPLETION_PATH" ] && export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion"
[[ -z "${ZSH_CUSTOM_COMPLETION_PATH:-}" ]] && export ZSH_CUSTOM_COMPLETION_PATH="$XDG_CONFIG_HOME/zsh/completion"
x-dc "$ZSH_CUSTOM_COMPLETION_PATH"
export FPATH="$ZSH_CUSTOM_COMPLETION_PATH:$FPATH"
export FPATH="$ZSH_CUSTOM_COMPLETION_PATH:${FPATH:-}"
if ! declare -f msg > /dev/null; then
# Function to print messages if VERBOSE is enabled
# $1 - message (string)
msg()
{
[ "$VERBOSE" -eq 1 ] && msgr msg "$1"
local message="$1"
[[ "$VERBOSE" -eq 1 ]] && msgr msg "$message"
return 0
}
msg "msg was not defined, defined it now"
@@ -95,7 +97,8 @@ if ! declare -f msg_err > /dev/null; then
# $1 - error message (string)
msg_err()
{
msgr err "$1" >&2
local message="$1"
msgr err "$message" >&2
exit 1
}
fi
@@ -106,7 +109,8 @@ if ! declare -f msg_done > /dev/null; then
# $1 - message (string)
msg_done()
{
msgr "done" "$1"
local message="$1"
msgr "done" "$message"
return 0
}
fi
@@ -117,7 +121,8 @@ if ! declare -f msg_run > /dev/null; then
# $1 - message (string)
msg_run()
{
msgr run "$1"
local message="$1"
msgr run "$message"
return 0
}
fi
@@ -128,7 +133,8 @@ if ! declare -f msg_ok > /dev/null; then
# $1 - message (string)
msg_ok()
{
msgr ok "$1"
local message="$1"
msgr ok "$message"
return 0
}
fi
@@ -143,12 +149,16 @@ if ! declare -f array_diff > /dev/null; then
# Source: https://stackoverflow.com/a/42399479/594940
array_diff()
{
local result_var="$1"
local arr1_name="$2"
local arr2_name="$3"
# shellcheck disable=SC1083,SC2086
eval local ARR1=\(\"\${$2[@]}\"\)
eval local ARR1=\(\"\${${arr1_name}[@]}\"\)
# shellcheck disable=SC1083,SC2086
eval local ARR2=\(\"\${$3[@]}\"\)
eval local ARR2=\(\"\${${arr2_name}[@]}\"\)
local IFS=$'\n'
mapfile -t "$1" < <(comm -23 <(echo "${ARR1[*]}" | sort) <(echo "${ARR2[*]}" | sort))
mapfile -t "$result_var" < <(comm -23 <(echo "${ARR1[*]}" | sort) <(echo "${ARR2[*]}" | sort))
return 0
}
fi

View File

@@ -7,13 +7,13 @@ DEFAULT_NAME="main"
CURRENT_SESSION=$(tmux display-message -p "#{session_name}")
# Check that the session has a name
if [ "$CURRENT_SESSION" = "#{session_name}" ] || [ "$CURRENT_SESSION" = "0" ]; then
if [[ "$CURRENT_SESSION" = "#{session_name}" ]] || [[ "$CURRENT_SESSION" = "0" ]]; then
# Check if the default name is already in use
if tmux has-session -t "$DEFAULT_NAME" 2> /dev/null; then
# Query the user for a new name
echo "Session name '$DEFAULT_NAME' is already in use. Enter a new name:"
read -r NEW_NAME
while tmux has-session -t "$NEW_NAME" 2> /dev/null || [ -z "$NEW_NAME" ]; do
while tmux has-session -t "$NEW_NAME" 2> /dev/null || [[ -z "$NEW_NAME" ]]; do
echo "Name '$NEW_NAME' is invalid or already in use. Enter a new name:"
read -r NEW_NAME
done

View File

@@ -8,12 +8,14 @@
set -euo pipefail
# Fall back to native tmux session picker if sesh is not installed
if ! command -v sesh &>/dev/null; then
if ! command -v sesh &> /dev/null; then
tmux choose-tree -Zs
exit 0
fi
pick_with_gum() {
# Pick a sesh session using gum filter
pick_with_gum()
{
sesh list -i \
| gum filter \
--limit 1 \
@@ -22,6 +24,7 @@ pick_with_gum() {
--placeholder 'Pick a sesh' \
--height 50 \
--prompt='⚡'
return 0
}
FZF_COMMON_OPTS=(
@@ -40,15 +43,23 @@ FZF_COMMON_OPTS=(
--preview 'sesh preview {}'
)
pick_with_fzf_tmux() {
# Pick a sesh session using fzf-tmux popup
pick_with_fzf_tmux()
{
sesh list --icons | fzf-tmux -p 80%,70% "${FZF_COMMON_OPTS[@]}"
return 0
}
pick_with_fzf() {
# Pick a sesh session using fzf inline
pick_with_fzf()
{
sesh list --icons | fzf "${FZF_COMMON_OPTS[@]}"
return 0
}
pick_with_select() {
# Pick a sesh session using bash select menu
pick_with_select()
{
local sessions
mapfile -t sessions < <(sesh list)
if [[ ${#sessions[@]} -eq 0 ]]; then
@@ -64,11 +75,11 @@ pick_with_select() {
}
# Cascading tool detection
if command -v gum &>/dev/null; then
if command -v gum &> /dev/null; then
selection=$(pick_with_gum)
elif command -v fzf-tmux &>/dev/null; then
elif command -v fzf-tmux &> /dev/null; then
selection=$(pick_with_fzf_tmux)
elif command -v fzf &>/dev/null; then
elif command -v fzf &> /dev/null; then
selection=$(pick_with_fzf)
else
selection=$(pick_with_select)

View File

@@ -16,6 +16,7 @@
# -u : Unset the specified option.
set -as terminal-features ",xterm-256color:RGB:clipboard:usstyle:strikethrough:overline"
set -g allow-passthrough on # Let apps query outer terminal (OSC 11 for fish theme detection)
set -s escape-time 0 # Address vim mode switching delay
set -s set-clipboard on # System clipboard via OSC 52

View File

@@ -3,6 +3,9 @@
"
" vim: ts=2 sw=2 expandtab
" vint: +ProhibitAbbreviationOption +ProhibitSetNoCompatible
" mise — add shims to PATH for tool discovery
let $PATH = $HOME . '/.local/bin:' . $HOME . '/.local/share/mise/shims:' . $PATH
"*****************************************************************************
"" Vim-Plug core
"*****************************************************************************

View File

@@ -10,7 +10,7 @@ config.color_scheme_dirs = {
}
-- Font and font size
config.font_size = 16
config.font_size = 12
config.font = wezterm.font_with_fallback {
{
family = 'Monaspace Argon NF',
@@ -48,9 +48,9 @@ config.window_background_opacity = 0.97
config.window_decorations = 'RESIZE'
config.macos_window_background_blur = 10
config.window_padding = {
left = 5,
right = 5,
top = 5,
left = 10,
right = 10,
top = 10,
bottom = 5,
}

View File

@@ -18,7 +18,6 @@
# Plugin configurations
zstyle ':antidote:bundle' use-friendly-names 'yes'
zstyle ':omz:update' mode reminder
zstyle ':omz:plugins:nvm' autoload yes
# Pure prompt settings
export PURE_PROMPT_SYMBOL='➜'

View File

@@ -24,14 +24,10 @@ ohmyzsh/ohmyzsh path:plugins/fzf
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/gpg-agent
ohmyzsh/ohmyzsh path:plugins/nvm
ohmyzsh/ohmyzsh path:plugins/python
# ohmyzsh/ohmyzsh path:plugins/tmux
ohmyzsh/ohmyzsh path:plugins/z
# Automatically activate nvm if .nvmrc file is present
ivuorinen/nvm-auto-use
# Add core plugins that make Zsh a bit more like Fish
zdharma-continuum/fast-syntax-highlighting

View File

@@ -61,7 +61,7 @@
vcs # git status
# command_execution_time # previous command duration
go
nvm
asdf
aws
# =========================[ Line #2 ]=========================
newline # \n
@@ -121,8 +121,8 @@
# Don't show context unless root or in SSH.
# typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION=
# aws, go and nvm versions colors.
typeset -g POWERLEVEL9K_{AWS,GO,NVM}_FOREGROUND=$grey
# aws, go and asdf versions colors.
typeset -g POWERLEVEL9K_{AWS,GO,ASDF}_FOREGROUND=$grey
# Show previous command duration only if it's >= 86400s = 24h.
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=86400

View File

@@ -1,26 +0,0 @@
# shellcheck disable=SC1071,SC1103,SC2148
# Source: https://github.com/nvm-sh/nvm#zsh
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local nvmrc_path
nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version
nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$(nvm version)" ]; then
nvm use
fi
elif [ -n "$(PWD=$OLDPWD nvm_find_nvmrc)" ] && [ "$(nvm version)" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc

View File

@@ -0,0 +1,40 @@
# Skip Already-Installed Cargo Packages
## Problem
`install-cargo-packages.sh` runs `cargo install-update -a` to update installed
packages, then runs `cargo install` for every package in the list — including
ones that are already installed and up-to-date. This wastes time rebuilding
packages that don't need it.
## Solution
Capture the `cargo install-update -a` output, parse installed package names,
and skip `cargo install` for any package that appeared in the update output.
## Changes
**File:** `scripts/install-cargo-packages.sh`
1. Declare an associative array `installed_packages` at the top.
2. In the `cargo-install-update` section, capture output with `tee /dev/stderr`
so it displays in real-time while also being stored in a variable.
3. Parse the captured output with `awk` — extract the first column from lines
matching a version pattern (`v[0-9]+\.[0-9]+`), skipping the header.
4. Populate `installed_packages` associative array from parsed names.
5. In `install_packages()`, check each package against the array. If found, log
a skip message via `msgr` and continue. If not found, install as before.
6. If `cargo-install-update` is not available, the array stays empty and all
packages install normally (preserves existing behavior).
## Output Parsing
The `cargo install-update -a` output format:
```text
Package Installed Latest Needs update
zoxide v0.9.8 v0.9.9 Yes
bkt v0.8.2 v0.8.2 No
```
Extraction: `awk '/v[0-9]+\.[0-9]+/ { print $1 }'` gets package names.

View File

@@ -0,0 +1,55 @@
# dfm Cleanup Design
## Summary
Clean up `local/bin/dfm` to fix bugs, remove dead code, improve
cross-platform portability, and make error handling consistent.
## Changes
### 1. Bash Version Bootstrap
Add a check at the top of the script (after variable declarations)
that requires bash 4.0+. On macOS, if bash is too old, install
Homebrew (if missing) and bash, then print instructions and exit.
The check itself uses only bash 3.2-compatible syntax.
### 2. Remove Fish Dead Code
Remove `CURRENT_SHELL` detection, `source_file()` function, and all
fish branches. Replace `source_file` calls with direct `source`.
The script has a bash shebang — fish handling was unreachable.
### 3. Bug Fixes
- Remove `ntfy` from install menu (no install script exists)
- Fix `msg)``msgr)` case label in `section_tests`
- Guard all `shift` calls against empty argument lists
- Quote `$width` in `menu_builder` seq calls
- Fix `$"..."` locale string → `"..."` in `usage()`
- Fix `exit 0` on apt.txt error → `return 1`
### 4. Replace `declare -A` in `section_scripts`
Replace associative array with indexed `"name:desc"` array,
matching the pattern used everywhere else in the script.
Move `get_script_description()` to top-level (out of the function).
### 5. Early-Return Guards & exit → return
- `section_brew()`: Early return with `msgr warn` if brew unavailable.
Remove duplicate `! x-have brew` check.
- `section_apt()`: Same pattern for apt.
- `section_check()`: Replace `exit` with `return`.
- `section_apt() install`: Replace `exit` with `return`.
- `section_brew() untracked`: Replace `exit` with `return`.
## Files Changed
- `local/bin/dfm` (all changes)
## Verification
- `yarn test` (existing bats test)
- `shellcheck local/bin/dfm`
- `bash -n local/bin/dfm` (syntax check)

View File

@@ -0,0 +1,46 @@
# x-* Scripts Cleanup Design
## Summary
Comprehensive cleanup of all 34 x-* utility scripts in `local/bin/`.
Fix critical bugs, consolidate duplicates, standardize patterns.
## Changes
### Removals
- `x-mkd`, `x-mkd.md`, `tests/x-mkd.bats` — unused, cd-in-subshell broken
- `x-validate-sha256sum.sh`, `x-validate-sha256sum.sh.md` — duplicates x-sha256sum-matcher
### Thin Wrappers (delegate to x-path)
- `x-path-append` → calls `x-path append "$@"`
- `x-path-prepend` → calls `x-path prepend "$@"`
- `x-path-remove` → calls `x-path remove "$@"`
### Critical Fixes
- `x-clean-vendordirs`: call msgr as command (it's in PATH)
- `x-foreach`: replace eval with direct "$@" execution
- `x-ip`: add error handling, curl check
### Consistency Fixes
- Fix `#!/bin/bash``#!/usr/bin/env bash` (x-env-list, x-localip)
- POSIX scripts keep `#!/bin/sh`
- Add `set -euo pipefail` where missing in bash scripts
- Use XDG variables instead of hardcoded paths (x-change-alacritty-theme)
- Quote unquoted variables
### Minor Fixes
- `x-multi-ping`: remove unused VERBOSE variable
- `x-when-down`, `x-when-up`: add error handling
- `x-term-colors`: add usage message
- `x-record`: fix undefined notify-call reference
## Verification
- `yarn test` — ensure remaining tests pass
- `shellcheck` on modified scripts
- `bash -n` syntax check on all modified bash scripts

View File

@@ -1,5 +1,5 @@
---
- include: 'tools/dotbot-defaults.yaml'
- include: "tools/dotbot-defaults.yaml"
- shell:
- echo "Configuring air"
- link:
@@ -7,7 +7,7 @@
force: true
glob: true
path: hosts/air/base/**
prefix: '.'
prefix: "."
~/.config/:
glob: true
force: true

View File

@@ -1,5 +1,5 @@
---
- include: 'tools/dotbot-defaults.yaml'
- include: "tools/dotbot-defaults.yaml"
- shell:
- echo "Configuring lakka"
- link:
@@ -7,7 +7,7 @@
force: true
glob: true
path: hosts/lakka/base/**
prefix: '.'
prefix: "."
~/.config/:
glob: true
force: true

View File

@@ -2,6 +2,9 @@
[include]
path = ~/.dotfiles/config/git/shared
[core]
excludesfile = ~/.config/git/overrides/ignore
[gpg]
format = ssh

View File

@@ -0,0 +1,31 @@
.DS_Store
.idea
.run
*.cache
*~
*-secret
__secret
__ignored
__test_*.php
__test_*.txt
__test.php
_theme
*.sql.gz
*.WordPress.*.xml
cachegrind.out.*
composer.phar
wp_*.sh
auth.json
dfm.sh
.scannerwork
.phpactor.json
.zsh_history
**/.claude/*
**/.serena/*
**/docs/plans/*
**/docs/superpowers/*
CLAUDE.md
TODO.md
specs.md

View File

@@ -1,5 +1,5 @@
---
- include: 'tools/dotbot-defaults.yaml'
- include: "tools/dotbot-defaults.yaml"
- shell:
- echo "Configuring s"
- link:
@@ -7,7 +7,7 @@
force: true
glob: true
path: hosts/s/base/**
prefix: '.'
prefix: "."
~/.config/:
glob: true
force: true

View File

@@ -1,5 +1,5 @@
---
- include: 'tools/dotbot-defaults.yaml'
- include: "tools/dotbot-defaults.yaml"
- shell:
- echo "Configuring tunkki"
- link:
@@ -7,7 +7,7 @@
force: true
glob: true
path: hosts/tunkki/base/**
prefix: '.'
prefix: "."
~/.config/:
glob: true
force: true

View File

@@ -22,9 +22,9 @@ git submodule update --init --recursive "${DOTBOT_DIR}"
if [ "${DOTBOT_HOST}" != "" ]; then
DOTBOT_HOST_CONFIG="${BASEDIR}/hosts/${DOTBOT_HOST}/${CONFIG}"
echo "-> Trying if host config can be found: ${DOTBOT_HOST_CONFIG}"
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] &&
echo "(!) Found $DOTBOT_HOST_CONFIG" &&
"$DOTBOT_BIN_PATH" \
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] \
&& echo "(!) Found $DOTBOT_HOST_CONFIG" \
&& "$DOTBOT_BIN_PATH" \
-d "$BASEDIR" \
--plugin-dir=tools/dotbot-include \
-c "$DOTBOT_HOST_CONFIG" \

Some files were not shown because too many files have changed in this diff Show More