mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-11-28 11:23:03 +01:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7c3ad8379 | ||
|
|
b008e21f9c | ||
|
|
3d5a7b0df4 | ||
|
|
44a5decbc4 | ||
|
|
90f9fbc532 | ||
|
|
801782e8a6 |
No files matched your search
@@ -1,21 +1,57 @@
|
||||
## Standards checklist:
|
||||
<!--
|
||||
Thanks for contributing! Read CONTRIBUTING.md first.
|
||||
Keep this proportional to the change: short paragraphs or bullets are welcome.
|
||||
Remove these instructions before submitting.
|
||||
|
||||
<!-- Fill with an x the ones that apply. Example: [x] -->
|
||||
Report only evidence you have. Distinguish agent-run checks from personal
|
||||
testing, identify missing checks or demos, and leave unconfirmed items
|
||||
unchecked. Don't promise follow-up work on someone else's behalf.
|
||||
-->
|
||||
|
||||
- [ ] The PR title is descriptive.
|
||||
- [ ] The PR doesn't replicate another PR which is already open.
|
||||
- [ ] I have read the contribution guide and followed all the instructions.
|
||||
- [ ] The code follows the code style guide detailed in the wiki.
|
||||
- [ ] The code is mine or it's from somewhere with an MIT-compatible license.
|
||||
- [ ] If I used AI tools (ChatGPT, Claude, Gemini, etc.) to assist with this contribution, I've disclosed it below.
|
||||
- [ ] The code is efficient, to the best of my ability, and does not waste computer resources.
|
||||
- [ ] The code is stable and I have tested it myself, to the best of my abilities.
|
||||
- [ ] If the code introduces new aliases, I provide a valid use case for all plugin users down below.
|
||||
## What and why
|
||||
|
||||
## Changes:
|
||||
<!-- What changes, who benefits, and how does it make their command-line
|
||||
experience easier or more delightful? A few sentences are usually enough.
|
||||
Link related issues or requests if available; don't invent demand.
|
||||
|
||||
- [...]
|
||||
A personal itch is a welcome starting point. Explain why the change belongs
|
||||
in the shared project. For aliases, describe common workflows they support. -->
|
||||
|
||||
## Other comments:
|
||||
## Demo and verification
|
||||
|
||||
...
|
||||
<!-- For user-facing changes, include before/after screenshots, a GIF,
|
||||
or a short video. For new features, show an example in use.
|
||||
If a visual isn't useful, briefly explain why. If it's missing, say so.
|
||||
|
||||
Describe checks actually run and their results, relevant versions, and
|
||||
testing gaps. Distinguish agent-run checks from personal testing.
|
||||
For documentation-only changes, describe what you checked. -->
|
||||
|
||||
## Other notes
|
||||
|
||||
<!-- Include only what applies:
|
||||
- Compatibility concerns or areas needing particular attention.
|
||||
- How users can discover a feature: README update, example, or shared demo.
|
||||
- Meaningful AI assistance and its role; basic autocomplete doesn't count.
|
||||
|
||||
Delete this section if it isn't needed. -->
|
||||
|
||||
<details>
|
||||
<summary>Submission checklist</summary>
|
||||
|
||||
<!-- Check confirmed items with [x]. For conditional items, check them if
|
||||
the condition doesn't apply. Otherwise, mark inapplicable items "N/A"
|
||||
with a brief reason. -->
|
||||
|
||||
- [ ] The PR title follows the [commit conventions](https://github.com/ohmyzsh/ohmyzsh/blob/master/CONTRIBUTING.md#commit-guidelines) and clearly describes the change.
|
||||
- [ ] I've searched for existing PRs and confirmed this isn't a duplicate.
|
||||
- [ ] I've read and followed the [contribution guidelines](https://github.com/ohmyzsh/ohmyzsh/blob/master/CONTRIBUTING.md).
|
||||
- [ ] My code follows the [code style guide](https://github.com/ohmyzsh/ohmyzsh/wiki/Code-Style-Guide).
|
||||
- [ ] I wrote this code or can contribute it under an MIT-compatible license.
|
||||
- [ ] If I meaningfully used AI tools, I've disclosed their role above.
|
||||
- [ ] I've included a visual demonstration or explained why a visual isn't useful.
|
||||
- [ ] I've considered performance and avoided unnecessary work or resource use.
|
||||
- [ ] I've personally tested the change and described results and limitations above.
|
||||
- [ ] If I've added aliases, I've explained their usefulness for common workflows.
|
||||
|
||||
</details>
|
||||
@@ -18,6 +18,7 @@ you would make is not already covered.
|
||||
- [You have a suggestion](#you-have-a-suggestion)
|
||||
- [Submitting Pull Requests](#submitting-pull-requests)
|
||||
- [Getting started](#getting-started)
|
||||
- [Writing your PR description](#writing-your-pr-description)
|
||||
- [You have a solution](#you-have-a-solution)
|
||||
- [You have an addition](#you-have-an-addition)
|
||||
- [A note on AI-assisted contributions](#a-note-on-ai-assisted-contributions)
|
||||
@@ -78,6 +79,42 @@ any issue that would be solved in the PR description body,
|
||||
[for instance](https://help.github.com/articles/closing-issues-via-commit-messages/)
|
||||
_"Fixes #XXXX"_ for issue number XXXX.
|
||||
|
||||
### Writing your PR description
|
||||
|
||||
Use the [PR template](.github/PULL_REQUEST_TEMPLATE.md) to help people understand
|
||||
the purpose of your change before they reach the submission checklist. Keep answers
|
||||
short and proportional to the change; a sentence or two per section is often enough.
|
||||
|
||||
Oh My Zsh should make the command line more delightful. Tell us whose day your
|
||||
change makes easier, clearer, or more enjoyable, and how. Scratching your own itch
|
||||
is a welcome starting point! Your change doesn't need to help everyone, but explain
|
||||
why it would be useful to others and belongs in the shared project. Link relevant
|
||||
requests or examples when you have them; otherwise, explain the expected benefit
|
||||
without claiming demand you haven't seen.
|
||||
|
||||
For user-facing changes, include screenshots, a GIF, or a short video showing
|
||||
before/after behavior. For a new feature, demonstrate it in use. Label the examples,
|
||||
keep terminal text readable, and remove private information. For low-level or other
|
||||
non-visual changes, explain why a visual wouldn't be useful. If a demo is needed
|
||||
but you can't capture it yet, say so rather than marking it inapplicable.
|
||||
|
||||
Describe the checks actually run and their results, relevant environment versions,
|
||||
and any testing gaps. Distinguish automated or agent-run checks from testing you
|
||||
personally performed. For documentation-only changes, describe what you checked.
|
||||
Only check the personal-testing item after you've done that testing yourself.
|
||||
|
||||
For features and enhancements, tell us how you'll help users discover and use them.
|
||||
A plugin README update, a usage example, or sharing your demo are good ways to help.
|
||||
Be clear about what's included in the PR and what's planned for later.
|
||||
|
||||
**For coding agents:** read these guidelines and the PR template before drafting a
|
||||
PR. Keep the description grounded in available evidence. Don't invent user requests,
|
||||
test results, or demo links, and don't claim personal testing or confirmation on the
|
||||
contributor's behalf. Leave unconfirmed checklist items unchecked and identify
|
||||
missing testing or demos. Don't commit the contributor to follow-up work they
|
||||
haven't agreed to. Disclose meaningful AI assistance in the template's "Other notes"
|
||||
section, following the [AI contribution guidance](#a-note-on-ai-assisted-contributions).
|
||||
|
||||
### You have a solution
|
||||
|
||||
Please be so kind as to [search](#use-the-search-luke) for any open issue already covering
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
# P.C. Shyamshankar <sykora@lucentbeing.com>
|
||||
# Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/
|
||||
|
||||
autoload -Uz is-at-least
|
||||
|
||||
typeset -AHg FX FG BG
|
||||
|
||||
FX=(
|
||||
@@ -18,7 +20,16 @@ FX=(
|
||||
() {
|
||||
setopt localoptions noksharrays
|
||||
local -a codes fg bg
|
||||
local code
|
||||
codes=({000..255})
|
||||
# ${a:^b} array zipping needs zsh 5.0.6
|
||||
if ! is-at-least 5.0.6; then
|
||||
for code in $codes; do
|
||||
FG[$code]="%{"$'\e'"[38;5;${code}m%}"
|
||||
BG[$code]="%{"$'\e'"[48;5;${code}m%}"
|
||||
done
|
||||
return
|
||||
fi
|
||||
fg=( "%{"$'\e'"[38;5;"${^codes}"m%}" )
|
||||
bg=( "%{"$'\e'"[48;5;"${^codes}"m%}" )
|
||||
FG=( ${codes:^fg} )
|
||||
|
||||
@@ -177,7 +177,6 @@ plugins=(... git)
|
||||
| `grhh` | `git reset --hard` |
|
||||
| `grhk` | `git reset --keep` |
|
||||
| `grhs` | `git reset --soft` |
|
||||
| `grpa` | `git reset --patch` |
|
||||
| `gpristine` | `git reset --hard && git clean --force -dfx` |
|
||||
| `gwipe` | `git reset --hard && git clean --force -df` |
|
||||
| `groh` | `git reset origin/$(git_current_branch) --hard` |
|
||||
|
||||
@@ -378,7 +378,6 @@ alias gru='git reset --'
|
||||
alias grhh='git reset --hard'
|
||||
alias grhk='git reset --keep'
|
||||
alias grhs='git reset --soft'
|
||||
alias grpa='git reset --patch'
|
||||
alias gpristine='git reset --hard && git clean --force -dfx'
|
||||
alias gwipe='git reset --hard && git clean --force -df'
|
||||
alias groh='git reset origin/$(git_current_branch) --hard'
|
||||
|
||||
@@ -12,6 +12,14 @@ plugins=(... terraform)
|
||||
## Requirements
|
||||
|
||||
- [Terraform](https://terraform.io/)
|
||||
- [terraform-docs](https://terraform-docs.io/) (optional, for completion)
|
||||
|
||||
## terraform-docs completion
|
||||
|
||||
If `terraform-docs` is installed, this plugin also enables its completion.
|
||||
The completion script is generated from the installed version and cached in
|
||||
`$ZSH_CACHE_DIR/completions/_terraform-docs`. It is refreshed in the background
|
||||
each time the plugin loads, so completion stays in sync with the installed CLI.
|
||||
|
||||
## Aliases
|
||||
|
||||
|
||||
@@ -39,3 +39,23 @@ alias tfsh='terraform show'
|
||||
alias tfw='terraform workspace'
|
||||
alias tfwl='terraform workspace list'
|
||||
alias tfws='terraform workspace select'
|
||||
|
||||
if (( $+commands[terraform-docs] )); then
|
||||
# If the completion file doesn't exist yet, compinit hasn't registered it.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_terraform-docs" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _terraform-docs
|
||||
_comps[terraform-docs]=_terraform-docs
|
||||
fi
|
||||
|
||||
zmodload -F zsh/files b:zf_mv
|
||||
() {
|
||||
local completions
|
||||
completions=$(command terraform-docs completion zsh) || return
|
||||
[[ -n "$completions" ]] || return
|
||||
|
||||
local TMPPREFIX="$ZSH_CACHE_DIR/completions/._terraform-docs"
|
||||
zf_mv -f -- =(print -r -- "$completions") \
|
||||
"$ZSH_CACHE_DIR/completions/_terraform-docs"
|
||||
} &|
|
||||
fi
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
To use it, add thefuck to the plugins array of your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... thefuck)
|
||||
```
|
||||
|
||||
## Usage
|
||||
Press `ESC` twice to correct previous console command.
|
||||
|
||||
Reference in new issue
Block a user