mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-02 09:48:01 +00:00
Compare commits
98 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9cb400dd3f | |||
| fce649619a | |||
| 8b0148e468 | |||
| 9cb27eb9dc | |||
| f1ed88a98e | |||
| ec35f1cb1e | |||
| dab8504cfd | |||
| 0f9a76e36f | |||
|
|
97244d5287 | ||
| 50ea9bea89 | |||
| 688469ad8b | |||
|
|
af32914d71 | ||
|
|
840bd85232 | ||
| c81ee240bf | |||
| e215fe0a2f | |||
| 38e340ac8d | |||
| c9383f955c | |||
| 8eeaea802a | |||
| d626731736 | |||
| e459cd99e7 | |||
| 3e4391adda | |||
| a6400943d2 | |||
| 5ec8e89641 | |||
|
|
115dac4fb4 | ||
|
|
405e2d5c77 | ||
| 535925aeaf | |||
|
|
7fa29ae3d6 | ||
|
|
b1a01b6717 | ||
|
|
b9d2ee01ed | ||
| e81938a04d | |||
| 3bbcb248ba | |||
| 17194755e6 | |||
| 45f95422ef | |||
| b8f0bb570e | |||
| a0d8069455 | |||
|
|
8b1eb0a582 | ||
|
|
9cb10250c5 | ||
| 2836ed19cf | |||
| 21eb5086a9 | |||
| 56f49ab314 | |||
| 5e1a2d0dd0 | |||
| 5fdd26bf80 | |||
| 0c93dd9ad8 | |||
| 9deb613b5b | |||
|
|
bf4031c238 | ||
| 087b33cc97 | |||
|
|
361657cdec | ||
| 4855e56f3c | |||
| c119d4c20b | |||
| 4815e8678b | |||
| 31a45fed19 | |||
| 5aae400c92 | |||
| 26e11047ce | |||
| 1f0826c7e7 | |||
| 9f71f3c8aa | |||
| 5d929c6466 | |||
| afc04db93a | |||
|
|
eca0321e21 | ||
| def3372b9a | |||
|
|
5aaa177756 | ||
| 31a6ea351d | |||
| 333995c7f4 | |||
| d6b24c27a1 | |||
| 89ae4003f9 | |||
| 7a008c3ae8 | |||
| a6f89e80bd | |||
| 3d987e491e | |||
| e1729fd925 | |||
| 4e5dae4161 | |||
| 6b30ebfddb | |||
|
|
0aafae5d97 | ||
| 32cc561d20 | |||
| 784fddea64 | |||
| 0a058aaf22 | |||
| ff6876a56d | |||
| ccbd29fc40 | |||
| 9251225d3e | |||
| 241eed66f5 | |||
| 6de8e92968 | |||
| 2cdda605ef | |||
| 87a4ec8ecf | |||
| 87613d10ec | |||
| f6dc193f6a | |||
| 4adbbdb47a | |||
| bdbe10f612 | |||
| 531488001f | |||
| 4f2b47d5c3 | |||
|
|
dfbdb89aca | ||
|
|
c9489ae50f | ||
| 9fdb4cdfb0 | |||
| f4da515120 | |||
| fae9665671 | |||
| d5e34d168b | |||
| e8b43d76dc | |||
| 4f9757ad2b | |||
| 611a3bfa72 | |||
| 10da4ea372 | |||
| 68525d5ae4 |
@@ -14,7 +14,7 @@ max_line_length = 100
|
|||||||
[*.lua]
|
[*.lua]
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
|
|
||||||
[*.php]
|
[*.{php,fish}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[.git{ignore,modules}]
|
[.git{ignore,modules}]
|
||||||
|
|||||||
18
.github/workflows/changelog.yml
vendored
18
.github/workflows/changelog.yml
vendored
@@ -1,18 +1,32 @@
|
|||||||
---
|
---
|
||||||
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Debug Changelog # Workflow name displayed on GitHub
|
name: Debug Changelog # Workflow name displayed on GitHub
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: # Trigger manually
|
workflow_dispatch: # Trigger manually
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
debug-changelog:
|
debug-changelog:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Create changelog text
|
- name: Create changelog text
|
||||||
id: changelog
|
id: changelog
|
||||||
uses: loopwerk/tag-changelog@v1
|
uses: loopwerk/tag-changelog@941366edb8920e2071eae0449031830984b9f26e # v1.3.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
config_file: .github/tag-changelog-config.js
|
config_file: .github/tag-changelog-config.js
|
||||||
|
|
||||||
- name: 'Echo results'
|
- name: 'Echo results'
|
||||||
id: output-changelog
|
id: output-changelog
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
28
.github/workflows/linters.yml
vendored
28
.github/workflows/linters.yml
vendored
@@ -1,29 +1,47 @@
|
|||||||
---
|
---
|
||||||
name: reviewdog
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
|
name: Reviewdog
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linters:
|
linters:
|
||||||
name: Linters
|
name: Linters
|
||||||
|
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: GitHub Actions
|
- name: GitHub Actions
|
||||||
uses: reviewdog/action-actionlint@v1
|
uses: reviewdog/action-actionlint@a5524e1c19e62881d79c1f1b9b6f09f16356e281 # v1.65.2
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
reporter: github-pr-review
|
reporter: github-pr-review
|
||||||
|
|
||||||
- name: detect-secrets
|
- name: detect-secrets
|
||||||
uses: reviewdog/action-detect-secrets@master
|
uses: reviewdog/action-detect-secrets@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
reporter: github-pr-review
|
reporter: github-pr-review
|
||||||
|
|
||||||
- name: markdownlint
|
- name: markdownlint
|
||||||
uses: reviewdog/action-markdownlint@v0
|
uses: reviewdog/action-markdownlint@3667398db9118d7e78f7a63d10e26ce454ba5f58 # v0.26.2
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
reporter: github-pr-review
|
reporter: github-pr-review
|
||||||
|
|
||||||
- name: shfmt
|
- name: shfmt
|
||||||
uses: reviewdog/action-shfmt@v1
|
uses: reviewdog/action-shfmt@d8f080930b9be5847b4f97e9f4122b81a82aaeac # v1.0.4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shfmt_flags: |
|
shfmt_flags: |
|
||||||
|
|||||||
28
.github/workflows/new-release.yml
vendored
28
.github/workflows/new-release.yml
vendored
@@ -1,38 +1,48 @@
|
|||||||
---
|
---
|
||||||
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Release Daily State
|
name: Release Daily State
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
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
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
new-daily-release:
|
new-daily-release:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
permissions:
|
|
||||||
contents: write
|
permissions: write-all
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
created: ${{ steps.daily-version.outputs.created }}
|
created: ${{ steps.daily-version.outputs.created }}
|
||||||
version: ${{ steps.daily-version.outputs.version }}
|
version: ${{ steps.daily-version.outputs.version }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
|
||||||
- name: Create tag if necessary
|
- name: Create tag if necessary
|
||||||
uses: fregante/daily-version-action@v2
|
uses: fregante/daily-version-action@fb1a60b7c4daf1410cd755e360ebec3901e58588 # v2.1.3
|
||||||
id: daily-version
|
id: daily-version
|
||||||
|
|
||||||
- name: Create changelog text
|
- name: Create changelog text
|
||||||
if: steps.daily-version.outputs.created
|
if: steps.daily-version.outputs.created
|
||||||
id: changelog
|
id: changelog
|
||||||
uses: loopwerk/tag-changelog@v1
|
uses: loopwerk/tag-changelog@941366edb8920e2071eae0449031830984b9f26e # v1.3.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
config_file: .github/tag-changelog-config.js
|
config_file: .github/tag-changelog-config.js
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
if: steps.daily-version.outputs.created
|
if: steps.daily-version.outputs.created
|
||||||
uses: actions/create-release@latest
|
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag_name: ${{ steps.daily-version.outputs.version }}
|
tag_name: ${{ steps.daily-version.outputs.version }}
|
||||||
release_name: Release ${{ steps.daily-version.outputs.version }}
|
name: Release ${{ steps.daily-version.outputs.version }}
|
||||||
body: ${{ steps.changelog.outputs.changes }}
|
body: ${{ steps.changelog.outputs.changes }}
|
||||||
|
|||||||
20
.github/workflows/pre-commit-autoupdate.yml
vendored
20
.github/workflows/pre-commit-autoupdate.yml
vendored
@@ -1,21 +1,35 @@
|
|||||||
---
|
---
|
||||||
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Pre-commit autoupdate
|
name: Pre-commit autoupdate
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# At 04:00 on Monday and Thursday.
|
# At 04:00 on Monday and Thursday.
|
||||||
- cron: "0 4 * * 1,4"
|
- cron: "0 4 * * 1,4"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-update:
|
auto-update:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
- uses: actions/setup-python@v5.4.0
|
|
||||||
|
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||||
|
|
||||||
- run: pip install pre-commit && pre-commit autoupdate
|
- run: pip install pre-commit && pre-commit autoupdate
|
||||||
- uses: peter-evans/create-pull-request@v7
|
|
||||||
|
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: update/pre-commit-hooks
|
branch: update/pre-commit-hooks
|
||||||
|
|||||||
10
.github/workflows/semantic-pr.yml
vendored
10
.github/workflows/semantic-pr.yml
vendored
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Semantic PR
|
name: Semantic PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -8,11 +9,18 @@ on:
|
|||||||
- edited
|
- edited
|
||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
semantic-pr:
|
semantic-pr:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: amannn/action-semantic-pull-request@v5.5.3
|
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|||||||
11
.github/workflows/sync-labels.yml
vendored
11
.github/workflows/sync-labels.yml
vendored
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Sync labels
|
name: Sync labels
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
# yamllint disable-line rule:truthy
|
||||||
@@ -14,10 +15,18 @@ on:
|
|||||||
workflow_call:
|
workflow_call:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
SyncLabels:
|
SyncLabels:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: ivuorinen/actions/sync-labels@main
|
- uses: ivuorinen/actions/sync-labels@main
|
||||||
|
|||||||
44
.github/workflows/update-submodules.yml
vendored
44
.github/workflows/update-submodules.yml
vendored
@@ -1,39 +1,55 @@
|
|||||||
---
|
---
|
||||||
|
# yaml-language-server: https://json.schemastore.org/github-workflow.json
|
||||||
name: Update submodules
|
name: Update submodules
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# At 04:00 on Monday and Thursday.
|
# At 04:00 on Monday and Thursday.
|
||||||
- cron: "0 4 * * 1,4"
|
- cron: "0 4 * * 1"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-submodules:
|
update-submodules:
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 2
|
||||||
token: ${{secrets.GITHUB_TOKEN}}
|
token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
|
||||||
- name: Config Git User
|
- name: Config Git User
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "${{ github.actor }}"
|
git config --global user.name "${{ github.actor }}"
|
||||||
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
||||||
|
|
||||||
- name: Update submodules
|
- name: Update submodules
|
||||||
run: |
|
run: |
|
||||||
if git commit -am"chore(git): Update submodules (automated)
|
git submodule sync
|
||||||
|
git submodule foreach --quiet '
|
||||||
$(git submodule --quiet foreach \
|
tag="$(git describe --tags --abbrev=0 origin/HEAD)"
|
||||||
'tag="$(git describe --tags --abbrev=0 origin/HEAD)"
|
|
||||||
if [ "$(git describe --tags)" != "$tag" ]; then
|
if [ "$(git describe --tags)" != "$tag" ]; then
|
||||||
git checkout --quiet "$tag"
|
git checkout --quiet "$tag"
|
||||||
echo "$name" "$tag"
|
echo "$name updated to $tag"
|
||||||
fi')"
|
fi
|
||||||
then
|
'
|
||||||
|
|
||||||
|
if git diff --quiet; then
|
||||||
|
echo "No updates for submodules."
|
||||||
|
else
|
||||||
|
git add .
|
||||||
|
git commit -m "chore(git): Update submodules (automated)"
|
||||||
git show --raw
|
git show --raw
|
||||||
git push
|
git push
|
||||||
fi
|
fi
|
||||||
|
|||||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -3,6 +3,8 @@
|
|||||||
*.bak
|
*.bak
|
||||||
*.log
|
*.log
|
||||||
*.socket
|
*.socket
|
||||||
|
*.swp
|
||||||
|
*.old
|
||||||
*cache
|
*cache
|
||||||
.env
|
.env
|
||||||
.idea
|
.idea
|
||||||
@@ -22,6 +24,10 @@ config/npm/npmrc
|
|||||||
config/nvim/lazy-lock.json
|
config/nvim/lazy-lock.json
|
||||||
config/nvim/spell/*
|
config/nvim/spell/*
|
||||||
!config/nvim/spell/.gitkeep
|
!config/nvim/spell/.gitkeep
|
||||||
|
config/git/local.d/*
|
||||||
|
!config/git/local.d/.gitkeep
|
||||||
|
config/vim/fzf
|
||||||
|
config/vim/plugged/*
|
||||||
config/zed/*
|
config/zed/*
|
||||||
!config/zed/settings.json
|
!config/zed/settings.json
|
||||||
config/zsh/.zcompdump
|
config/zsh/.zcompdump
|
||||||
@@ -34,3 +40,9 @@ node_modules
|
|||||||
ssh/local.d/*
|
ssh/local.d/*
|
||||||
!ssh/local.d/.gitkeep
|
!ssh/local.d/.gitkeep
|
||||||
config/fish/fish_variables
|
config/fish/fish_variables
|
||||||
|
**/exports-secret.fish
|
||||||
|
config/fish/completions/asdf.fish
|
||||||
|
config/vim/.netrwhist
|
||||||
|
config/vim/extra/*
|
||||||
|
config/gh/hosts.yml
|
||||||
|
dependency-check-report.html
|
||||||
|
|||||||
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -74,18 +74,9 @@
|
|||||||
url = https://github.com/erikw/tmux-dark-notify.git
|
url = https://github.com/erikw/tmux-dark-notify.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "asdf"]
|
|
||||||
path = local/bin/asdf
|
|
||||||
url = https://github.com/asdf-vm/asdf.git
|
|
||||||
ignore = dirty
|
|
||||||
|
|
||||||
[submodule "antidote"]
|
[submodule "antidote"]
|
||||||
path = tools/antidote
|
path = tools/antidote
|
||||||
url = https://github.com/mattmc3/antidote.git
|
url = https://github.com/mattmc3/antidote.git
|
||||||
shallow = true
|
shallow = true
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "dotbot-asdf"]
|
|
||||||
path = tools/dotbot-asdf
|
|
||||||
url = https://github.com/sobolevn/dotbot-asdf
|
|
||||||
ignore = dirty
|
|
||||||
|
|||||||
3
.ignore
3
.ignore
@@ -1,7 +1,10 @@
|
|||||||
|
**/__pycache__/**
|
||||||
.git/**
|
.git/**
|
||||||
config/cheat/cheatsheets/community/**
|
config/cheat/cheatsheets/community/**
|
||||||
|
config/tmux/plugins/**
|
||||||
node_modules
|
node_modules
|
||||||
tools/antidote/**
|
tools/antidote/**
|
||||||
tools/dotbot-brew/**
|
tools/dotbot-brew/**
|
||||||
tools/dotbot-include/**
|
tools/dotbot-include/**
|
||||||
tools/dotbot/**
|
tools/dotbot/**
|
||||||
|
*.pyc
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ repos:
|
|||||||
args: [-c, .markdownlint.json, --fix]
|
args: [-c, .markdownlint.json, --fix]
|
||||||
|
|
||||||
- repo: https://github.com/adrienverge/yamllint
|
- repo: https://github.com/adrienverge/yamllint
|
||||||
rev: v1.35.1
|
rev: v1.37.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: yamllint
|
- id: yamllint
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ repos:
|
|||||||
- id: shellcheck
|
- id: shellcheck
|
||||||
|
|
||||||
- repo: https://github.com/scop/pre-commit-shfmt
|
- repo: https://github.com/scop/pre-commit-shfmt
|
||||||
rev: v3.10.0-2
|
rev: v3.11.0-1
|
||||||
hooks:
|
hooks:
|
||||||
- id: shfmt
|
- id: shfmt
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ repos:
|
|||||||
- id: actionlint
|
- id: actionlint
|
||||||
|
|
||||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||||
rev: 39.174.3
|
rev: 39.222.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: renovate-config-validator
|
- id: renovate-config-validator
|
||||||
|
|
||||||
@@ -57,3 +57,9 @@ repos:
|
|||||||
rev: v2.0.2
|
rev: v2.0.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: stylua # or stylua-system / stylua-github
|
- id: stylua # or stylua-system / stylua-github
|
||||||
|
|
||||||
|
- repo: https://github.com/hugoh/pre-commit-fish.git
|
||||||
|
rev: v1.2
|
||||||
|
hooks:
|
||||||
|
- id: fish_syntax
|
||||||
|
- id: fish_indent
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
git submodule sync --recursive
|
||||||
|
|
||||||
# dotbot and plugins
|
# dotbot and plugins
|
||||||
git submodule add --name dotbot \
|
git submodule add --name dotbot \
|
||||||
-f https://github.com/anishathalye/dotbot.git tools/dotbot
|
-f https://github.com/anishathalye/dotbot.git tools/dotbot
|
||||||
@@ -9,16 +11,12 @@ git submodule add --name dotbot-include \
|
|||||||
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
|
-f https://gitlab.com/gnfzdz/dotbot-include.git tools/dotbot-include
|
||||||
git submodule add --name dotbot-pip \
|
git submodule add --name dotbot-pip \
|
||||||
-f https://github.com/sobolevn/dotbot-pip.git tools/dotbot-pip
|
-f https://github.com/sobolevn/dotbot-pip.git tools/dotbot-pip
|
||||||
git submodule add --name dotbot-asdf \
|
|
||||||
-f https://github.com/sobolevn/dotbot-asdf tools/dotbot-asdf
|
|
||||||
|
|
||||||
# other repos
|
# other repos
|
||||||
git submodule add --name cheat-community \
|
git submodule add --name cheat-community \
|
||||||
-f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
|
-f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
|
||||||
git submodule add --name cheat-tldr \
|
git submodule add --name cheat-tldr \
|
||||||
-f https://github.com/ivuorinen/cheatsheet-tldr.git config/cheat/cheatsheets/tldr
|
-f https://github.com/ivuorinen/cheatsheet-tldr.git config/cheat/cheatsheets/tldr
|
||||||
git submodule add --name asdf \
|
|
||||||
-f https://github.com/asdf-vm/asdf.git local/bin/asdf
|
|
||||||
git submodule add --name antidote \
|
git submodule add --name antidote \
|
||||||
--depth 1 \
|
--depth 1 \
|
||||||
-f https://github.com/mattmc3/antidote.git tools/antidote
|
-f https://github.com/mattmc3/antidote.git tools/antidote
|
||||||
@@ -53,10 +51,21 @@ done
|
|||||||
git config -f .gitmodules submodule.antidote.shallow true
|
git config -f .gitmodules submodule.antidote.shallow true
|
||||||
|
|
||||||
# remove old submodules
|
# remove old submodules
|
||||||
[ -d "config/tmux/plugins/tpm" ] && rm -rf config/tmux/plugins/tpm
|
folders=(
|
||||||
[ -d "config/tmux/plugins/tmux" ] && rm -rf config/tmux/plugins/tmux
|
"config/tmux/plugins/tpm"
|
||||||
[ -d "config/tmux/plugins/tmux-menus" ] && rm -rf config/tmux/plugins/tmux-menus
|
"config/tmux/plugins/tmux"
|
||||||
[ -d "config/tmux/plugins/tmux-resurrect" ] && rm -rf config/tmux/plugins/tmux-resurrect
|
"config/tmux/plugins/tmux-menus"
|
||||||
[ -d "tools/dotbot-crontab" ] && rm -rf tools/dotbot-crontab
|
"config/tmux/plugins/tmux-resurrect"
|
||||||
[ -d "tools/dotbot-snap" ] && rm -rf tools/dotbot-snap
|
"tools/dotbot-crontab"
|
||||||
[ -d "config/nvim-kickstart" ] && rm -rf config/nvim-kickstart
|
"tools/dotbot-snap"
|
||||||
|
"config/nvim-kickstart"
|
||||||
|
"local/bin/asdf"
|
||||||
|
"local/asdf"
|
||||||
|
"tools/dotbot-asdf"
|
||||||
|
)
|
||||||
|
|
||||||
|
for folder in "${folders[@]}"; do
|
||||||
|
[ -d "$folder" ] \
|
||||||
|
&& rm -rf "$folder" \
|
||||||
|
&& msgr run_done "Removed old submodule $folder"
|
||||||
|
done
|
||||||
|
|||||||
@@ -25,3 +25,6 @@ x-have antidot && {
|
|||||||
PROMPT_DIRTRIM=3
|
PROMPT_DIRTRIM=3
|
||||||
PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null)'
|
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\] '
|
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\] '
|
||||||
|
|
||||||
|
# Added by LM Studio CLI (lms)
|
||||||
|
export PATH="$PATH:$HOME/.lmstudio/bin"
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
use node
|
use node
|
||||||
use asdf
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
lts/*
|
v22.14.0
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
golang 1.23.4
|
|
||||||
rust 1.83.0
|
|
||||||
direnv 2.35.0
|
|
||||||
fd 10.2.0
|
|
||||||
1password-cli 2.30.3
|
|
||||||
age 1.2.1
|
|
||||||
dotenv-linter 3.3.0
|
|
||||||
editorconfig-checker 2.8.0
|
|
||||||
github-cli 2.64.0
|
|
||||||
hadolint 2.12.0
|
|
||||||
kubectl 1.32.0
|
|
||||||
pre-commit 4.0.1
|
|
||||||
ripgrep 14.1.1
|
|
||||||
shellcheck 0.10.0
|
|
||||||
shfmt 3.10.0
|
|
||||||
terragrunt 0.71.1
|
|
||||||
tf-summarize 0.3.14
|
|
||||||
yamllint 1.35.1
|
|
||||||
yq 4.44.6
|
|
||||||
@@ -12,7 +12,6 @@ export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/nvim/mason/bin:$L
|
|||||||
export SHARED_SCRIPTS_SOURCED=0
|
export SHARED_SCRIPTS_SOURCED=0
|
||||||
|
|
||||||
source "$DOTFILES/config/shared.sh"
|
source "$DOTFILES/config/shared.sh"
|
||||||
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
|
|
||||||
|
|
||||||
# zsh completions directory
|
# zsh completions directory
|
||||||
[ -z "$ZSH_COMPLETIONS" ] && export ZSH_COMPLETIONS="$XDG_CONFIG_HOME/zsh/completion"
|
[ -z "$ZSH_COMPLETIONS" ] && export ZSH_COMPLETIONS="$XDG_CONFIG_HOME/zsh/completion"
|
||||||
@@ -23,7 +22,6 @@ FPATH="$ZSH_COMPLETIONS:$FPATH"
|
|||||||
ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
||||||
|
|
||||||
source "$DOTFILES/config/zsh/antidote.zsh"
|
source "$DOTFILES/config/zsh/antidote.zsh"
|
||||||
# source "$DOTFILES/config/zsh/prompt.zsh"
|
|
||||||
|
|
||||||
# Function to source FZF configuration
|
# Function to source FZF configuration
|
||||||
source_fzf_config()
|
source_fzf_config()
|
||||||
@@ -51,10 +49,6 @@ setup_tmux_window_name_plugin()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -n $GHOSTTY_RESOURCES_DIR ]]; then
|
|
||||||
source "$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration
|
|
||||||
fi
|
|
||||||
|
|
||||||
source_fzf_config
|
source_fzf_config
|
||||||
setup_tmux_window_name_plugin
|
setup_tmux_window_name_plugin
|
||||||
x-have antidot && eval "$(antidot init)"
|
x-have antidot && eval "$(antidot init)"
|
||||||
@@ -66,3 +60,6 @@ bashcompinit
|
|||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
export P10K_CONFIG="$DOTFILES/config/zsh/p10k.zsh"
|
export P10K_CONFIG="$DOTFILES/config/zsh/p10k.zsh"
|
||||||
[[ ! -f "$P10K_CONFIG" ]] || source "$P10K_CONFIG"
|
[[ ! -f "$P10K_CONFIG" ]] || source "$P10K_CONFIG"
|
||||||
|
|
||||||
|
# Added by LM Studio CLI (lms)
|
||||||
|
export PATH="$PATH:$HOME/.lmstudio/bin"
|
||||||
|
|||||||
@@ -115,6 +115,13 @@ run = ['layout floating']
|
|||||||
if.app-id = 'com.apple.backup.launcher' # TimeMachine
|
if.app-id = 'com.apple.backup.launcher' # TimeMachine
|
||||||
run = ['layout floating']
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.philipyoungg.session-setapp' # Session app (Setapp)
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
|
[[on-window-detected]]
|
||||||
|
if.app-id = 'com.microsoft.rdc.macos' # Remote Desktop
|
||||||
|
run = ['layout floating']
|
||||||
|
|
||||||
# Possible values: (qwerty|dvorak)
|
# Possible values: (qwerty|dvorak)
|
||||||
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ x-have eza && {
|
|||||||
alias ls="eza -h -s=type --git --icons --group-directories-first"
|
alias ls="eza -h -s=type --git --icons --group-directories-first"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alias vim='vim -u "$XDG_CONFIG_HOME/vim/vimrc"'
|
||||||
|
|
||||||
# Easier navigation: .., ..., ....
|
# Easier navigation: .., ..., ....
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
alias ...="cd ../.."
|
alias ...="cd ../.."
|
||||||
|
|||||||
21
config/aqua/aqua.yaml
Normal file
21
config/aqua/aqua.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/aqua-yaml.json
|
||||||
|
# aqua - Declarative CLI Version Manager
|
||||||
|
# https://aquaproj.github.io/
|
||||||
|
# checksum:
|
||||||
|
# enabled: true
|
||||||
|
# require_checksum: true
|
||||||
|
# supported_envs:
|
||||||
|
# - all
|
||||||
|
registries:
|
||||||
|
- type: standard
|
||||||
|
ref: v4.331.0 # renovate: depName=aquaproj/aqua-registry
|
||||||
|
packages:
|
||||||
|
- name: cli/cli
|
||||||
|
version: 'v2.69.0'
|
||||||
|
- name: junegunn/fzf
|
||||||
|
version: 'v0.60.3'
|
||||||
|
- name: jqlang/jq
|
||||||
|
version: 'jq-1.7.1'
|
||||||
|
- name: 1password/cli
|
||||||
|
version: '2.30.3'
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
|
|
||||||
export ASDF_DIRENV_BIN="$(asdf where direnv)/bin/direnv"
|
|
||||||
eval "$($ASDF_DIRENV_BIN hook zsh)"
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
// These are golang packages I use,
|
// These are golang packages I use,
|
||||||
// so they should be available with all versions
|
// so they should be available with all versions
|
||||||
|
|
||||||
|
// Aqua is a package manager like asdf, or Brew
|
||||||
|
github.com/aquaproj/aqua/v2/cmd/aqua@latest
|
||||||
// Git Profile allows you to switch between user profiles in git repos
|
// Git Profile allows you to switch between user profiles in git repos
|
||||||
github.com/dotzero/git-profile@v1.4.0
|
github.com/dotzero/git-profile@v1.4.0
|
||||||
// An extensible command line tool or library to format yaml files.
|
// An extensible command line tool or library to format yaml files.
|
||||||
|
|||||||
@@ -291,35 +291,6 @@ hash shopt 2> /dev/null && shopt -s checkwinsize
|
|||||||
# shellcheck disable=SC2155
|
# shellcheck disable=SC2155
|
||||||
export SHORT_HOST=$(hostname -s)
|
export SHORT_HOST=$(hostname -s)
|
||||||
|
|
||||||
# asdf
|
|
||||||
# https://github.com/asdf-vm/asdf
|
|
||||||
msg "Setting up asdf configuration"
|
|
||||||
export ASDF_DIR="${HOME}/.local/asdf"
|
|
||||||
[[ -d $ASDF_DIR ]] && {
|
|
||||||
# [[ -d $ASDF_DIR/completions ]] && FPATH="$ASDF_DIR/completions:$FPATH"
|
|
||||||
# [[ -d $ASDF_DIR/plugins ]] && FPATH="$ASDF_DIR/plugins:$FPATH"
|
|
||||||
|
|
||||||
export ASDF_CONFIG_FILE="${XDG_CONFIG_HOME}/asdf/asdfrc"
|
|
||||||
export ASDF_DATA_DIR="${ASDF_DIR}"
|
|
||||||
export ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME="${XDG_CONFIG_HOME}/asdf/plugin-versions"
|
|
||||||
export ASDF_LOG_FILE="${XDG_CACHE_HOME}/asdf/asdf.log"
|
|
||||||
export ASDF_FORCE_PREPEND=yes
|
|
||||||
## Default package files
|
|
||||||
export ASDF_CRATE_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/cargo-packages"
|
|
||||||
export ASDF_GEM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/gem-packages"
|
|
||||||
export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/golang-packages"
|
|
||||||
export ASDF_NPM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/npm-packages"
|
|
||||||
export ASDF_PYTHON_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/python-packages"
|
|
||||||
## Plugin configuration
|
|
||||||
export ASDF_DIRENV_IGNORE_MISSING_PLUGINS=1
|
|
||||||
export ASDF_GOLANG_MOD_VERSION_ENABLED=true
|
|
||||||
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY="latest_available"
|
|
||||||
## Add asdf to path
|
|
||||||
export PATH="${ASDF_DIR}/bin:${PATH}"
|
|
||||||
|
|
||||||
source "$ASDF_DIR/asdf.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Antidote configuration
|
# Antidote configuration
|
||||||
# https://getantidote.github.io/
|
# https://getantidote.github.io/
|
||||||
msg "Setting up Antidote configuration"
|
msg "Setting up Antidote configuration"
|
||||||
@@ -489,4 +460,3 @@ export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
|
|||||||
[ -f "$XDG_CONFIG_HOME/exports-local" ] && source "$XDG_CONFIG_HOME/exports-local"
|
[ -f "$XDG_CONFIG_HOME/exports-local" ] && source "$XDG_CONFIG_HOME/exports-local"
|
||||||
[ -f "$XDG_CONFIG_HOME/exports-$(hostname)" ] && source "$XDG_CONFIG_HOME/exports-$(hostname)"
|
[ -f "$XDG_CONFIG_HOME/exports-$(hostname)" ] && source "$XDG_CONFIG_HOME/exports-$(hostname)"
|
||||||
[ -f "$XDG_CONFIG_HOME/exports-$(hostname)-secret" ] && source "$XDG_CONFIG_HOME/exports-$(hostname)-secret"
|
[ -f "$XDG_CONFIG_HOME/exports-$(hostname)-secret" ] && source "$XDG_CONFIG_HOME/exports-$(hostname)-secret"
|
||||||
|
|
||||||
|
|||||||
108
config/fish/alias.fish
Normal file
108
config/fish/alias.fish
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# Set aliases for fish shell
|
||||||
|
|
||||||
|
alias vim='vim -u "$XDG_CONFIG_HOME/vim/vimrc"'
|
||||||
|
|
||||||
|
# eza aliases if eza is installed
|
||||||
|
if type -q eza >/dev/null
|
||||||
|
function eza_git -d "Use eza and its git options if in a git repo"
|
||||||
|
if git rev-parse --is-inside-work-tree &>/dev/null
|
||||||
|
eza --group-directories-first --icons=always --smart-group --git $argv
|
||||||
|
else
|
||||||
|
eza --group-directories-first --icons=always --smart-group $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function lsa --wraps='eza_git -al' --description 'eza -al'
|
||||||
|
eza_git -al $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
function ls --wraps='eza_git' --description eza
|
||||||
|
eza_git $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
function ll --wraps='eza_git -l' --description 'eza -l'
|
||||||
|
eza_git -l $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
function l --wraps='eza_git' --description eza
|
||||||
|
eza_git $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Edit fish alias file
|
||||||
|
function .a --wraps='nvim ~/.dotfiles/config/fish/alias.fish' --description 'edit alias.fish'
|
||||||
|
nvim ~/.dotfiles/config/fish/alias.fish $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
# Go to the directory where my projects are stored
|
||||||
|
function .c --wraps='cd ~/Code' --description 'cd ~/Code'
|
||||||
|
cd ~/Code $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
# Go to the directory where the dotfiles are stored
|
||||||
|
function .d --wraps='cd ~/.dotfiles' --description 'cd ~/.dotfiles'
|
||||||
|
cd ~/.dotfiles $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
# Go to the directory where my work codes are stored
|
||||||
|
function .s --wraps='cd ~/Code/s' --description 'cd ~/Code/s'
|
||||||
|
cd ~/Code/s $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
# Go to the directory where my personal codes are stored
|
||||||
|
function .p --wraps='cd ~/Code/ivuorinen' --description 'cd ~/Code/ivuorinen'
|
||||||
|
cd ~/Code/ivuorinen $argv
|
||||||
|
end
|
||||||
|
|
||||||
|
# shortcut to commit with a message
|
||||||
|
function commit --wraps='git commit -a -m "chore: automated commit"' --description 'commit shortcut'
|
||||||
|
set -l commitMessage $argv
|
||||||
|
git add .
|
||||||
|
|
||||||
|
if test -z "$commitMessage"
|
||||||
|
if type -q aicommits
|
||||||
|
aicommits --type conventional
|
||||||
|
else
|
||||||
|
git commit -a -m "chore: automated commit"
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
git commit -a -m "$commitMessage"
|
||||||
|
end
|
||||||
|
|
||||||
|
function configure_tide --description 'Configure tide with the lean style and my preferences'
|
||||||
|
tide configure \
|
||||||
|
--auto \
|
||||||
|
--style=Lean \
|
||||||
|
--prompt_colors='True color' \
|
||||||
|
--show_time=No \
|
||||||
|
--lean_prompt_height='Two lines' \
|
||||||
|
--prompt_connection=Disconnected \
|
||||||
|
--prompt_spacing=Sparse \
|
||||||
|
--icons='Many icons' \
|
||||||
|
--transient=Yes
|
||||||
|
end
|
||||||
|
|
||||||
|
# Abbreviations for git
|
||||||
|
abbr --add gau git add -u
|
||||||
|
abbr --add gaa git add -A
|
||||||
|
abbr --add gcv git commit -v
|
||||||
|
|
||||||
|
# Abbreviations for composer
|
||||||
|
abbr --add c composer
|
||||||
|
abbr --add cu composer update
|
||||||
|
abbr --add ci composer install
|
||||||
|
|
||||||
|
# Abbreviations for php artisan
|
||||||
|
abbr --add .pa php artisan
|
||||||
|
abbr --add .paf php artisan fresh
|
||||||
|
abbr --add .pam php artisan migrate
|
||||||
|
abbr --add .pams php artisan migrate --seed
|
||||||
|
abbr --add .pat php artisan test
|
||||||
|
|
||||||
|
# Abbreviations for npm
|
||||||
|
abbr --add .n npm
|
||||||
|
abbr --add .nt npm test --if-present
|
||||||
|
abbr --add .nb npm run build --if-present
|
||||||
|
abbr --add .ns npm run start --if-present
|
||||||
125
config/fish/completions/aqua.fish
Normal file
125
config/fish/completions/aqua.fish
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
# aqua fish shell completion
|
||||||
|
|
||||||
|
function __fish_aqua_no_subcommand --description 'Test if there has been any subcommand yet'
|
||||||
|
for i in (commandline -opc)
|
||||||
|
if contains -- $i init install i generate g update-aqua upa update-checksum upc update up completion bash zsh fish help h help h which info remove rm vacuum cp policy allow deny init init-policy exec list generate-registry gr version root-dir help h
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l log-level -r -d 'log level'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l config -s c -r -d 'configuration file path'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l disable-cosign -d 'Disable Cosign verification'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l disable-slsa -d 'Disable SLSA verification'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l disable-github-artifact-attestation -d 'Disable GitHub Artifact Attestations verification'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l trace -r -d 'trace output file path'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l cpu-profile -r -d 'cpu profile output file path'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l help -s h -d 'show help'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l version -s v -d 'print the version'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l help -s h -d 'show help'
|
||||||
|
complete -c aqua -n '__fish_aqua_no_subcommand' -f -l version -s v -d 'print the version'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from init' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'init' -d 'Create a configuration file if it doesn\'t exist'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from init' -f -l use-import-dir -s u -d 'Use import_dir'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from init' -f -l import-dir -s i -r -d 'import_dir'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from init' -f -l create-dir -s d -d 'Create a directory named aqua and create aqua.yaml in it'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from install i' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'install i' -d 'Install tools'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from install i' -f -l only-link -s l -d 'create links but skip downloading packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from install i' -f -l test -d 'This flag was deprecated and had no meaning from aqua v2.0.0. This flag will be removed in aqua v3.0.0. https://github.com/aquaproj/aqua/issues/1691'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from install i' -f -l all -s a -d 'install all aqua configuration packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from install i' -f -l tags -s t -r -d 'filter installed packages with tags'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from install i' -f -l exclude-tags -r -d 'exclude installed packages with tags'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'generate g' -d 'Search packages in registries and output the configuration interactively'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l f -r -d 'the file path of packages list. When the value is "-", the list is passed from the standard input'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l i -d 'Insert packages to configuration file'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l pin -d 'Pin version'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l g -d 'Insert packages in a global configuration file'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l detail -s d -d 'Output additional fields such as description and link'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l o -r -d 'inserted file'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l select-version -s s -d 'Select the installed version interactively. Default to display 30 versions, use --limit/-l to change it.'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate g' -f -l limit -s l -r -d 'The maximum number of versions. Non-positive number refers to no limit.'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update-aqua upa' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'update-aqua upa' -d 'Update aqua'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update-checksum upc' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'update-checksum upc' -d 'Create or Update aqua-checksums.json'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update-checksum upc' -f -l all -s a -d 'Create or Update all aqua-checksums.json including global configuration'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update-checksum upc' -f -l deep -d 'This flag was deprecated and had no meaning from aqua v2.0.0. This flag will be removed in aqua v3.0.0. https://github.com/aquaproj/aqua/issues/1769'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update-checksum upc' -f -l prune -d 'Remove unused checksums'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update up' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'update up' -d 'Update registries and packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update up' -f -l i -d 'Select packages with fuzzy finder'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update up' -f -l select-version -s s -d 'Select the version with fuzzy finder. Default to display 30 versions, use --limit/-l to change it.'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update up' -f -l only-registry -s r -d 'Update only registries'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update up' -f -l only-package -s p -d 'Update only packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update up' -f -l limit -s l -r -d 'The maximum number of versions. Non-positive number refers to no limit.'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update up' -f -l tags -s t -r -d 'filter installed packages with tags'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from update up' -f -l exclude-tags -r -d 'exclude installed packages with tags'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from completion' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'completion' -d 'Output shell completion script for bash, zsh, or fish'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from completion' -f -l help -s h -d 'show help'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from bash' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_seen_subcommand_from completion' -a 'bash' -d 'Output shell completion script for bash'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from zsh' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_seen_subcommand_from completion' -a 'zsh' -d 'Output shell completion script for zsh'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from fish' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_seen_subcommand_from completion' -a 'fish' -d 'Output shell completion script for fish'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from fish' -f -l help -s h -d 'show help'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from help h' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_seen_subcommand_from fish' -a 'help h' -d 'Shows a list of commands or help for one command'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from help h' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_seen_subcommand_from completion' -a 'help h' -d 'Shows a list of commands or help for one command'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from which' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'which' -d 'Output the absolute file path of the given command'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from which' -f -l version -s v -d 'Output the given package version'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from info' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'info' -d 'Show information'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from remove rm' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'remove rm' -d 'Uninstall packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from remove rm' -f -l all -s a -d 'uninstall all packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from remove rm' -f -l mode -s m -r -d 'Removed target modes. l: link, p: package'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from remove rm' -f -l i -d 'Select packages with a Fuzzy Finder'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from vacuum' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'vacuum' -d 'Remove unused installed packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from vacuum' -f -l init -d 'Create timestamp files.'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from vacuum' -f -l days -s d -r -d 'Expiration days'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from cp' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'cp' -d 'Copy executable files in a directory'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from cp' -f -l o -r -d 'destination directory'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from cp' -f -l all -s a -d 'install all aqua configuration packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from cp' -f -l tags -s t -r -d 'filter installed packages with tags'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from cp' -f -l exclude-tags -r -d 'exclude installed packages with tags'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from policy' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'policy' -d 'Manage Policy'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from allow' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_seen_subcommand_from policy' -a 'allow' -d 'Allow a policy file'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from deny' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_seen_subcommand_from policy' -a 'deny' -d 'Deny a policy file'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from init' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_seen_subcommand_from policy' -a 'init' -d 'Create a policy file if it doesn\'t exist'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from init-policy' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'init-policy' -d '[Deprecated] Create a policy file if it doesn\'t exist'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from exec' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'exec' -d 'Execute tool'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from list' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'list' -d 'List packages in Registries'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from list' -f -l installed -s i -d 'List installed packages'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from list' -f -l all -s a -d 'List global configuration packages too'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate-registry gr' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'generate-registry gr' -d 'Generate a registry\'s package configuration'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate-registry gr' -f -l out-testdata -r -d 'A file path where the testdata is outputted'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate-registry gr' -f -l cmd -r -d 'A list of commands joined with commas \',\''
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate-registry gr' -f -l generate-config -s c -r -d 'A configuration file path'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate-registry gr' -f -l limit -s l -r -d 'the maximum number of versions'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate-registry gr' -f -l deep -d 'This flag was deprecated and had no meaning from aqua v2.15.0. This flag will be removed in aqua v3.0.0. https://github.com/aquaproj/aqua/issues/2351'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from generate-registry gr' -f -l init -d 'Generate a configuration file'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from version' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'version' -d 'Show version'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from root-dir' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'root-dir' -d 'Output the aqua root directory (AQUA_ROOT_DIR)'
|
||||||
|
complete -c aqua -n '__fish_seen_subcommand_from help h' -f -l help -s h -d 'show help'
|
||||||
|
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'help h' -d 'Shows a list of commands or help for one command'
|
||||||
|
|
||||||
235
config/fish/completions/docker.fish
Executable file
235
config/fish/completions/docker.fish
Executable file
@@ -0,0 +1,235 @@
|
|||||||
|
# fish completion for docker -*- shell-script -*-
|
||||||
|
|
||||||
|
function __docker_debug
|
||||||
|
set -l file "$BASH_COMP_DEBUG_FILE"
|
||||||
|
if test -n "$file"
|
||||||
|
echo "$argv" >> $file
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __docker_perform_completion
|
||||||
|
__docker_debug "Starting __docker_perform_completion"
|
||||||
|
|
||||||
|
# Extract all args except the last one
|
||||||
|
set -l args (commandline -opc)
|
||||||
|
# Extract the last arg and escape it in case it is a space
|
||||||
|
set -l lastArg (string escape -- (commandline -ct))
|
||||||
|
|
||||||
|
__docker_debug "args: $args"
|
||||||
|
__docker_debug "last arg: $lastArg"
|
||||||
|
|
||||||
|
# Disable ActiveHelp which is not supported for fish shell
|
||||||
|
set -l requestComp "DOCKER_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
|
||||||
|
|
||||||
|
__docker_debug "Calling $requestComp"
|
||||||
|
set -l results (eval $requestComp 2> /dev/null)
|
||||||
|
|
||||||
|
# Some programs may output extra empty lines after the directive.
|
||||||
|
# Let's ignore them or else it will break completion.
|
||||||
|
# Ref: https://github.com/spf13/cobra/issues/1279
|
||||||
|
for line in $results[-1..1]
|
||||||
|
if test (string trim -- $line) = ""
|
||||||
|
# Found an empty line, remove it
|
||||||
|
set results $results[1..-2]
|
||||||
|
else
|
||||||
|
# Found non-empty line, we have our proper output
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l comps $results[1..-2]
|
||||||
|
set -l directiveLine $results[-1]
|
||||||
|
|
||||||
|
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
|
||||||
|
# completions must be prefixed with the flag
|
||||||
|
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
|
||||||
|
|
||||||
|
__docker_debug "Comps: $comps"
|
||||||
|
__docker_debug "DirectiveLine: $directiveLine"
|
||||||
|
__docker_debug "flagPrefix: $flagPrefix"
|
||||||
|
|
||||||
|
for comp in $comps
|
||||||
|
printf "%s%s\n" "$flagPrefix" "$comp"
|
||||||
|
end
|
||||||
|
|
||||||
|
printf "%s\n" "$directiveLine"
|
||||||
|
end
|
||||||
|
|
||||||
|
# this function limits calls to __docker_perform_completion, by caching the result behind $__docker_perform_completion_once_result
|
||||||
|
function __docker_perform_completion_once
|
||||||
|
__docker_debug "Starting __docker_perform_completion_once"
|
||||||
|
|
||||||
|
if test -n "$__docker_perform_completion_once_result"
|
||||||
|
__docker_debug "Seems like a valid result already exists, skipping __docker_perform_completion"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set --global __docker_perform_completion_once_result (__docker_perform_completion)
|
||||||
|
if test -z "$__docker_perform_completion_once_result"
|
||||||
|
__docker_debug "No completions, probably due to a failure"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
__docker_debug "Performed completions and set __docker_perform_completion_once_result"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
# this function is used to clear the $__docker_perform_completion_once_result variable after completions are run
|
||||||
|
function __docker_clear_perform_completion_once_result
|
||||||
|
__docker_debug ""
|
||||||
|
__docker_debug "========= clearing previously set __docker_perform_completion_once_result variable =========="
|
||||||
|
set --erase __docker_perform_completion_once_result
|
||||||
|
__docker_debug "Successfully erased the variable __docker_perform_completion_once_result"
|
||||||
|
end
|
||||||
|
|
||||||
|
function __docker_requires_order_preservation
|
||||||
|
__docker_debug ""
|
||||||
|
__docker_debug "========= checking if order preservation is required =========="
|
||||||
|
|
||||||
|
__docker_perform_completion_once
|
||||||
|
if test -z "$__docker_perform_completion_once_result"
|
||||||
|
__docker_debug "Error determining if order preservation is required"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l directive (string sub --start 2 $__docker_perform_completion_once_result[-1])
|
||||||
|
__docker_debug "Directive is: $directive"
|
||||||
|
|
||||||
|
set -l shellCompDirectiveKeepOrder 32
|
||||||
|
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
|
||||||
|
__docker_debug "Keeporder is: $keeporder"
|
||||||
|
|
||||||
|
if test $keeporder -ne 0
|
||||||
|
__docker_debug "This does require order preservation"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
__docker_debug "This doesn't require order preservation"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# This function does two things:
|
||||||
|
# - Obtain the completions and store them in the global __docker_comp_results
|
||||||
|
# - Return false if file completion should be performed
|
||||||
|
function __docker_prepare_completions
|
||||||
|
__docker_debug ""
|
||||||
|
__docker_debug "========= starting completion logic =========="
|
||||||
|
|
||||||
|
# Start fresh
|
||||||
|
set --erase __docker_comp_results
|
||||||
|
|
||||||
|
__docker_perform_completion_once
|
||||||
|
__docker_debug "Completion results: $__docker_perform_completion_once_result"
|
||||||
|
|
||||||
|
if test -z "$__docker_perform_completion_once_result"
|
||||||
|
__docker_debug "No completion, probably due to a failure"
|
||||||
|
# Might as well do file completion, in case it helps
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l directive (string sub --start 2 $__docker_perform_completion_once_result[-1])
|
||||||
|
set --global __docker_comp_results $__docker_perform_completion_once_result[1..-2]
|
||||||
|
|
||||||
|
__docker_debug "Completions are: $__docker_comp_results"
|
||||||
|
__docker_debug "Directive is: $directive"
|
||||||
|
|
||||||
|
set -l shellCompDirectiveError 1
|
||||||
|
set -l shellCompDirectiveNoSpace 2
|
||||||
|
set -l shellCompDirectiveNoFileComp 4
|
||||||
|
set -l shellCompDirectiveFilterFileExt 8
|
||||||
|
set -l shellCompDirectiveFilterDirs 16
|
||||||
|
|
||||||
|
if test -z "$directive"
|
||||||
|
set directive 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
|
||||||
|
if test $compErr -eq 1
|
||||||
|
__docker_debug "Received error directive: aborting."
|
||||||
|
# Might as well do file completion, in case it helps
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
|
||||||
|
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
|
||||||
|
if test $filefilter -eq 1; or test $dirfilter -eq 1
|
||||||
|
__docker_debug "File extension filtering or directory filtering not supported"
|
||||||
|
# Do full file completion instead
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
|
||||||
|
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
|
||||||
|
|
||||||
|
__docker_debug "nospace: $nospace, nofiles: $nofiles"
|
||||||
|
|
||||||
|
# If we want to prevent a space, or if file completion is NOT disabled,
|
||||||
|
# we need to count the number of valid completions.
|
||||||
|
# To do so, we will filter on prefix as the completions we have received
|
||||||
|
# may not already be filtered so as to allow fish to match on different
|
||||||
|
# criteria than the prefix.
|
||||||
|
if test $nospace -ne 0; or test $nofiles -eq 0
|
||||||
|
set -l prefix (commandline -t | string escape --style=regex)
|
||||||
|
__docker_debug "prefix: $prefix"
|
||||||
|
|
||||||
|
set -l completions (string match -r -- "^$prefix.*" $__docker_comp_results)
|
||||||
|
set --global __docker_comp_results $completions
|
||||||
|
__docker_debug "Filtered completions are: $__docker_comp_results"
|
||||||
|
|
||||||
|
# Important not to quote the variable for count to work
|
||||||
|
set -l numComps (count $__docker_comp_results)
|
||||||
|
__docker_debug "numComps: $numComps"
|
||||||
|
|
||||||
|
if test $numComps -eq 1; and test $nospace -ne 0
|
||||||
|
# We must first split on \t to get rid of the descriptions to be
|
||||||
|
# able to check what the actual completion will be.
|
||||||
|
# We don't need descriptions anyway since there is only a single
|
||||||
|
# real completion which the shell will expand immediately.
|
||||||
|
set -l split (string split --max 1 \t $__docker_comp_results[1])
|
||||||
|
|
||||||
|
# Fish won't add a space if the completion ends with any
|
||||||
|
# of the following characters: @=/:.,
|
||||||
|
set -l lastChar (string sub -s -1 -- $split)
|
||||||
|
if not string match -r -q "[@=/:.,]" -- "$lastChar"
|
||||||
|
# In other cases, to support the "nospace" directive we trick the shell
|
||||||
|
# by outputting an extra, longer completion.
|
||||||
|
__docker_debug "Adding second completion to perform nospace directive"
|
||||||
|
set --global __docker_comp_results $split[1] $split[1].
|
||||||
|
__docker_debug "Completions are now: $__docker_comp_results"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test $numComps -eq 0; and test $nofiles -eq 0
|
||||||
|
# To be consistent with bash and zsh, we only trigger file
|
||||||
|
# completion when there are no other completions
|
||||||
|
__docker_debug "Requesting file completion"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
|
||||||
|
# so we can properly delete any completions provided by another script.
|
||||||
|
# Only do this if the program can be found, or else fish may print some errors; besides,
|
||||||
|
# the existing completions will only be loaded if the program can be found.
|
||||||
|
if type -q "docker"
|
||||||
|
# The space after the program name is essential to trigger completion for the program
|
||||||
|
# and not completion of the program name itself.
|
||||||
|
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
|
||||||
|
complete --do-complete "docker " > /dev/null 2>&1
|
||||||
|
end
|
||||||
|
|
||||||
|
# Remove any pre-existing completions for the program since we will be handling all of them.
|
||||||
|
complete -c docker -e
|
||||||
|
|
||||||
|
# this will get called after the two calls below and clear the $__docker_perform_completion_once_result global
|
||||||
|
complete -c docker -n '__docker_clear_perform_completion_once_result'
|
||||||
|
# The call to __docker_prepare_completions will setup __docker_comp_results
|
||||||
|
# which provides the program's completion choices.
|
||||||
|
# If this doesn't require order preservation, we don't use the -k flag
|
||||||
|
complete -c docker -n 'not __docker_requires_order_preservation && __docker_prepare_completions' -f -a '$__docker_comp_results'
|
||||||
|
# otherwise we use the -k flag
|
||||||
|
complete -k -c docker -n '__docker_requires_order_preservation && __docker_prepare_completions' -f -a '$__docker_comp_results'
|
||||||
@@ -1,21 +1,63 @@
|
|||||||
complete --command nvm --exclusive
|
# NVM (https://github.com/creationix/nvm) completions for Fish shell
|
||||||
complete --command nvm --exclusive --long version --description "Print version"
|
# Inspired on (https://github.com/derekstavis/plugin-nvm)
|
||||||
complete --command nvm --exclusive --long help --description "Print help"
|
|
||||||
complete --command nvm --long silent --description "Suppress standard output"
|
|
||||||
|
|
||||||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version"
|
function __nvm_complete_ls_remote
|
||||||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell"
|
if not test "$__nvm_ls_remote"
|
||||||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions"
|
set -g __nvm_ls_remote (nvm ls-remote | grep -Po '(?:iojs-)?v[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install"
|
end
|
||||||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version"
|
|
||||||
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "(
|
printf "%s\n" $__nvm_ls_remote
|
||||||
test -e $nvm_data && string split ' ' <$nvm_data/.index
|
end
|
||||||
)"
|
|
||||||
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')"
|
function __nvm_complete_ls
|
||||||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version"
|
if not test "$__nvm_ls"
|
||||||
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "(
|
set -g __nvm_ls (nvm ls | grep -Po '[[:space:]].\K(v[0-9]+\.[0-9]+\.[0-9]+)')
|
||||||
_nvm_list | string split ' ' | string replace system ''
|
end
|
||||||
)"
|
|
||||||
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "(
|
printf "%s\n" $__nvm_ls
|
||||||
set --query nvm_default_version && echo default
|
end
|
||||||
)"
|
|
||||||
|
#Install
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'install' -d 'Download and install a <version>. Uses .nvmrc if available'
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from install" -a "(__nvm_complete_ls_remote)"
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from install" -l reinstall-packages-from= -d 'When installing, reinstall packages installed in <node|iojs|node version number>'
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from install" -s s -d 'From source'
|
||||||
|
|
||||||
|
#Use
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'use' -d 'Modify PATH to use <version>. Uses .nvmrc if available'
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from use" -a "(__nvm_complete_ls)"
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from use" -l silent
|
||||||
|
|
||||||
|
#Exec
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'exec' -d 'Run <command> on <version>. Uses .nvmrc if available'
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from exec" -a "(__nvm_complete_ls)"
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from exec" -l silent
|
||||||
|
|
||||||
|
#Run
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'run' -d 'Run <command> on <version>. Uses .nvmrc if available'
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from run" -a "(__nvm_complete_ls)"
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from run" -l silent
|
||||||
|
|
||||||
|
|
||||||
|
#Uninstall
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'uninstall' -d 'Uninstall a version'
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from uninstall" -a "(__nvm_complete_ls)"
|
||||||
|
|
||||||
|
#Which
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'which' -d 'Display path to installed node version. Uses .nvmrc if available'
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from which" -a "(__nvm_complete_ls)"
|
||||||
|
|
||||||
|
#Reinstall-Packages
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'reinstall-packages' -d 'Reinstall global `npm` packages contained in <version> to current version'
|
||||||
|
complete -f -c nvm -n "__fish_seen_subcommand_from reinstall-packages" -a "(__nvm_complete_ls)"
|
||||||
|
|
||||||
|
#Completions
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'current' -d 'Display currently activated version'
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'ls' -d 'List installed versions'
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'ls-remote' -d 'List remote versions available for install'
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'version' -d 'Resolve the given description to a single local <version>'
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'version-remote' -d 'Resolve the given description to a single remote <version>'
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'deactivate' -d 'Undo effects of `nvm` on current shell'
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'alias' -d 'Show all aliases beginning with <pattern> or set an alias named <name> pointing to <version>'
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'unalias' -d 'Deletes the alias named <name>'
|
||||||
|
complete -f -c nvm -n '__fish_use_subcommand' -a 'unload' -d 'Unload `nvm` from shell'
|
||||||
|
|||||||
@@ -1,95 +0,0 @@
|
|||||||
function __fish_exa_install --on-event fish-exa_install
|
|
||||||
function _set
|
|
||||||
if not set --query --universal --export $argv[1]
|
|
||||||
set --universal --export $argv[1] $argv[2..-1]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Prefer eza as exa is unmaintained
|
|
||||||
if type -q eza
|
|
||||||
set -Ux __FISH_EXA_BINARY eza
|
|
||||||
else
|
|
||||||
set -Ux __FISH_EXA_BINARY exa
|
|
||||||
end
|
|
||||||
|
|
||||||
set -Ux __FISH_EXA_BASE_ALIASES l ll lg le lt lc lo
|
|
||||||
set -Ux __FISH_EXA_EXPANDED a d i id aa ad ai aid aad aai aaid
|
|
||||||
set -Ux __FISH_EXA_EXPANDED_OPT_NAME LA LD LI LID LAA LAD LAI LAID LAAD LAAI LAAID
|
|
||||||
set -Ux __FISH_EXA_OPT_NAMES
|
|
||||||
set -Ux __FISH_EXA_ALIASES
|
|
||||||
set -Ux __FISH_EXA_SORT_OPTIONS name .name size ext mod old acc cr inode
|
|
||||||
|
|
||||||
_set EXA_STANDARD_OPTIONS "--group" "--header" "--group-directories-first"
|
|
||||||
|
|
||||||
# Base aliases
|
|
||||||
_set EXA_L_OPTIONS
|
|
||||||
_set EXA_LL_OPTIONS "--long"
|
|
||||||
_set EXA_LG_OPTIONS "--git" "--git-ignore" "--long"
|
|
||||||
_set EXA_LE_OPTIONS "--extended" "--long"
|
|
||||||
_set EXA_LT_OPTIONS "--tree" "--level"
|
|
||||||
_set EXA_LC_OPTIONS "--across"
|
|
||||||
_set EXA_LO_OPTIONS "--oneline"
|
|
||||||
|
|
||||||
# Extended aliases
|
|
||||||
_set EXA_LI_OPTIONS "--icons"
|
|
||||||
_set EXA_LD_OPTIONS "--only-dirs"
|
|
||||||
_set EXA_LID_OPTIONS "--icons" "--only-dirs"
|
|
||||||
_set EXA_LA_OPTIONS "--all" "--binary"
|
|
||||||
_set EXA_LAD_OPTIONS "--all" "--binary" "--only-dirs"
|
|
||||||
_set EXA_LAI_OPTIONS "--all" "--binary" "--icons"
|
|
||||||
_set EXA_LAID_OPTIONS "--all" "--binary" "--icons" "--only-dirs"
|
|
||||||
_set EXA_LAA_OPTIONS "--all" "--all" "--binary"
|
|
||||||
_set EXA_LAAD_OPTIONS "--all" "--all" "--binary" "--only-dirs"
|
|
||||||
_set EXA_LAAI_OPTIONS "--all" "--all" "--binary" "--icons"
|
|
||||||
_set EXA_LAAID_OPTIONS "--all" "--all" "--binary" "--icons" "--only-dirs"
|
|
||||||
|
|
||||||
for a in $__FISH_EXA_BASE_ALIASES
|
|
||||||
set -l opt_name (string join '_' "EXA" (string upper $a) "OPTIONS")
|
|
||||||
if test $a = "ll"
|
|
||||||
alias --save "$a" "exa_git"
|
|
||||||
else
|
|
||||||
alias --save "$a" "$__FISH_EXA_BINARY \$EXA_STANDARD_OPTIONS \$$opt_name"
|
|
||||||
end
|
|
||||||
set -a __FISH_EXA_OPT_NAMES "$opt_name"
|
|
||||||
set -a __FISH_EXA_ALIASES "$a"
|
|
||||||
|
|
||||||
for i in (seq (count $__FISH_EXA_EXPANDED))
|
|
||||||
set -l name "$a$__FISH_EXA_EXPANDED[$i]"
|
|
||||||
# --tree is useless given --all --all
|
|
||||||
if test $name = "ltaa"; or test $name = "ltaac"
|
|
||||||
continue
|
|
||||||
end
|
|
||||||
set -l exp_opt_name (string join '_' "EXA" $__FISH_EXA_EXPANDED_OPT_NAME[$i] "OPTIONS")
|
|
||||||
if string match --quiet 'll*' "$name"
|
|
||||||
alias --save "$name" "exa_git \$$exp_opt_name"
|
|
||||||
else
|
|
||||||
alias --save "$name" "$__FISH_EXA_BINARY \$EXA_STANDARD_OPTIONS \$$exp_opt_name \$$opt_name"
|
|
||||||
end
|
|
||||||
set -a __FISH_EXA_ALIASES "$name"
|
|
||||||
|
|
||||||
if not contains $exp_opt_name $__FISH_EXA_OPT_NAMES
|
|
||||||
set -a __FISH_EXA_OPT_NAMES $exp_opt_name
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function __fish_exa_update --on-event fish-exa_update
|
|
||||||
__fish_exa_uninstall
|
|
||||||
__fish_exa_install
|
|
||||||
end
|
|
||||||
|
|
||||||
function __fish_exa_uninstall --on-event fish-exa_uninstall
|
|
||||||
for a in $__FISH_EXA_ALIASES
|
|
||||||
functions --erase $a
|
|
||||||
funcsave $a
|
|
||||||
end
|
|
||||||
|
|
||||||
set --erase __FISH_EXA_BASE_ALIASES
|
|
||||||
set --erase __FISH_EXA_ALIASES
|
|
||||||
set --erase __FISH_EXA_EXPANDED
|
|
||||||
set --erase __FISH_EXA_EXPANDED_OPT_NAME
|
|
||||||
set --erase __FISH_EXA_OPT_NAMES
|
|
||||||
set --erase __FISH_EXA_SORT_OPTIONS
|
|
||||||
set --erase __FISH_EXA_BINARY
|
|
||||||
end
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
|
|
||||||
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
|
|
||||||
set --query nvm_data || set --global nvm_data $XDG_DATA_HOME/nvm
|
|
||||||
|
|
||||||
function _nvm_install --on-event nvm_install
|
|
||||||
test ! -d $nvm_data && command mkdir -p $nvm_data
|
|
||||||
echo "Downloading the Node distribution index..." 2>/dev/null
|
|
||||||
_nvm_index_update
|
|
||||||
end
|
|
||||||
|
|
||||||
function _nvm_update --on-event nvm_update
|
|
||||||
set --query --universal nvm_data && set --erase --universal nvm_data
|
|
||||||
set --query --universal nvm_mirror && set --erase --universal nvm_mirror
|
|
||||||
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
|
|
||||||
end
|
|
||||||
|
|
||||||
function _nvm_uninstall --on-event nvm_uninstall
|
|
||||||
command rm -rf $nvm_data
|
|
||||||
|
|
||||||
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
|
|
||||||
|
|
||||||
set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source
|
|
||||||
functions --erase (functions --all | string match --entire --regex -- "^_nvm_")
|
|
||||||
end
|
|
||||||
|
|
||||||
if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version
|
|
||||||
nvm use --silent $nvm_default_version
|
|
||||||
end
|
|
||||||
@@ -2,13 +2,24 @@
|
|||||||
# │ fish/config.fish │
|
# │ fish/config.fish │
|
||||||
# ╰──────────────────────────────────────────────────────────╯
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
# ASDF configuration code
|
test -e "$HOME/.config/fish/alias.fish" &&
|
||||||
source $HOME/.local/asdf/asdf.fish
|
source "$HOME/.config/fish/alias.fish"
|
||||||
|
|
||||||
fish_add_path $HOME/.local/bin
|
test -e "$HOME/.config/fish/exports.fish" &&
|
||||||
fish_add_path $HOME/.local/share/nvim/mason/bin
|
source "$HOME/.config/fish/exports.fish"
|
||||||
fish_add_path $HOME/.local/state/composer/vendor/bin
|
|
||||||
|
|
||||||
if status is-interactive
|
if status is-interactive
|
||||||
# Commands to run in interactive sessions can go here
|
# Commands to run in interactive sessions can go here
|
||||||
|
|
||||||
|
# Start tmux if not already running and not in SSH
|
||||||
|
open-tmux # defined in functions/open-tmux.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Added by LM Studio CLI (lms)
|
||||||
|
set -gx PATH $PATH $HOME/.lmstudio/bin
|
||||||
|
|
||||||
|
type -q rbenv; and source (rbenv init -|psub)
|
||||||
|
type -q pyenv; and source (pyenv init -|psub)
|
||||||
|
type -q goenv; and source (goenv init -|psub)
|
||||||
|
type -q fnm; and fnm env --use-on-cd --shell fish | source
|
||||||
|
|
||||||
|
|||||||
194
config/fish/exports.fish
Normal file
194
config/fish/exports.fish
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
# XDG Base Directory Specification
|
||||||
|
set -q XDG_CONFIG_HOME; or set -x XDG_CONFIG_HOME "$HOME/.config"
|
||||||
|
set -q XDG_DATA_HOME; or set -x XDG_DATA_HOME "$HOME/.local/share"
|
||||||
|
set -q XDG_CACHE_HOME; or set -x XDG_CACHE_HOME "$HOME/.cache"
|
||||||
|
set -q XDG_STATE_HOME; or set -x XDG_STATE_HOME "$HOME/.local/state"
|
||||||
|
set -q XDG_BIN_HOME; or set -x XDG_BIN_HOME "$HOME/.local/bin"
|
||||||
|
set -q XDG_RUNTIME_DIR; or set -x XDG_RUNTIME_DIR "$HOME/.local/run"
|
||||||
|
|
||||||
|
# Dotfiles directory
|
||||||
|
set -q DOTFILES; or set -x DOTFILES "$HOME/.dotfiles"
|
||||||
|
|
||||||
|
# Editor settings
|
||||||
|
set -q EDITOR; or set -x EDITOR nvim
|
||||||
|
set -q VISUAL; or set -x VISUAL code
|
||||||
|
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"
|
||||||
|
|
||||||
|
# Set Aqua configuration
|
||||||
|
set -q AQUA_BIN; or set -gx AQUA_BIN "$XDG_DATA_HOME/aquaproj-aqua/bin"
|
||||||
|
set -q AQUA_CONFIG; or set -gx AQUA_CONFIG "$XDG_CONFIG_HOME/aqua/aqua.yaml"
|
||||||
|
set -gx PATH $AQUA_BIN $PATH
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
# Yarn configuration
|
||||||
|
set -q YARN_GLOBAL_FOLDER; or set -x YARN_GLOBAL_FOLDER "$XDG_DATA_HOME/yarn"
|
||||||
|
fish_add_path "$YARN_GLOBAL_FOLDER/bin"
|
||||||
|
|
||||||
|
# Mason configuration
|
||||||
|
set -q MASON_HOME; or set -x MASON_HOME "$XDG_DATA_HOME/nvim/mason"
|
||||||
|
fish_add_path "$MASON_HOME/bin"
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
test -z "$NVIM_DATA_HOME" && set -x NVIM_DATA_HOME "$XDG_DATA_HOME/nvim"
|
||||||
|
test -z "$NVIM_CACHE_HOME" && set -x NVIM_CACHE_HOME "$XDG_CACHE_HOME/nvim"
|
||||||
|
test -z "$NVIM_LOG_PATH" && set -x NVIM_LOG_PATH "$NVIM_STATE/log"
|
||||||
|
test -z "$NVIM_SESSION_PATH" && set -x NVIM_SESSION_PATH "$NVIM_STATE/session"
|
||||||
|
test -z "$NVIM_SHADA_PATH" && set -x NVIM_SHADA_PATH "$NVIM_STATE/shada"
|
||||||
|
test -z "$NVIM_UNDO_PATH" && set -x NVIM_UNDO_PATH "$NVIM_STATE/undo"
|
||||||
|
|
||||||
|
# Ansible configuration
|
||||||
|
set -q ANSIBLE_HOME; or set -x ANSIBLE_HOME "$XDG_CONFIG_HOME/ansible"
|
||||||
|
set -q ANSIBLE_CONFIG; or set -x ANSIBLE_CONFIG "$ANSIBLE_HOME/ansible.cfg"
|
||||||
|
set -q ANSIBLE_GALAXY_CACHE_DIR; or set -x ANSIBLE_GALAXY_CACHE_DIR "$XDG_CACHE_HOME/ansible/galaxy_cache"
|
||||||
|
x-dc "$ANSIBLE_HOME"
|
||||||
|
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
|
||||||
|
|
||||||
|
# AWS configuration
|
||||||
|
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_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_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
|
||||||
|
|
||||||
|
# Brew configuration
|
||||||
|
set -q HOMEBREW_NO_ANALYTICS; or set -x HOMEBREW_NO_ANALYTICS true
|
||||||
|
set -q HOMEBREW_NO_ENV_HINTS; or set -x HOMEBREW_NO_ENV_HINTS true
|
||||||
|
set -q HOMEBREW_BUNDLE_MAS_SKIP; or set -x HOMEBREW_BUNDLE_MAS_SKIP true
|
||||||
|
set -q HOMEBREW_BUNDLE_FILE; or set -x HOMEBREW_BUNDLE_FILE "$XDG_CONFIG_HOME/homebrew/Brewfile"
|
||||||
|
|
||||||
|
# Composer configuration
|
||||||
|
set -q COMPOSER_HOME; or set -x COMPOSER_HOME "$XDG_STATE_HOME/composer"
|
||||||
|
set -q COMPOSER_BIN; or set -x COMPOSER_BIN "$COMPOSER_HOME/vendor/bin"
|
||||||
|
fish_add_path "$COMPOSER_BIN"
|
||||||
|
|
||||||
|
# direnv configuration
|
||||||
|
set -q DIRENV_LOG_FORMAT; or set -x DIRENV_LOG_FORMAT ''
|
||||||
|
|
||||||
|
# Docker configuration
|
||||||
|
set -q DOCKER_CONFIG; or set -x DOCKER_CONFIG "$XDG_CONFIG_HOME/docker"
|
||||||
|
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 '--height 40% --tmux bottom,40% --layout reverse --border top'
|
||||||
|
|
||||||
|
# GnuPG configuration
|
||||||
|
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 GOBIN; or set -x GOBIN "$XDG_BIN_HOME"
|
||||||
|
fish_add_path "$GOBIN"
|
||||||
|
|
||||||
|
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"
|
||||||
|
fish_add_path "$POETRY_HOME/bin"
|
||||||
|
|
||||||
|
# Rust / cargo configuration
|
||||||
|
set -q CARGO_HOME; or set -x CARGO_HOME "$XDG_DATA_HOME/cargo"
|
||||||
|
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_BIN_HOME"
|
||||||
|
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"
|
||||||
|
|
||||||
|
# Sonarlint configuration
|
||||||
|
set -q SONARLINT_HOME; or set -x SONARLINT_HOME "$XDG_DATA_HOME/sonarlint"
|
||||||
|
set -q SONARLINT_BIN; or set -x SONARLINT_BIN "$XDG_BIN_HOME"
|
||||||
|
set -q SONARLINT_USER_HOME; or set -x SONARLINT_USER_HOME "$XDG_DATA_HOME/sonarlint"
|
||||||
|
|
||||||
|
# Terraform configuration
|
||||||
|
set -q TF_DATA_DIR; or set -x TF_DATA_DIR "$XDG_STATE_HOME/terraform"
|
||||||
|
set -q TF_CLI_CONFIG_FILE; or set -x TF_CLI_CONFIG_FILE "$XDG_CONFIG_HOME/terraform/terraformrc"
|
||||||
|
set -q TF_PLUGIN_CACHE_DIR; or set -x TF_PLUGIN_CACHE_DIR "$XDG_CACHE_HOME/terraform/plugin-cache"
|
||||||
|
|
||||||
|
# tmux configuration
|
||||||
|
set -q TMUX_TMPDIR; or set -x TMUX_TMPDIR "$XDG_STATE_HOME/tmux"
|
||||||
|
set -q TMUX_CONF_DIR; or set -x TMUX_CONF_DIR "$XDG_CONFIG_HOME/tmux"
|
||||||
|
set -q TMUX_PLUGINS; or set -x TMUX_PLUGINS "$TMUX_CONF_DIR/plugins"
|
||||||
|
set -q TMUX_CONF; or set -x TMUX_CONF "$TMUX_CONF_DIR/tmux.conf"
|
||||||
|
set -q TMUX_PLUGIN_MANAGER_PATH; or set -x TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGINS"
|
||||||
|
|
||||||
|
# Source tmux theme activation script for Fish shell
|
||||||
|
if test -f "$DOTFILES/config/tmux/theme-activate.fish"
|
||||||
|
source "$DOTFILES/config/tmux/theme-activate.fish"
|
||||||
|
end
|
||||||
|
|
||||||
|
# tms configuration
|
||||||
|
set -q TMS_CONFIG_FILE; or set -x TMS_CONFIG_FILE "$XDG_CONFIG_HOME/tms/config.toml"
|
||||||
|
|
||||||
|
# wakatime configuration
|
||||||
|
set -q WAKATIME_HOME; or set -x WAKATIME_HOME "$XDG_STATE_HOME/wakatime"
|
||||||
|
x-dc "$WAKATIME_HOME"
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
# Source additional configuration files if they exist
|
||||||
|
if test -f "$DOTFILES/config/fish/exports-secret.fish"
|
||||||
|
source "$DOTFILES/config/fish/exports-secret.fish"
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -f "$DOTFILES/hosts/$HOSTNAME/config/fish/exports.fish"
|
||||||
|
source "$DOTFILES/hosts/$HOSTNAME/config/fish/exports.fish"
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -f "$DOTFILES/hosts/$HOSTNAME/config/fish/exports-secret.fish"
|
||||||
|
source "$DOTFILES/hosts/$HOSTNAME/config/fish/exports-secret.fish"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Configure tide prompt
|
||||||
|
set -gx tide_prompt_transient_enabled true
|
||||||
|
set -gx tide_prompt_add_newline_before true
|
||||||
|
set -gx tide_prompt_min_cols 34
|
||||||
|
set -gx tide_prompt_pad_items false
|
||||||
|
set -gx tide_left_prompt_items context pwd git node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig newline character
|
||||||
|
set -gx tide_right_prompt_items status jobs direnv
|
||||||
|
set -gx tide_context_hostname_parts 1
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
jorgebucaran/fisher
|
jorgebucaran/fisher
|
||||||
jorgebucaran/nvm.fish
|
|
||||||
ilancosman/tide@v6
|
ilancosman/tide@v6
|
||||||
jethrokuan/z
|
jethrokuan/z
|
||||||
halostatue/fish-macos@v7
|
halostatue/fish-macos@v7
|
||||||
ehfive/fish-bash2env
|
|
||||||
jgusta/paths
|
jgusta/paths
|
||||||
danhper/fish-ssh-agent
|
danhper/fish-ssh-agent
|
||||||
halostatue/fish-brew@v3
|
halostatue/fish-brew@v3
|
||||||
gazorby/fish-exa
|
edc/bass
|
||||||
|
jorgebucaran/nvm.fish
|
||||||
|
fabioantunes/fish-nvm
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
function .c --wraps='cd ~/Code' --description 'alias .c=cd ~/Code'
|
|
||||||
cd ~/Code $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function .d --wraps='cd ~/.dotfiles' --description 'alias .d=cd ~/.dotfiles'
|
|
||||||
cd ~/.dotfiles $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Copyright (c) 2022 Huang-Huang Bao
|
|
||||||
#
|
|
||||||
# This software is released under the MIT License.
|
|
||||||
# https://opensource.org/licenses/MIT
|
|
||||||
|
|
||||||
# shellcheck disable=SC2076
|
|
||||||
set -e
|
|
||||||
|
|
||||||
disallowd_vars_arr=(
|
|
||||||
_
|
|
||||||
fish_kill_signal
|
|
||||||
fish_killring
|
|
||||||
fish_pid
|
|
||||||
history
|
|
||||||
hostname
|
|
||||||
PWD
|
|
||||||
pipestatus
|
|
||||||
SHLVL
|
|
||||||
status
|
|
||||||
status_generation
|
|
||||||
version
|
|
||||||
)
|
|
||||||
disallowd_vars=" ${disallowd_vars_arr[*]} "
|
|
||||||
|
|
||||||
fish_escape() {
|
|
||||||
value="${1//\\/\\\\}"
|
|
||||||
value="${value//\'/\\\'}"
|
|
||||||
echo "'${value}'"
|
|
||||||
}
|
|
||||||
|
|
||||||
flag_impure="$__FISH_BASH2ENV_IMPURE"
|
|
||||||
unset __FISH_BASH2ENV_IMPURE
|
|
||||||
|
|
||||||
if [[ -z "$flag_impure" ]]; then
|
|
||||||
old_env=" $(env -0 | tr '\0' ' ') "
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval_status=
|
|
||||||
eval "$*" 1>&2 || eval_status=$?
|
|
||||||
|
|
||||||
env -0 | while IFS= read -rs -d $'\0' line; do
|
|
||||||
if [[ -z "$flag_impure" && "${old_env}" =~ " ${line} " ]]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
name="${line%%=*}"
|
|
||||||
if [[ "${disallowd_vars}" =~ " ${name} " ]]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
value="$(fish_escape "${line#*=}")"
|
|
||||||
echo "set -gx ${name} ${value}"
|
|
||||||
done
|
|
||||||
|
|
||||||
exit $eval_status
|
|
||||||
140
config/fish/functions/__bass.py
Normal file
140
config/fish/functions/__bass.py
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
"""
|
||||||
|
To be used with a companion fish function like this:
|
||||||
|
|
||||||
|
function refish
|
||||||
|
set -l _x (python /tmp/bass.py source ~/.nvm/nvim.sh ';' nvm use iojs); source $_x; and rm -f $_x
|
||||||
|
end
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import signal
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
|
||||||
|
BASH = 'bash'
|
||||||
|
|
||||||
|
FISH_READONLY = [
|
||||||
|
'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version',
|
||||||
|
'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode'
|
||||||
|
]
|
||||||
|
|
||||||
|
IGNORED = [
|
||||||
|
'PS1', 'XPC_SERVICE_NAME'
|
||||||
|
]
|
||||||
|
|
||||||
|
def ignored(name):
|
||||||
|
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
|
||||||
|
|
||||||
|
def escape(string):
|
||||||
|
# use json.dumps to reliably escape quotes and backslashes
|
||||||
|
return json.dumps(string).replace(r'$', r'\$')
|
||||||
|
|
||||||
|
def escape_identifier(word):
|
||||||
|
return escape(word.replace('?', '\\?'))
|
||||||
|
|
||||||
|
def comment(string):
|
||||||
|
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]
|
||||||
|
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:])]
|
||||||
|
p = subprocess.Popen(args, universal_newlines=True, close_fds=False)
|
||||||
|
os.close(pipe_w)
|
||||||
|
with os.fdopen(pipe_r) as f:
|
||||||
|
new_env = f.readline()
|
||||||
|
alias_str = f.read()
|
||||||
|
if p.wait() != 0:
|
||||||
|
raise subprocess.CalledProcessError(
|
||||||
|
returncode=p.returncode,
|
||||||
|
cmd=' '.join(sys.argv[1:]),
|
||||||
|
output=new_env + alias_str
|
||||||
|
)
|
||||||
|
new_env = new_env.strip()
|
||||||
|
|
||||||
|
old_env = json.loads(old_env)
|
||||||
|
new_env = json.loads(new_env)
|
||||||
|
|
||||||
|
script_lines = []
|
||||||
|
|
||||||
|
for k, v in new_env.items():
|
||||||
|
if ignored(k):
|
||||||
|
continue
|
||||||
|
v1 = old_env.get(k)
|
||||||
|
if not v1:
|
||||||
|
script_lines.append(comment('adding %s=%s' % (k, v)))
|
||||||
|
elif v1 != v:
|
||||||
|
script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v)))
|
||||||
|
# process special variables
|
||||||
|
if k == 'PWD':
|
||||||
|
script_lines.append('cd %s' % escape(v))
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
continue
|
||||||
|
if k == 'PATH':
|
||||||
|
value = ' '.join([escape(directory)
|
||||||
|
for directory in v.split(':')])
|
||||||
|
else:
|
||||||
|
value = escape(v)
|
||||||
|
script_lines.append('set -g -x %s %s' % (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 = '\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)
|
||||||
|
|
||||||
|
return script + '\n' + alias
|
||||||
|
|
||||||
|
script_file = os.fdopen(3, 'w')
|
||||||
|
|
||||||
|
if not sys.argv[1:]:
|
||||||
|
print('__bass_usage', file=script_file, end='')
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
try:
|
||||||
|
script = gen_script()
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
sys.exit(e.returncode)
|
||||||
|
except Exception:
|
||||||
|
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)
|
||||||
|
else:
|
||||||
|
script_file.write(script)
|
||||||
70
config/fish/functions/__nvm_run.fish
Normal file
70
config/fish/functions/__nvm_run.fish
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
function __nvm_run
|
||||||
|
set count (count $argv)
|
||||||
|
|
||||||
|
if test "$count" -le 0
|
||||||
|
echo 'No params'
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if test (uname -s) = 'Darwin'; and string match -q "*versions/node/*/bin" $PATH
|
||||||
|
set -l nvm_node_path (string match "*versions/node/*/bin" $PATH)
|
||||||
|
set -l nvm_index (contains -i -- $nvm_node_path $PATH)
|
||||||
|
if test $nvm_index -gt 1
|
||||||
|
set -gx PATH $nvm_node_path (string match -v $nvm_node_path $PATH)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function run_command
|
||||||
|
set stack (status stack-trace | grep called | cut -d " " -f 7)
|
||||||
|
set count (count $argv)
|
||||||
|
|
||||||
|
if type -fq $argv[1]; and test "$stack[1]" != (type -fP $argv[1])
|
||||||
|
set count (count $argv)
|
||||||
|
if test "$count" -ge 2
|
||||||
|
set args $argv[2..-1]
|
||||||
|
|
||||||
|
# https://stackoverflow.com/questions/45237675/proxying-arguments-from-one-function-to-a-command/45238056#45238056
|
||||||
|
eval (string escape -- (type -fP $argv[1]) $args)
|
||||||
|
else
|
||||||
|
eval (string escape -- (type -fP $argv[1]))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
echo (set_color -o)"Fish nvm:"(set_color normal) "'$argv[1]' is currently not installed, try running npm i -g $argv[1]"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function can_run_command
|
||||||
|
if type -P $argv[1] > /dev/null 2>&1; or type -P node > /dev/null 2>&1
|
||||||
|
return
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function run_default
|
||||||
|
nvm use default > /dev/null
|
||||||
|
set -gx NVM_HAS_RUN 1
|
||||||
|
if can_run_command $argv[1]
|
||||||
|
run_command $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not test -n "$NVM_HAS_RUN"
|
||||||
|
if test -f .nvmrc;
|
||||||
|
set nvm_output (nvm use)
|
||||||
|
set nvm_status $status
|
||||||
|
if test $nvm_status -gt 0
|
||||||
|
echo $nvm_output
|
||||||
|
end
|
||||||
|
if test $nvm_status -eq 0; and can_run_command $argv[1]
|
||||||
|
set -gx NVM_HAS_RUN 1
|
||||||
|
run_command $argv
|
||||||
|
end
|
||||||
|
else
|
||||||
|
run_default $argv
|
||||||
|
end
|
||||||
|
else
|
||||||
|
run_command $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
function _nvm_index_update
|
|
||||||
test ! -d $nvm_data && command mkdir -p $nvm_data
|
|
||||||
|
|
||||||
set --local index $nvm_data/.index
|
|
||||||
|
|
||||||
if not command curl -q --location --silent $nvm_mirror/index.tab >$index.temp
|
|
||||||
command rm -f $index.temp
|
|
||||||
echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
command awk -v OFS=\t '
|
|
||||||
/v0.9.12/ { exit } # Unsupported
|
|
||||||
NR > 1 {
|
|
||||||
print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "")
|
|
||||||
}
|
|
||||||
' $index.temp >$index
|
|
||||||
|
|
||||||
command rm -f $index.temp
|
|
||||||
end
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
function _nvm_list
|
|
||||||
set --local versions $nvm_data/*
|
|
||||||
|
|
||||||
set --query versions[1] &&
|
|
||||||
string match --entire --regex -- (
|
|
||||||
string replace --all -- $nvm_data/ "" $versions |
|
|
||||||
string match --regex -- "v\d.+" |
|
|
||||||
string escape --style=regex |
|
|
||||||
string join "|"
|
|
||||||
) <$nvm_data/.index
|
|
||||||
|
|
||||||
command --all node |
|
|
||||||
string match --quiet --invert --regex -- "^$nvm_data" && echo system
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function _nvm_version_activate --argument-names ver
|
|
||||||
set --global --export nvm_current_version $ver
|
|
||||||
set --prepend PATH $nvm_data/$ver/bin
|
|
||||||
end
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
function _nvm_version_deactivate --argument-names ver
|
|
||||||
test "$nvm_current_version" = "$ver" && set --erase nvm_current_version
|
|
||||||
set --local index (contains --index -- $nvm_data/$ver/bin $PATH) &&
|
|
||||||
set --erase PATH[$index]
|
|
||||||
end
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
# Copyright (c) 2022 Huang-Huang Bao
|
|
||||||
#
|
|
||||||
# This software is released under the MIT License.
|
|
||||||
# https://opensource.org/licenses/MIT
|
|
||||||
|
|
||||||
function bash2env -d "Import environment variables modified by given bash command"
|
|
||||||
argparse --stop-nonopt h/help i/impure -- $argv
|
|
||||||
or set argv
|
|
||||||
|
|
||||||
function _print_usage
|
|
||||||
echo 'Usage:' \
|
|
||||||
(set_color $fish_color_command)'bash2env' \
|
|
||||||
(set_color $fish_color_normal)'[-i/--impure]' \
|
|
||||||
(set_color $fish_color_param)"<bash command>"
|
|
||||||
end
|
|
||||||
|
|
||||||
if test -n "$_flag_help"
|
|
||||||
_print_usage
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if test (count $argv) -eq 0
|
|
||||||
_print_usage
|
|
||||||
return 22
|
|
||||||
end
|
|
||||||
|
|
||||||
if test -n "$_flag_impure"
|
|
||||||
set _flag_impure 1
|
|
||||||
end
|
|
||||||
|
|
||||||
set -l DIR (dirname (status -f))
|
|
||||||
__FISH_BASH2ENV_IMPURE=$_flag_impure command \
|
|
||||||
bash $DIR/__bash2env.sh $argv | source
|
|
||||||
|
|
||||||
for code in $pipestatus
|
|
||||||
if test $code != 0
|
|
||||||
return $code
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
29
config/fish/functions/bass.fish
Normal file
29
config/fish/functions/bass.fish
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
function bass
|
||||||
|
set -l bash_args $argv
|
||||||
|
set -l bass_debug
|
||||||
|
if test "$bash_args[1]_" = '-d_'
|
||||||
|
set bass_debug true
|
||||||
|
set -e bash_args[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l script_file (mktemp)
|
||||||
|
if command -v python3 >/dev/null 2>&1
|
||||||
|
command python3 -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file
|
||||||
|
else
|
||||||
|
command python -sS (dirname (status -f))/__bass.py $bash_args 3>$script_file
|
||||||
|
end
|
||||||
|
set -l bass_status $status
|
||||||
|
if test $bass_status -ne 0
|
||||||
|
return $bass_status
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -n "$bass_debug"
|
||||||
|
cat $script_file
|
||||||
|
end
|
||||||
|
source $script_file
|
||||||
|
command rm $script_file
|
||||||
|
end
|
||||||
|
|
||||||
|
function __bass_usage
|
||||||
|
echo "Usage: bass [-d] <bash-command>"
|
||||||
|
end
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
function exa_git -d "Use exa and its git options if in a git repo"
|
|
||||||
if git rev-parse --is-inside-work-tree &>/dev/null
|
|
||||||
$__FISH_EXA_BINARY $EXA_STANDARD_OPTIONS {$EXA_LL_OPTIONS} --git $argv
|
|
||||||
else
|
|
||||||
$__FISH_EXA_BINARY $EXA_STANDARD_OPTIONS {$EXA_LL_OPTIONS} $argv
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function l --wraps='eza $EXA_STANDARD_OPTIONS $EXA_L_OPTIONS' --description 'alias l eza $EXA_STANDARD_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function la --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_L_OPTIONS' --description 'alias la eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function laa --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_L_OPTIONS' --description 'alias laa eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function laad --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_L_OPTIONS' --description 'alias laad eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function laai --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_L_OPTIONS' --description 'alias laai eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function laaid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_L_OPTIONS' --description 'alias laaid eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lad --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_L_OPTIONS' --description 'alias lad eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lai --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_L_OPTIONS' --description 'alias lai eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function laid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_L_OPTIONS' --description 'alias laid eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lc --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LC_OPTIONS' --description 'alias lc eza $EXA_STANDARD_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lca --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LC_OPTIONS' --description 'alias lca eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcaa --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcaa eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcaad --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcaad eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcaai --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcaai eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcaaid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcaaid eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcad --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcad eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcai --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcai eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcaid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcaid eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcd --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcd eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lci --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LC_OPTIONS' --description 'alias lci eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lcid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LC_OPTIONS' --description 'alias lcid eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LC_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LC_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function ld --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_L_OPTIONS' --description 'alias ld eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function le --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LE_OPTIONS' --description 'alias le eza $EXA_STANDARD_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lea --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LE_OPTIONS' --description 'alias lea eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function leaa --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LE_OPTIONS' --description 'alias leaa eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function leaad --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LE_OPTIONS' --description 'alias leaad eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function leaai --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LE_OPTIONS' --description 'alias leaai eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function leaaid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LE_OPTIONS' --description 'alias leaaid eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lead --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LE_OPTIONS' --description 'alias lead eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function leai --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LE_OPTIONS' --description 'alias leai eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function leaid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LE_OPTIONS' --description 'alias leaid eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function led --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LE_OPTIONS' --description 'alias led eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lei --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LE_OPTIONS' --description 'alias lei eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function leid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LE_OPTIONS' --description 'alias leid eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LE_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LE_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lg --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LG_OPTIONS' --description 'alias lg eza $EXA_STANDARD_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lga --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LG_OPTIONS' --description 'alias lga eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LA_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgaa --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgaa eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAA_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgaad --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgaad eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAD_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgaai --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgaai eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAI_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgaaid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgaaid eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAAID_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgad --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgad eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAD_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgai --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgai eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAI_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgaid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgaid eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LAID_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgd --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgd eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LD_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgi --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgi eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lgid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LG_OPTIONS' --description 'alias lgid eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LG_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_LG_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function li --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_L_OPTIONS' --description 'alias li eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LI_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lid --wraps='eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_L_OPTIONS' --description 'alias lid eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_L_OPTIONS'
|
|
||||||
eza $EXA_STANDARD_OPTIONS $EXA_LID_OPTIONS $EXA_L_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function ll --wraps=exa_git --description 'alias ll exa_git'
|
|
||||||
exa_git $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function lla --wraps='exa_git $EXA_LA_OPTIONS' --description 'alias lla exa_git $EXA_LA_OPTIONS'
|
|
||||||
exa_git $EXA_LA_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function llaa --wraps='exa_git $EXA_LAA_OPTIONS' --description 'alias llaa exa_git $EXA_LAA_OPTIONS'
|
|
||||||
exa_git $EXA_LAA_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function llaad --wraps='exa_git $EXA_LAAD_OPTIONS' --description 'alias llaad exa_git $EXA_LAAD_OPTIONS'
|
|
||||||
exa_git $EXA_LAAD_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function llaai --wraps='exa_git $EXA_LAAI_OPTIONS' --description 'alias llaai exa_git $EXA_LAAI_OPTIONS'
|
|
||||||
exa_git $EXA_LAAI_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function llaaid --wraps='exa_git $EXA_LAAID_OPTIONS' --description 'alias llaaid exa_git $EXA_LAAID_OPTIONS'
|
|
||||||
exa_git $EXA_LAAID_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function llad --wraps='exa_git $EXA_LAD_OPTIONS' --description 'alias llad exa_git $EXA_LAD_OPTIONS'
|
|
||||||
exa_git $EXA_LAD_OPTIONS $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user