mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-28 22:59:18 +00:00
Compare commits
13 Commits
26.2.26
...
renovate/i
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6d6de5e0d | ||
| 070c94a244 | |||
| 70cf8ccf6d | |||
| 63faf4c4bf | |||
|
|
d81ff6dabb | ||
| ed6bef5c7e | |||
| 46b9e3ebeb | |||
| f26303a0ff | |||
| 8379135c81 | |||
| 73d0d6b35f | |||
| 6a839eea56 | |||
| 28c8332058 | |||
| b956119b98 |
@@ -18,6 +18,10 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
38
.claude/skills/fish-validate/SKILL.md
Normal file
38
.claude/skills/fish-validate/SKILL.md
Normal 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)
|
||||
22
.claude/skills/lua-format/SKILL.md
Normal file
22
.claude/skills/lua-format/SKILL.md
Normal 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)
|
||||
@@ -1,11 +1,16 @@
|
||||
---
|
||||
name: shell-validate
|
||||
description: Validate shell scripts after editing. Apply when writing or modifying any shell script in local/bin/ or scripts/.
|
||||
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:
|
||||
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
|
||||
|
||||
@@ -28,7 +33,9 @@ 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.
|
||||
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)
|
||||
|
||||
|
||||
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@@ -36,4 +36,4 @@ jobs:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Run PR Lint
|
||||
uses: ivuorinen/actions/pr-lint@8faacf8a1cae049c1471708dcb408a167e91afaf # v2026.02.24
|
||||
uses: ivuorinen/actions/pr-lint@d919327c7eb6279247eb1ecf92fb4ce0d915679b # v2026.02.28
|
||||
|
||||
2
.github/workflows/sync-labels.yml
vendored
2
.github/workflows/sync-labels.yml
vendored
@@ -30,4 +30,4 @@ jobs:
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- uses: ivuorinen/actions/sync-labels@8faacf8a1cae049c1471708dcb408a167e91afaf # v2026.02.24
|
||||
- uses: ivuorinen/actions/sync-labels@d919327c7eb6279247eb1ecf92fb4ce0d915679b # v2026.02.28
|
||||
|
||||
@@ -76,7 +76,7 @@ repos:
|
||||
- id: fish_indent
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.15.2
|
||||
rev: v0.15.4
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
args: [--fix]
|
||||
|
||||
@@ -16,3 +16,4 @@ local/bin/antigen.zsh
|
||||
local/bin/asdf
|
||||
tools
|
||||
docs/plans
|
||||
config/gh/hosts.yml
|
||||
|
||||
@@ -50,6 +50,9 @@ yarn test # Run all tests in tests/
|
||||
|
||||
# Shell linting
|
||||
shellcheck <script> # Lint shell scripts
|
||||
|
||||
# Tooling maintenance
|
||||
yarn biome migrate --write # Update biome schema version
|
||||
```
|
||||
|
||||
## Pre-commit Hooks
|
||||
@@ -140,7 +143,9 @@ SC2174 (mkdir -p -m), SC2016 (single-quote expressions).
|
||||
- **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 80+ functions.
|
||||
(`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`).
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
|
||||
"$schema": "https://biomejs.dev/schemas/2.4.4/schema.json",
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"clientKind": "git",
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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)
|
||||
|
||||
1
config/fish/conf.d/rustup.fish
Normal file
1
config/fish/conf.d/rustup.fish
Normal file
@@ -0,0 +1 @@
|
||||
source "/home/ivuorinen/.local/share/cargo/env.fish"
|
||||
@@ -21,6 +21,7 @@ if status is-interactive
|
||||
source "$HOME/.config/op/plugins.sh"
|
||||
|
||||
# version manager initializers
|
||||
type -q mise; and source (mise activate fish|psub)
|
||||
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)
|
||||
|
||||
@@ -17,6 +17,9 @@ set -q HOSTNAME; or set -x HOSTNAME (hostname -s)
|
||||
# Add local bin to path
|
||||
fish_add_path "$XDG_BIN_HOME"
|
||||
|
||||
# Add mise shims to path
|
||||
fish_add_path "$XDG_DATA_HOME/mise/shims"
|
||||
|
||||
# Add cargo bin to path
|
||||
fish_add_path "$XDG_SHARE_HOME/cargo/bin"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
github.com:
|
||||
git_protocol: https
|
||||
users:
|
||||
ivuorinen:
|
||||
user: ivuorinen
|
||||
git_protocol: ssh
|
||||
users:
|
||||
ivuorinen:
|
||||
user: ivuorinen
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
13
package.json
13
package.json
@@ -34,13 +34,16 @@
|
||||
},
|
||||
"homepage": "https://github.com/ivuorinen/dotfiles#readme",
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.3.1",
|
||||
"@types/node": "^24.0.1",
|
||||
"bats": "^1.12.0",
|
||||
"editorconfig-checker": "^6.1.0",
|
||||
"@biomejs/biome": "^2.4.4",
|
||||
"@types/node": "^25.3.2",
|
||||
"bats": "^1.13.0",
|
||||
"editorconfig-checker": "^6.1.1",
|
||||
"markdown-table-formatter": "^1.7.0",
|
||||
"prettier": "^3.8.1",
|
||||
"typescript": "^5.8.3"
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"minimatch": "^10.2.4"
|
||||
},
|
||||
"packageManager": "yarn@4.12.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
set -uo pipefail
|
||||
# @description Install cargo/rust packages.
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
|
||||
46
yarn.lock
46
yarn.lock
@@ -5,7 +5,7 @@ __metadata:
|
||||
version: 8
|
||||
cacheKey: 10c0
|
||||
|
||||
"@biomejs/biome@npm:^2.3.1":
|
||||
"@biomejs/biome@npm:^2.4.4":
|
||||
version: 2.4.4
|
||||
resolution: "@biomejs/biome@npm:2.4.4"
|
||||
dependencies:
|
||||
@@ -96,12 +96,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:^24.0.1":
|
||||
version: 24.10.13
|
||||
resolution: "@types/node@npm:24.10.13"
|
||||
"@types/node@npm:^25.3.2":
|
||||
version: 25.3.2
|
||||
resolution: "@types/node@npm:25.3.2"
|
||||
dependencies:
|
||||
undici-types: "npm:~7.16.0"
|
||||
checksum: 10c0/4ff0b9b060b5477c0fec5b11a176f294be588104ab546295db65b17a92ba0a6077b52ad92dd3c0d2154198c7f9d0021e6c1d42b00c9ac7ebfd85632afbcc48a4
|
||||
undici-types: "npm:~7.18.0"
|
||||
checksum: 10c0/946c8758668762d3c3b475281b420e580d0ce828c6847534a822b92be791e23e5879b53001ea928e5352dec8908082d854b8076b7bcfc69549e23ad54b1f98ab
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -112,7 +112,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"bats@npm:^1.12.0":
|
||||
"bats@npm:^1.13.0":
|
||||
version: 1.13.0
|
||||
resolution: "bats@npm:1.13.0"
|
||||
bin:
|
||||
@@ -149,7 +149,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"editorconfig-checker@npm:^6.1.0":
|
||||
"editorconfig-checker@npm:^6.1.1":
|
||||
version: 6.1.1
|
||||
resolution: "editorconfig-checker@npm:6.1.1"
|
||||
bin:
|
||||
@@ -206,13 +206,13 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "ivuorinen-dotfiles@workspace:."
|
||||
dependencies:
|
||||
"@biomejs/biome": "npm:^2.3.1"
|
||||
"@types/node": "npm:^24.0.1"
|
||||
bats: "npm:^1.12.0"
|
||||
editorconfig-checker: "npm:^6.1.0"
|
||||
"@biomejs/biome": "npm:^2.4.4"
|
||||
"@types/node": "npm:^25.3.2"
|
||||
bats: "npm:^1.13.0"
|
||||
editorconfig-checker: "npm:^6.1.1"
|
||||
markdown-table-formatter: "npm:^1.7.0"
|
||||
prettier: "npm:^3.8.1"
|
||||
typescript: "npm:^5.8.3"
|
||||
typescript: "npm:^5.9.3"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
@@ -271,12 +271,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^10.2.2":
|
||||
version: 10.2.2
|
||||
resolution: "minimatch@npm:10.2.2"
|
||||
"minimatch@npm:^10.2.4":
|
||||
version: 10.2.4
|
||||
resolution: "minimatch@npm:10.2.4"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^5.0.2"
|
||||
checksum: 10c0/098831f2f542cb802e1f249c809008a016e1fef6b3a9eda9cf9ecb2b3d7979083951bd47c0c82fcf34330bd3b36638a493d4fa8e24cce58caf5b481de0f4e238
|
||||
checksum: 10c0/35f3dfb7b99b51efd46afd378486889f590e7efb10e0f6a10ba6800428cf65c9a8dedb74427d0570b318d749b543dc4e85f06d46d2858bc8cac7e1eb49a95945
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -343,7 +343,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typescript@npm:^5.8.3":
|
||||
"typescript@npm:^5.9.3":
|
||||
version: 5.9.3
|
||||
resolution: "typescript@npm:5.9.3"
|
||||
bin:
|
||||
@@ -353,7 +353,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typescript@patch:typescript@npm%3A^5.8.3#optional!builtin<compat/typescript>":
|
||||
"typescript@patch:typescript@npm%3A^5.9.3#optional!builtin<compat/typescript>":
|
||||
version: 5.9.3
|
||||
resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin<compat/typescript>::version=5.9.3&hash=5786d5"
|
||||
bin:
|
||||
@@ -363,10 +363,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici-types@npm:~7.16.0":
|
||||
version: 7.16.0
|
||||
resolution: "undici-types@npm:7.16.0"
|
||||
checksum: 10c0/3033e2f2b5c9f1504bdc5934646cb54e37ecaca0f9249c983f7b1fc2e87c6d18399ebb05dc7fd5419e02b2e915f734d872a65da2e3eeed1813951c427d33cc9a
|
||||
"undici-types@npm:~7.18.0":
|
||||
version: 7.18.2
|
||||
resolution: "undici-types@npm:7.18.2"
|
||||
checksum: 10c0/85a79189113a238959d7a647368e4f7c5559c3a404ebdb8fc4488145ce9426fcd82252a844a302798dfc0e37e6fb178ff481ed03bc4caf634c5757d9ef43521d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user