mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
Compare commits
19 Commits
5a282b9b30
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a98a9f7122 | ||
|
|
5f7f419759 | ||
|
|
e9fc134236 | ||
|
|
977c4f93a6 | ||
|
|
ee30bc535a | ||
|
|
ca5c467db1 | ||
|
|
a449c0247d | ||
|
|
343c5a83cb | ||
|
|
beadd56dd7 | ||
|
|
0116e7a5af | ||
|
|
441299ca77 | ||
|
|
fc2d0f8848 | ||
|
|
b04e01d418 | ||
|
|
15bcada010 | ||
|
|
b52dd1a425 | ||
|
|
8a4d6fc0a2 | ||
|
|
73d79fe137 | ||
|
|
8c5a60644a | ||
|
|
9d93dfaa60 |
11
.github/workflows/dependencies.yml
vendored
11
.github/workflows/dependencies.yml
vendored
@@ -4,14 +4,13 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 6 * * 0"
|
- cron: "0 6 * * 0"
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Check for updates
|
name: Check for updates
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'ohmyzsh/ohmyzsh'
|
if: github.repository == 'ohmyzsh/ohmyzsh'
|
||||||
|
permissions:
|
||||||
|
contents: write # this is needed to push commits and branches
|
||||||
steps:
|
steps:
|
||||||
- name: Harden the runner (Audit all outbound calls)
|
- name: Harden the runner (Audit all outbound calls)
|
||||||
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
|
||||||
@@ -19,17 +18,17 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
id: generate-token
|
id: generate-token
|
||||||
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
|
||||||
with:
|
with:
|
||||||
app-id: ${{ secrets.OHMYZSH_APP_ID }}
|
app-id: ${{ secrets.OHMYZSH_APP_ID }}
|
||||||
private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
cache: "pip"
|
cache: "pip"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
certifi==2025.10.5
|
certifi==2025.11.12
|
||||||
charset-normalizer==3.4.4
|
charset-normalizer==3.4.4
|
||||||
idna==3.11
|
idna==3.11
|
||||||
PyYAML==6.0.3
|
PyYAML==6.0.3
|
||||||
|
|||||||
72
.github/workflows/dependencies/updater.py
vendored
72
.github/workflows/dependencies/updater.py
vendored
@@ -219,32 +219,33 @@ class Dependency:
|
|||||||
# Create new branch
|
# Create new branch
|
||||||
branch = Git.checkout_or_create_branch(branch_name)
|
branch = Git.checkout_or_create_branch(branch_name)
|
||||||
|
|
||||||
# Update dependencies.yml file
|
|
||||||
self.__update_yaml(
|
|
||||||
f"tag:{new_version}" if is_tag else status["version"]
|
|
||||||
)
|
|
||||||
|
|
||||||
# Update dependency files
|
# Update dependency files
|
||||||
self.__apply_upstream_changes()
|
self.__apply_upstream_changes()
|
||||||
|
|
||||||
# Add all changes and commit
|
if not Git.repo_is_clean():
|
||||||
has_new_commit = Git.add_and_commit(self.name, new_version)
|
# Update dependencies.yml file
|
||||||
|
self.__update_yaml(
|
||||||
if has_new_commit:
|
f"tag:{new_version}" if is_tag else status["version"]
|
||||||
# Push changes to remote
|
|
||||||
Git.push(branch)
|
|
||||||
|
|
||||||
# Create GitHub PR
|
|
||||||
GitHub.create_pr(
|
|
||||||
branch,
|
|
||||||
f"feat({self.name}): update to version {new_version}",
|
|
||||||
f"""## Description
|
|
||||||
|
|
||||||
Update for **{self.desc}**: update to version [{new_version}]({status['head_url']}).
|
|
||||||
Check out the [list of changes]({status['compare_url']}).
|
|
||||||
""",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add all changes and commit
|
||||||
|
has_new_commit = Git.add_and_commit(self.name, new_version)
|
||||||
|
|
||||||
|
if has_new_commit:
|
||||||
|
# Push changes to remote
|
||||||
|
Git.push(branch)
|
||||||
|
|
||||||
|
# Create GitHub PR
|
||||||
|
GitHub.create_pr(
|
||||||
|
branch,
|
||||||
|
f"chore({self.name}): update to version {new_version}",
|
||||||
|
f"""## Description
|
||||||
|
|
||||||
|
Update for **{self.desc}**: update to version [{new_version}]({status["head_url"]}).
|
||||||
|
Check out the [list of changes]({status["compare_url"]}).
|
||||||
|
""",
|
||||||
|
)
|
||||||
|
|
||||||
# Clean up repository
|
# Clean up repository
|
||||||
Git.clean_repo()
|
Git.clean_repo()
|
||||||
except (CommandRunner.Exception, shutil.Error) as e:
|
except (CommandRunner.Exception, shutil.Error) as e:
|
||||||
@@ -275,8 +276,8 @@ Check out the [list of changes]({status['compare_url']}).
|
|||||||
|
|
||||||
There is a new version of `{self.name}` {self.kind} available.
|
There is a new version of `{self.name}` {self.kind} available.
|
||||||
|
|
||||||
New version: [{new_version}]({status['head_url']})
|
New version: [{new_version}]({status["head_url"]})
|
||||||
Check out the [list of changes]({status['compare_url']}).
|
Check out the [list of changes]({status["compare_url"]}).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
print("Creating GitHub issue", file=sys.stderr)
|
print("Creating GitHub issue", file=sys.stderr)
|
||||||
@@ -377,21 +378,28 @@ class Git:
|
|||||||
)
|
)
|
||||||
return branch_name
|
return branch_name
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def repo_is_clean() -> bool:
|
||||||
|
"""
|
||||||
|
Returns `True` if the repo is clean.
|
||||||
|
Returns `False` if the repo is dirty.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
CommandRunner.run_or_fail(
|
||||||
|
["git", "diff", "--exit-code"], stage="CheckRepoClean"
|
||||||
|
)
|
||||||
|
return True
|
||||||
|
except CommandRunner.Exception:
|
||||||
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def add_and_commit(scope: str, version: str) -> bool:
|
def add_and_commit(scope: str, version: str) -> bool:
|
||||||
"""
|
"""
|
||||||
Returns `True` if there were changes and were indeed commited.
|
Returns `True` if there were changes and were indeed commited.
|
||||||
Returns `False` if the repo was clean and no changes were commited.
|
Returns `False` if the repo was clean and no changes were commited.
|
||||||
"""
|
"""
|
||||||
# check if repo is clean (clean => no error, no commit)
|
if Git.repo_is_clean():
|
||||||
try:
|
|
||||||
CommandRunner.run_or_fail(
|
|
||||||
["git", "diff", "--exit-code"], stage="CheckRepoClean"
|
|
||||||
)
|
|
||||||
return False
|
return False
|
||||||
except CommandRunner.Exception:
|
|
||||||
# if it's other kind of error just throw!
|
|
||||||
pass
|
|
||||||
|
|
||||||
user_name = os.environ.get("GIT_APP_NAME")
|
user_name = os.environ.get("GIT_APP_NAME")
|
||||||
user_email = os.environ.get("GIT_APP_EMAIL")
|
user_email = os.environ.get("GIT_APP_EMAIL")
|
||||||
@@ -415,7 +423,7 @@ class Git:
|
|||||||
f"user.email={user_email}",
|
f"user.email={user_email}",
|
||||||
"commit",
|
"commit",
|
||||||
"-m",
|
"-m",
|
||||||
f"feat({scope}): update to {version}",
|
f"chore({scope}): update to {version}",
|
||||||
],
|
],
|
||||||
stage="CreateCommit",
|
stage="CreateCommit",
|
||||||
env=clean_env,
|
env=clean_env,
|
||||||
|
|||||||
4
.github/workflows/installer.yml
vendored
4
.github/workflows/installer.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
- name: Install zsh
|
- name: Install zsh
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: sudo apt-get update; sudo apt-get install zsh
|
run: sudo apt-get update; sudo apt-get install zsh
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
- name: Install Vercel CLI
|
- name: Install Vercel CLI
|
||||||
run: npm install -g vercel
|
run: npm install -g vercel
|
||||||
- name: Setup project and deploy
|
- name: Setup project and deploy
|
||||||
|
|||||||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
- name: Install zsh
|
- name: Install zsh
|
||||||
run: sudo apt-get update; sudo apt-get install zsh
|
run: sudo apt-get update; sudo apt-get install zsh
|
||||||
- name: Check syntax
|
- name: Check syntax
|
||||||
|
|||||||
2
.github/workflows/project.yml
vendored
2
.github/workflows/project.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
id: generate-token
|
id: generate-token
|
||||||
uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
|
uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
|
||||||
with:
|
with:
|
||||||
app-id: ${{ secrets.OHMYZSH_APP_ID }}
|
app-id: ${{ secrets.OHMYZSH_APP_ID }}
|
||||||
private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
||||||
|
|||||||
4
.github/workflows/scorecard.yml
vendored
4
.github/workflows/scorecard.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
@@ -60,6 +60,6 @@ jobs:
|
|||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
|
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ To learn more, visit [ohmyz.sh](https://ohmyz.sh), follow [@ohmyzsh](https://x.c
|
|||||||
Twitter), and join us on [Discord](https://discord.gg/ohmyzsh).
|
Twitter), and join us on [Discord](https://discord.gg/ohmyzsh).
|
||||||
|
|
||||||
[](https://github.com/ohmyzsh/ohmyzsh/actions?query=workflow%3ACI)
|
[](https://github.com/ohmyzsh/ohmyzsh/actions?query=workflow%3ACI)
|
||||||
|
[](https://www.bestpractices.dev/projects/10713)
|
||||||
[](https://twitter.com/intent/follow?screen_name=ohmyzsh)
|
[](https://twitter.com/intent/follow?screen_name=ohmyzsh)
|
||||||
[](https://mstdn.social/@ohmyzsh)
|
[](https://mstdn.social/@ohmyzsh)
|
||||||
[](https://discord.gg/ohmyzsh)
|
[](https://discord.gg/ohmyzsh)
|
||||||
@@ -547,7 +548,7 @@ We're on social media:
|
|||||||
## Merchandise
|
## Merchandise
|
||||||
|
|
||||||
We have
|
We have
|
||||||
[stickers, shirts, and coffee mugs available](https://shop.planetargon.com/collections/oh-my-zsh?utm_source=github)
|
[stickers, shirts, and coffee mugs available](https://commitgoods.com/collections/oh-my-zsh?utm_source=github)
|
||||||
for you to show off your love of Oh My Zsh. Again, you will become the talk of the town!
|
for you to show off your love of Oh My Zsh. Again, you will become the talk of the town!
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
11
lib/cli.zsh
11
lib/cli.zsh
@@ -28,6 +28,7 @@ function _omz {
|
|||||||
'plugin:Manage plugins'
|
'plugin:Manage plugins'
|
||||||
'pr:Manage Oh My Zsh Pull Requests'
|
'pr:Manage Oh My Zsh Pull Requests'
|
||||||
'reload:Reload the current zsh session'
|
'reload:Reload the current zsh session'
|
||||||
|
'shop:Open the Oh My Zsh shop'
|
||||||
'theme:Manage themes'
|
'theme:Manage themes'
|
||||||
'update:Update Oh My Zsh'
|
'update:Update Oh My Zsh'
|
||||||
'version:Show the version'
|
'version:Show the version'
|
||||||
@@ -173,6 +174,7 @@ Available commands:
|
|||||||
plugin <command> Manage plugins
|
plugin <command> Manage plugins
|
||||||
pr <command> Manage Oh My Zsh Pull Requests
|
pr <command> Manage Oh My Zsh Pull Requests
|
||||||
reload Reload the current zsh session
|
reload Reload the current zsh session
|
||||||
|
shop Open the Oh My Zsh shop
|
||||||
theme <command> Manage themes
|
theme <command> Manage themes
|
||||||
update Update Oh My Zsh
|
update Update Oh My Zsh
|
||||||
version Show the version
|
version Show the version
|
||||||
@@ -721,6 +723,15 @@ function _omz::pr::test {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _omz::shop {
|
||||||
|
local shop_url="https://commitgoods.com/collections/oh-my-zsh"
|
||||||
|
|
||||||
|
_omz::log info "Opening Oh My Zsh shop in your browser..."
|
||||||
|
_omz::log info "$shop_url"
|
||||||
|
|
||||||
|
open_command "$shop_url"
|
||||||
|
}
|
||||||
|
|
||||||
function _omz::reload {
|
function _omz::reload {
|
||||||
# Delete current completion cache
|
# Delete current completion cache
|
||||||
command rm -f $_comp_dumpfile $ZSH_COMPDUMP
|
command rm -f $_comp_dumpfile $ZSH_COMPDUMP
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
# Fig plugin
|
|
||||||
|
|
||||||
This plugin sets up completion for [Fig](https://fig.io/).
|
|
||||||
|
|
||||||
To use it, add `fig` to the plugins array in your zshrc file:
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
plugins=(... fig)
|
|
||||||
```
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
if ! (( $+commands[fig] )); then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If the completion file doesn't exist yet, we need to autoload it and
|
|
||||||
# bind it to `fig`. Otherwise, compinit will have already done that
|
|
||||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_fig" ]]; then
|
|
||||||
autoload -Uz _fig
|
|
||||||
typeset -g -A _comps
|
|
||||||
_comps[fig]=_fig
|
|
||||||
fi
|
|
||||||
|
|
||||||
fig completion zsh >| "$ZSH_CACHE_DIR/completions/_fig" &|
|
|
||||||
@@ -12,6 +12,16 @@ plugins=(... jj)
|
|||||||
|
|
||||||
| Alias | Command |
|
| Alias | Command |
|
||||||
| ------ | ----------------------------- |
|
| ------ | ----------------------------- |
|
||||||
|
| jjb | `jj bookmark` |
|
||||||
|
| jjbc | `jj bookmark create` |
|
||||||
|
| jjbd | `jj bookmark delete` |
|
||||||
|
| jjbf | `jj bookmark forget` |
|
||||||
|
| jjbl | `jj bookmark list` |
|
||||||
|
| jjbm | `jj bookmark move` |
|
||||||
|
| jjbr | `jj bookmark rename` |
|
||||||
|
| jjbs | `jj bookmark set` |
|
||||||
|
| jjbt | `jj bookmark track` |
|
||||||
|
| jjbu | `jj bookmark untrack` |
|
||||||
| jjc | `jj commit` |
|
| jjc | `jj commit` |
|
||||||
| jjcmsg | `jj commit --message` |
|
| jjcmsg | `jj commit --message` |
|
||||||
| jjd | `jj diff` |
|
| jjd | `jj diff` |
|
||||||
@@ -22,14 +32,20 @@ plugins=(... jj)
|
|||||||
| jjgf | `jj git fetch` |
|
| jjgf | `jj git fetch` |
|
||||||
| jjgfa | `jj git fetch --all-remotes` |
|
| jjgfa | `jj git fetch --all-remotes` |
|
||||||
| jjgp | `jj git push` |
|
| jjgp | `jj git push` |
|
||||||
|
| jjgpa | `jj git push --all` |
|
||||||
|
| jjgpd | `jj git push --deleted` |
|
||||||
|
| jjgpt | `jj git push --tracked` |
|
||||||
| jjl | `jj log` |
|
| jjl | `jj log` |
|
||||||
| jjla | `jj log -r "all()"` |
|
| jjla | `jj log -r "all()"` |
|
||||||
| jjn | `jj new` |
|
| jjn | `jj new` |
|
||||||
|
| jjnt | `jj new "trunk()"` |
|
||||||
| jjrb | `jj rebase` |
|
| jjrb | `jj rebase` |
|
||||||
|
| jjrbm | `jj rebase -d "trunk()"` |
|
||||||
| jjrs | `jj restore` |
|
| jjrs | `jj restore` |
|
||||||
| jjrt | `cd "$(jj root \|\| echo .)"` |
|
| jjrt | `cd "$(jj root \|\| echo .)"` |
|
||||||
| jjsp | `jj split` |
|
| jjsp | `jj split` |
|
||||||
| jjsq | `jj squash` |
|
| jjsq | `jj squash` |
|
||||||
|
| jjst | `jj status` |
|
||||||
|
|
||||||
## Prompt usage
|
## Prompt usage
|
||||||
|
|
||||||
@@ -88,3 +104,4 @@ that.
|
|||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- [nasso](https://github.com/nasso) - Plugin Author
|
- [nasso](https://github.com/nasso) - Plugin Author
|
||||||
|
- [imp](https://github.com/imp) - Occasional Alias Contributor
|
||||||
|
|||||||
@@ -34,6 +34,16 @@ function jj_prompt_template() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Aliases (sorted alphabetically)
|
# Aliases (sorted alphabetically)
|
||||||
|
alias jjb='jj bookmark'
|
||||||
|
alias jjbc='jj bookmark create'
|
||||||
|
alias jjbd='jj bookmark delete'
|
||||||
|
alias jjbf='jj bookmark forget'
|
||||||
|
alias jjbl='jj bookmark list'
|
||||||
|
alias jjbm='jj bookmark move'
|
||||||
|
alias jjbr='jj bookmark rename'
|
||||||
|
alias jjbs='jj bookmark set'
|
||||||
|
alias jjbt='jj bookmark track'
|
||||||
|
alias jjbu='jj bookmark untrack'
|
||||||
alias jjc='jj commit'
|
alias jjc='jj commit'
|
||||||
alias jjcmsg='jj commit --message'
|
alias jjcmsg='jj commit --message'
|
||||||
alias jjd='jj diff'
|
alias jjd='jj diff'
|
||||||
@@ -44,11 +54,17 @@ alias jjgcl='jj git clone'
|
|||||||
alias jjgf='jj git fetch'
|
alias jjgf='jj git fetch'
|
||||||
alias jjgfa='jj git fetch --all-remotes'
|
alias jjgfa='jj git fetch --all-remotes'
|
||||||
alias jjgp='jj git push'
|
alias jjgp='jj git push'
|
||||||
|
alias jjgpa='jj git push --all'
|
||||||
|
alias jjgpd='jj git push --deleted'
|
||||||
|
alias jjgpt='jj git push --tracked'
|
||||||
alias jjl='jj log'
|
alias jjl='jj log'
|
||||||
alias jjla='jj log -r "all()"'
|
alias jjla='jj log -r "all()"'
|
||||||
alias jjn='jj new'
|
alias jjn='jj new'
|
||||||
|
alias jjnt='jj new "trunk()"'
|
||||||
alias jjrb='jj rebase'
|
alias jjrb='jj rebase'
|
||||||
|
alias jjrbm='jj rebase -d "trunk()"'
|
||||||
alias jjrs='jj restore'
|
alias jjrs='jj restore'
|
||||||
alias jjrt='cd "$(jj root || echo .)"'
|
alias jjrt='cd "$(jj root || echo .)"'
|
||||||
alias jjsp='jj split'
|
alias jjsp='jj split'
|
||||||
alias jjsq='jj squash'
|
alias jjsq='jj squash'
|
||||||
|
alias jjst='jj status'
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ function {
|
|||||||
zstyle -a :omz:plugins:keychain options options
|
zstyle -a :omz:plugins:keychain options options
|
||||||
|
|
||||||
# Check keychain version to decide whether to use --agents
|
# Check keychain version to decide whether to use --agents
|
||||||
local version_string=$(keychain --version 2>&1 | head -n 2 | tail -n 1 | cut -d ' ' -f 4)
|
local version_string=$(keychain --version 2>&1)
|
||||||
# start keychain, only use --agents for versions below 2.9.0
|
# start keychain, only use --agents for versions below 2.9.0
|
||||||
autoload -Uz is-at-least
|
autoload -Uz is-at-least
|
||||||
if is-at-least 2.9 "$version_string"; then
|
if [[ "$version_string" =~ 'keychain ([0-9]+\.[0-9]+)' ]] && \
|
||||||
|
is-at-least 2.9 "$match[1]"; then
|
||||||
keychain ${^options:-} ${^identities} --host $SHORT_HOST
|
keychain ${^options:-} ${^identities} --host $SHORT_HOST
|
||||||
else
|
else
|
||||||
keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST
|
keychain ${^options:-} --agents ${agents:-gpg} ${^identities} --host $SHORT_HOST
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ plugins=(... kubectl)
|
|||||||
| kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
|
| kdel | `kubectl delete` | Delete resources by filenames, stdin, resources and names, or by resources and label selector |
|
||||||
| kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument |
|
| kdelf | `kubectl delete -f` | Delete a pod using the type and name specified in -f argument |
|
||||||
| kge | `kubectl get events --sort-by=".lastTimestamp"` | Get events (sorted by timestamp) |
|
| kge | `kubectl get events --sort-by=".lastTimestamp"` | Get events (sorted by timestamp) |
|
||||||
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
|
| kgew | `kubectl get events --watch --sort-by=".lastTimestamp"` | Get events and watch as they occur (sorted by timestamp) |
|
||||||
| | | **Pod management** |
|
| | | **Pod management** |
|
||||||
| kgp | `kubectl get pods` | List all pods in ps output format |
|
| kgp | `kubectl get pods` | List all pods in ps output format |
|
||||||
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
|
| kgpl | `kgp -l` | Get pods by label. Example: `kgpl "app=myapp" -n myns` |
|
||||||
@@ -74,6 +74,7 @@ plugins=(... kubectl)
|
|||||||
| kdeld | `kubectl delete deployment` | Delete the deployment |
|
| kdeld | `kubectl delete deployment` | Delete the deployment |
|
||||||
| ksd | `kubectl scale deployment` | Scale a deployment |
|
| ksd | `kubectl scale deployment` | Scale a deployment |
|
||||||
| krsd | `kubectl rollout status deployment` | Check the rollout status of a deployment |
|
| krsd | `kubectl rollout status deployment` | Check the rollout status of a deployment |
|
||||||
|
| krrd | `kubectl rollout restart deployment` | Rollout restart a deployment |
|
||||||
| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime |
|
| kres | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime |
|
||||||
| | | **Rollout management** |
|
| | | **Rollout management** |
|
||||||
| kgrs | `kubectl get replicaset` | List all ReplicaSets `rs` created by the deployment |
|
| kgrs | `kubectl get replicaset` | List all ReplicaSets `rs` created by the deployment |
|
||||||
@@ -112,6 +113,7 @@ plugins=(... kubectl)
|
|||||||
| kdelss | `kubectl delete statefulset` | Delete the statefulset |
|
| kdelss | `kubectl delete statefulset` | Delete the statefulset |
|
||||||
| ksss | `kubectl scale statefulset` | Scale a statefulset |
|
| ksss | `kubectl scale statefulset` | Scale a statefulset |
|
||||||
| krsss | `kubectl rollout status statefulset` | Check the rollout status of a deployment |
|
| krsss | `kubectl rollout status statefulset` | Check the rollout status of a deployment |
|
||||||
|
| krrss | `kubectl rollout restart statefulset` | Rollout restart a statefulset |
|
||||||
| | | **Service Accounts management** |
|
| | | **Service Accounts management** |
|
||||||
| kdsa | `kubectl describe sa` | Describe a service account in details |
|
| kdsa | `kubectl describe sa` | Describe a service account in details |
|
||||||
| kdelsa | `kubectl delete sa` | Delete the service account |
|
| kdelsa | `kubectl delete sa` | Delete the service account |
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ alias kdd='kubectl describe deployment'
|
|||||||
alias kdeld='kubectl delete deployment'
|
alias kdeld='kubectl delete deployment'
|
||||||
alias ksd='kubectl scale deployment'
|
alias ksd='kubectl scale deployment'
|
||||||
alias krsd='kubectl rollout status deployment'
|
alias krsd='kubectl rollout status deployment'
|
||||||
|
alias krrd='kubectl rollout restart deployment'
|
||||||
|
|
||||||
function kres(){
|
function kres(){
|
||||||
kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S)
|
kubectl set env $@ REFRESHED_AT=$(date +%Y%m%d%H%M%S)
|
||||||
@@ -120,6 +121,7 @@ alias kdss='kubectl describe statefulset'
|
|||||||
alias kdelss='kubectl delete statefulset'
|
alias kdelss='kubectl delete statefulset'
|
||||||
alias ksss='kubectl scale statefulset'
|
alias ksss='kubectl scale statefulset'
|
||||||
alias krsss='kubectl rollout status statefulset'
|
alias krsss='kubectl rollout status statefulset'
|
||||||
|
alias krrss='kubectl rollout restart statefulset'
|
||||||
|
|
||||||
# Port forwarding
|
# Port forwarding
|
||||||
alias kpf="kubectl port-forward"
|
alias kpf="kubectl port-forward"
|
||||||
|
|||||||
41
plugins/pulumi/README.md
Normal file
41
plugins/pulumi/README.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Pulumi
|
||||||
|
|
||||||
|
This is an **Oh My Zsh plugin** for the [**Pulumi CLI**](https://www.pulumi.com/docs/iac/cli/),
|
||||||
|
an Infrastructure as Code (IaC) tool for building, deploying and managing cloud infrastucture.
|
||||||
|
|
||||||
|
This plugin provides:
|
||||||
|
|
||||||
|
- 🚀 Short, intuitive aliases for common Pulumi commands
|
||||||
|
- 🎯 Auto-completion support for Pulumi
|
||||||
|
|
||||||
|
To use it, add `pulumi` to the plugins array in your `.zshrc` file:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
plugins=(... pulumi)
|
||||||
|
```
|
||||||
|
|
||||||
|
## ⚡ Aliases
|
||||||
|
|
||||||
|
| Alias | Command | Description |
|
||||||
|
| -------- | ---------------------- | ----------------------------- |
|
||||||
|
| `pul` | `pulumi` | Shortcut for Pulumi CLI |
|
||||||
|
| `pulcs` | `pulumi config set` | Set Pulumi configuration |
|
||||||
|
| `puld` | `pulumi destroy` | Destroy all resources |
|
||||||
|
| `pullog` | `pulumi logs -f` | Tail Pulumi logs in real-time |
|
||||||
|
| `pulp` | `pulumi preview` | Show planned changes |
|
||||||
|
| `pulr` | `pulumi refresh` | Refresh state from cloud |
|
||||||
|
| `puls` | `pulumi stack` | Show stack details |
|
||||||
|
| `pulsh` | `pulumi stack history` | Show stack history |
|
||||||
|
| `pulsi` | `pulumi stack init` | Initialize a new stack |
|
||||||
|
| `pulsl` | `pulumi stack ls` | List available stacks |
|
||||||
|
| `pulso` | `pulumi stack output` | Show stack outputs |
|
||||||
|
| `pulss` | `pulumi stack select` | Switch stack |
|
||||||
|
| `pulu` | `pulumi up` | Deploy infrastructure |
|
||||||
|
|
||||||
|
## 🎯 Autocompletion
|
||||||
|
|
||||||
|
If `pulumi gen-completion zsh` is available, this plugin **automatically loads Pulumi auto-completion**.
|
||||||
|
|
||||||
|
## 🛠️ Contribution
|
||||||
|
|
||||||
|
Feel free to open an issue or PR for improvements! 🚀
|
||||||
28
plugins/pulumi/pulumi.plugin.zsh
Normal file
28
plugins/pulumi/pulumi.plugin.zsh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
if (( ! $+commands[pulumi] )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
|
# bind it to `pulumi`. Otherwise, compinit will have already done that.
|
||||||
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_pulumi" ]]; then
|
||||||
|
typeset -g -A _comps
|
||||||
|
autoload -Uz _pulumi
|
||||||
|
_comps[pulumi]=_pulumi
|
||||||
|
fi
|
||||||
|
|
||||||
|
pulumi gen-completion zsh >| "$ZSH_CACHE_DIR/completions/_pulumi" &|
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
alias pul='pulumi'
|
||||||
|
alias pulcs='pulumi config set'
|
||||||
|
alias puld='pulumi destroy'
|
||||||
|
alias pullog='pulumi logs -f'
|
||||||
|
alias pulp='pulumi preview'
|
||||||
|
alias pulr='pulumi refresh'
|
||||||
|
alias puls='pulumi stack'
|
||||||
|
alias pulsh='pulumi stack history'
|
||||||
|
alias pulsi='pulumi stack init'
|
||||||
|
alias pulsl='pulumi stack ls'
|
||||||
|
alias pulso='pulumi stack output'
|
||||||
|
alias pulss='pulumi stack select'
|
||||||
|
alias pulu='pulumi up'
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# rbfu plugin
|
|
||||||
|
|
||||||
This plugin starts [rbfu](https://github.com/hmans/rbfu), a minimal Ruby version
|
|
||||||
manager, and adds some useful functions.
|
|
||||||
|
|
||||||
To use it, add `rbfu` to the plugins array in your zshrc file:
|
|
||||||
|
|
||||||
```zsh
|
|
||||||
plugins=(... rbfu)
|
|
||||||
```
|
|
||||||
|
|
||||||
**Note: `rbfu` is deprecated and should no longer be used.**
|
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
- `rbfu-rubies`: lists all installed rubies available to rbfu.
|
|
||||||
|
|
||||||
- `rvm_prompt_info`: shows the Ruby version being used with rbfu.
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
# Enables rbfu with --auto option, if available.
|
|
||||||
#
|
|
||||||
# Also provides a command to list all installed/available
|
|
||||||
# rubies. To ensure compatibility with themes, creates the
|
|
||||||
# rvm_prompt_info function to return the $RBFU_RUBY_VERSION
|
|
||||||
# version.
|
|
||||||
|
|
||||||
command -v rbfu &>/dev/null || return
|
|
||||||
|
|
||||||
eval "$(rbfu --init --auto)"
|
|
||||||
|
|
||||||
# Internal: Print ruby version details, if it's currently active, etc.
|
|
||||||
function _rbfu_rubies_print() {
|
|
||||||
# 1: path to ruby file
|
|
||||||
# 2: active ruby
|
|
||||||
local rb rb_out
|
|
||||||
rb="${$1:t}"
|
|
||||||
rb_out="$rb"
|
|
||||||
|
|
||||||
# If the ruby is a symlink, add @ to the name.
|
|
||||||
if [[ -h "$1" ]]; then
|
|
||||||
rb_out="${rb_out}${fg[green]}@${reset_color}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If the ruby is active, add * to the name and show it in red.
|
|
||||||
if [[ "$rb" = "$2" ]]; then
|
|
||||||
rb_out="${fg[red]}${rb_out} ${fg[red]}*${reset_color}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $rb_out
|
|
||||||
}
|
|
||||||
|
|
||||||
# Public: Provide a list with all available rubies, this basically depends
|
|
||||||
# on ~/.rfbu/rubies. Highlights the currently active ruby version and aliases.
|
|
||||||
function rbfu-rubies() {
|
|
||||||
local rbfu_dir active_rb
|
|
||||||
rbfu_dir="${RBFU_RUBIES:-${HOME}/.rbfu/rubies}"
|
|
||||||
active_rb="${RBFU_RUBY_VERSION:-system}"
|
|
||||||
|
|
||||||
_rbfu_rubies_print "${rbfu_dir}/system" "$active_rb"
|
|
||||||
for rb in ${rbfu_dir}/*(N); do
|
|
||||||
_rbfu_rubies_print "$rb" "$active_rb"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# Public: Create rvm_prompt_info command for themes compatibility, unless
|
|
||||||
# it has already been defined.
|
|
||||||
(( ${+functions[rvm_prompt_info]} )) || \
|
|
||||||
function rvm_prompt_info() { echo "${${RBFU_RUBY_VERSION:=system}:gs/%/%%}" }
|
|
||||||
@@ -19,6 +19,7 @@ plugins=(... uv)
|
|||||||
| uvlu | `uv lock --upgrade` | Lock the dependencies to the newest compatible versions |
|
| uvlu | `uv lock --upgrade` | Lock the dependencies to the newest compatible versions |
|
||||||
| uvp | `uv pip` | Manage pip packages |
|
| uvp | `uv pip` | Manage pip packages |
|
||||||
| uvpy | `uv python` | Manage Python installs |
|
| uvpy | `uv python` | Manage Python installs |
|
||||||
|
| uvpp | `uv python pin` | Pin the current project to use a specific Python version |
|
||||||
| uvr | `uv run` | Run commands within the project's environment |
|
| uvr | `uv run` | Run commands within the project's environment |
|
||||||
| uvrm | `uv remove` | Remove packages from the project |
|
| uvrm | `uv remove` | Remove packages from the project |
|
||||||
| uvs | `uv sync` | Sync the environment with the lock file |
|
| uvs | `uv sync` | Sync the environment with the lock file |
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ alias uvlr='uv lock --refresh'
|
|||||||
alias uvlu='uv lock --upgrade'
|
alias uvlu='uv lock --upgrade'
|
||||||
alias uvp='uv pip'
|
alias uvp='uv pip'
|
||||||
alias uvpy='uv python'
|
alias uvpy='uv python'
|
||||||
|
alias uvpp='uv python pin'
|
||||||
alias uvr='uv run'
|
alias uvr='uv run'
|
||||||
alias uvrm='uv remove'
|
alias uvrm='uv remove'
|
||||||
alias uvs='uv sync'
|
alias uvs='uv sync'
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ print_success() {
|
|||||||
printf '\n'
|
printf '\n'
|
||||||
printf '%s\n' "• Follow us on X: $(fmt_link @ohmyzsh https://x.com/ohmyzsh)"
|
printf '%s\n' "• Follow us on X: $(fmt_link @ohmyzsh https://x.com/ohmyzsh)"
|
||||||
printf '%s\n' "• Join our Discord community: $(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
printf '%s\n' "• Join our Discord community: $(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
||||||
printf '%s\n' "• Get stickers, t-shirts, coffee mugs and more: $(fmt_link "Planet Argon Shop" https://shop.planetargon.com/collections/oh-my-zsh)"
|
printf '%s\n' "• Get stickers, t-shirts, coffee mugs and more: $(fmt_link "CommitGoods Shop" https://commitgoods.com/collections/oh-my-zsh)"
|
||||||
printf '%s\n' $FMT_RESET
|
printf '%s\n' $FMT_RESET
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ if LANG= git pull --quiet --rebase $remote $branch; then
|
|||||||
printf "${BLUE}%s${RESET}\n\n" "$message"
|
printf "${BLUE}%s${RESET}\n\n" "$message"
|
||||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "To keep up with the latest news and updates, follow us on X:" "$(fmt_link @ohmyzsh https://x.com/ohmyzsh)"
|
printf "${BLUE}${BOLD}%s %s${RESET}\n" "To keep up with the latest news and updates, follow us on X:" "$(fmt_link @ohmyzsh https://x.com/ohmyzsh)"
|
||||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Want to get involved in the community? Join our Discord:" "$(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Want to get involved in the community? Join our Discord:" "$(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
||||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Get your Oh My Zsh swag at:" "$(fmt_link "Planet Argon Shop" https://shop.planetargon.com/collections/oh-my-zsh)"
|
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Get your Oh My Zsh swag at:" "$(fmt_link "CommitGoods Shop" https://commitgoods.com/collections/oh-my-zsh)"
|
||||||
elif [[ $verbose_mode == minimal ]]; then
|
elif [[ $verbose_mode == minimal ]]; then
|
||||||
printf "${BLUE}%s${RESET}\n" "$message"
|
printf "${BLUE}%s${RESET}\n" "$message"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user