Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (332 commits)
  fix(clipboard): load clipboard on usage
  feat(alias-finder): add cheaper option and apply zstyle options (ohmyzsh#11773)
  fix(git): some aliases under non-english LANG (ohmyzsh#11855)
  refactor(git): sort git aliases alphabetically (ohmyzsh#9743)
  fix(extract): extraction to directory for single-file .gz (ohmyzsh#11852)
  refactor(init): rename variable (ohmyzsh#11851)
  fix(colored-man-pages): add env GROFF_NO_SGR=1 (ohmyzsh#11831)
  feat(terraform): add terraform version prompt (ohmyzsh#11845)
  docs(aliases): replace screenshot
  chore(gitignore): use new API endpoint from TopTal (ohmyzsh#11835)
  feat(agnoster): add git tag to prompt (ohmyzsh#8417)
  feat(fino-time): add conda environment (ohmyzsh#11785)
  fix(aliases): rename acs to als in script help
  fix(per-directory-history): ^G also in vi mode (ohmyzsh#11808)
  fix(michelebologna): use blue instead of white (ohmyzsh#11810)
  feat(docker): add `legacy-completion` option
  feat(tig): add two new aliases (ohmyzsh#11090)
  fix(nvm): remove nvm not found verbose message
  fix(aliases)!: rename `acs` to `als`
  fix(ubuntu)!: rename `acse` alias to `acs`
  ...
  • Loading branch information
Gerardo Curiel committed Aug 27, 2023
2 parents a98060e + 03a0d5b commit 4083863
Show file tree
Hide file tree
Showing 256 changed files with 6,766 additions and 2,787 deletions.
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Plugin owners
plugins/archlinux/ @ratijas
plugins/aws/ @maksyms
plugins/genpass/ @atoponce
plugins/git-lfs/ @hellovietduc
plugins/gitfast/ @felipec
plugins/react-native @esthor
plugins/sdk/ @rgoldberg
plugins/shell-proxy/ @septs
plugins/universalarchive/ @Konfekt
plugins/wp-cli/ @joshmedeski
plugins/zoxide/ @ajeetdsouza
plugins/starship/ @axieax
plugins/dbt/ @msempere
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [ ] The code is mine or it's from somewhere with an MIT-compatible license.
- [ ] 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.

## Changes:

Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test and Deploy installer
on:
workflow_dispatch: {}
push:
paths:
- tools/install.sh
- .github/workflows/installer
- .github/workflows/installer.yml

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: false

permissions:
contents: read # to checkout

jobs:
test:
name: Test installer
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
steps:
- name: Set up git repository
uses: actions/checkout@v3
- name: Install zsh
if: runner.os == 'Linux'
run: sudo apt-get update; sudo apt-get install zsh
- name: Test installer
run: sh ./tools/install.sh

deploy:
name: Deploy installer in install.ohmyz.sh
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
environment: vercel
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Vercel CLI
run: npm install -g vercel
- name: Setup project and deploy
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
run: |
cp tools/install.sh .github/workflows/installer/install.sh
cd .github/workflows/installer
vc link --yes -t ${{ secrets.VERCEL_TOKEN }}
vc deploy --prod -t ${{ secrets.VERCEL_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/installer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
install.sh
2 changes: 2 additions & 0 deletions .github/workflows/installer/.vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*
!/install.sh
14 changes: 14 additions & 0 deletions .github/workflows/installer/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"headers": [
{
"source": "/((?!favicon.ico).*)",
"headers": [{ "key": "Content-Type", "value": "text/plain" }]
}
],
"rewrites": [
{
"source": "/((?!favicon.ico|install.sh).*)",
"destination": "/install.sh"
}
]
}
9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ on:
branches:
- master
push:
branches:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
tests:
name: Run tests
Expand All @@ -24,12 +27,10 @@ jobs:
os: [ubuntu-latest, macos-latest]
steps:
- name: Set up git repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install zsh
if: runner.os == 'Linux'
run: sudo apt-get update; sudo apt-get install zsh
- name: Test installer
run: sh ./tools/install.sh
- name: Check syntax
run: |
for file in ./oh-my-zsh.sh \
Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions: {}
jobs:
add-to-project:
name: Add to project
Expand All @@ -26,24 +27,25 @@ jobs:
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectNext(number: $number) {
projectV2(number: $number) {
id
fields(first:20) {
nodes {
id
name
... on ProjectV2Field {
id
name
}
}
}
}
}
}
' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
# Parse project data
cat >> $GITHUB_ENV <<EOF
PROJECT_ID=$(jq '.data.organization.projectNext.id' project_data.json)
PLUGIN_FIELD_ID=$(jq '.data.organization.projectNext.fields.nodes[] | select(.name == "Plugin") | .id' project_data.json)
THEME_FIELD_ID=$(jq '.data.organization.projectNext.fields.nodes[] | select(.name == "Theme") | .id' project_data.json)
PROJECT_ID=$(jq '.data.organization.projectV2.id' project_data.json)
PLUGIN_FIELD_ID=$(jq '.data.organization.projectV2.fields.nodes[] | select(.name == "Plugin") | .id' project_data.json)
THEME_FIELD_ID=$(jq '.data.organization.projectV2.fields.nodes[] | select(.name == "Theme") | .id' project_data.json)
EOF
- name: Add to project
Expand All @@ -52,13 +54,13 @@ jobs:
run: |
item_id="$(gh api graphql -f query='
mutation($project: ID!, $content: ID!) {
addProjectNextItem(input: {projectId: $project, contentId: $content}) {
projectNextItem {
addProjectV2ItemById(input: {projectId: $project, contentId: $content}) {
item {
id
}
}
}
' -f project=$PROJECT_ID -f content=$ISSUE_OR_PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
' -f project=$PROJECT_ID -f content=$ISSUE_OR_PR_ID --jq '.data.addProjectV2ItemById.item.id')"
echo "ITEM_ID=$item_id" >> $GITHUB_ENV
Expand Down Expand Up @@ -107,23 +109,27 @@ jobs:
$theme_field: ID!
$theme_value: String!
) {
set_plugin: updateProjectNextItemField(input: {
set_plugin: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $plugin_field
value: $plugin_value
value: {
text: $plugin_value
}
}) {
projectNextItem {
projectV2Item {
id
}
}
set_theme: updateProjectNextItemField(input: {
set_theme: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $theme_field
value: $theme_value
value: {
text: $theme_value
}
}) {
projectNextItem {
projectV2Item {
id
}
}
Expand All @@ -132,4 +138,3 @@ jobs:
-f plugin_field=$PLUGIN_FIELD_ID -f plugin_value=$PLUGIN \
-f theme_field=$THEME_FIELD_ID -f theme_value=$THEME \
--silent
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ cache/
log/
*.swp
.DS_Store

# editor configs
.vscode
.idea
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 110,
"proseWrap": "always"
}
37 changes: 29 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ you would make is not already covered.
Please be so kind as to [search](#use-the-search-luke) for any open issue already covering
your problem.

If you find one, comment on it so we can know there are more people experiencing it.
If you find one, comment on it, so we know more people are experiencing it.

If not, look at the [Troubleshooting](https://github.com/ohmyzsh/ohmyzsh/wiki/Troubleshooting)
page for instructions on how to gather data to better debug your problem.

Then, you can go ahead and create an issue with as much detail as you can provide.
It should include the data gathered as indicated above, along with:
It should include the data gathered as indicated above, along with the following:

1. How to reproduce the problem
2. What the correct behavior should be
Expand All @@ -57,7 +57,7 @@ We will do our very best to help you.
Please be so kind as to [search](#use-the-search-luke) for any open issue already covering
your suggestion.

If you find one, comment on it so we can know there are more people supporting it.
If you find one, comment on it, so we know more people are supporting it.

If not, you can go ahead and create an issue. Please copy to anyone relevant (e.g. plugin
maintainers) by mentioning their GitHub handle (starting with `@`) in your message.
Expand All @@ -84,7 +84,7 @@ your [problem](#you-have-a-problem), and any pending/merged/rejected PR covering

If the solution is already reported, try it out and +1 the pull request if the
solution works ok. On the other hand, if you think your solution is better, post
it with a reference to the other one so we can have both solutions to compare.
it with reference to the other one so we can have both solutions to compare.

If not, then go ahead and submit a PR. Please copy to anyone relevant (e.g. plugin
maintainers) by mentioning their GitHub handle (starting with `@`) in your message.
Expand All @@ -104,6 +104,27 @@ maintainers) by mentioning their GitHub handle (starting with `@`) in your messa

For any extensive change, such as a new plugin, you will have to find testers to +1 your PR.

### New plugin aliases

We acknowledge that aliases are a core part of Oh My Zsh. There are plugins that have +100 aliases!

This has become an issue for two opposing reasons:

- Some users want to have their personal aliases in Oh My Zsh.
- Some users don't want any aliases at all and feel that there are too many.

Because of this, from now on, we require that new aliases follow these conditions:

1. They will be used by many people, not just a few.
2. The aliases will be used many times and for common tasks.
3. Prefer one generic alias over many specific ones.
4. When justifying the need for an alias, talk about workflows where you'll use it,
preferably in combination with other aliases.
5. If a command with the same name exists, look for a different alias name.

This list is not exhaustive! Please remember that your alias will be in the machines of many people,
so it should be justified why they should have it.

----

## Use the Search, Luke
Expand Down Expand Up @@ -193,7 +214,7 @@ type(scope)!: subject
```

- `subject`: a brief description of the changes. This will be displayed in the changelog. If you need
to specify other details you can use the commit body but it won't be visible.
to specify other details, you can use the commit body, but it won't be visible.

Formatting tricks: the commit subject may contain:

Expand All @@ -210,9 +231,9 @@ type(scope)!: subject
### Style
Try to keep the first commit line short. This is harder to do using this commit style but try to be
concise and if you need more space, you can use the commit body. Try to make sure that the commit
subject is clear and precise enough that users will know what change by just looking at the changelog.
Try to keep the first commit line short. It's harder to do using this commit style but try to be
concise, and if you need more space, you can use the commit body. Try to make sure that the commit
subject is clear and precise enough that users will know what changed by just looking at the changelog.
----
Expand Down
Loading

0 comments on commit 4083863

Please sign in to comment.