Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (1190 commits)
  Add support to powerline themes to override foreground color (Bash-it#2231)
  ci: Update GitHub actions v2 => v4 (Bash-it#2224)
  docs: Update Bats libraries links (Bash-it#2225)
  fix: bumps go version to 1.21.0 and changes go get to go install
  [terraform] add alias for terraform workspace
  fix (completion): suppress 1091 in brew (Bash-it#2130)
  Allow for longer command min duration (Bash-it#2198)
  Implement yarn completion (Bash-it#2190)
  Fix lint errors in multiple files (Bash-it#2192)
  bug: Use C style strings when checking for invalid alias characters (Bash-it#2188)
  Remove libra chat reference
  Add more aliases for `git branch`, use long form
  remove function wrapper around kubectl alias registration
  bug: Use en_US when fetching EPOCHREALTIME
  bug:Install shellcheck wget (Bash-it#2173)
  fix(theme): use correct escape sequence to avoid weird text overwriting
  chore: Use grep -E / grep -F instead of egrep / fgrep (Bash-it#2164)
  Fixed broken code blocks in troubleshooting.rst
  Removed Bash Dependency section from README and added it to troubleshooting.rst
  Update variable name to match projects.plugin.bash
  ...
  • Loading branch information
douglasjacobsen committed Jan 19, 2024
2 parents 5bada48 + d985e4c commit b554ce9
Show file tree
Hide file tree
Showing 437 changed files with 22,250 additions and 19,751 deletions.
28 changes: 25 additions & 3 deletions .editorconfig
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
# EditorConfig is awesome: http://EditorConfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8

trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
[**.{md,rst}]
trim_trailing_whitespace = false

[.git*]
indent_size = tab
indent_style = tab

[{**.*sh,test/run,**.bats}]
indent_size = tab
indent_style = tab

shell_variant = bash
binary_next_line = true # like -bn
switch_case_indent = true # like -ci
space_redirects = true # like -sr
keep_padding = false # like -kp
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[**.bats]
indent_size = tab
indent_style = tab
shell_variant = bats
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
*.sh text eol=lf
*.bash text eol=lf

# Docs allow trailing whitespaces
*.md whitespace=-blank-at-eol
*.rst whitespace=-blank-at-eol

# Windows files
*.bat text eol=crlf
85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: 🐛 Bug report
title: "[Bug]: "
description: Create a bug report to help us improve
labels: "bug:general"
body:
- type: textarea
attributes:
label: Expected behavior
description: Tell us what should happen.
validations:
required: true
- type: textarea
attributes:
label: Current behavior
description: Tell us what happens instead of the expected behavior.
validations:
required: true
- type: textarea
attributes:
label: Possible solution
description: Tell us how it could be fixed at your glance.
validations:
required: false
- type: textarea
attributes:
label: Context
description: >
How has this issue affected you? What are you trying to accomplish?
Providing context helps us come up with a solution that is most useful in the real world.
validations:
required: false
- type: textarea
attributes:
label: Steps to reproduce
description: >
Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant.
validations:
required: true
- type: input
attributes:
label: Bash-it version
placeholder: "How to get: bash-it version"
validations:
required: true
- type: input
attributes:
label: List of enabled plugins, themes and aliases
placeholder: "How to get: bash-it show plugins|themes|aliases (it is not a pipe)"
validations:
required: true
- type: input
attributes:
label: Bash version
placeholder: "How to get: bash --version"
validations:
required: true
- type: input
attributes:
label: Operating system and version
placeholder: "How to get: neofetch (or another command)"
validations:
required: true
- type: textarea
attributes:
label: "bash-it doctor output"
value: |
```
# How to get: bash-it doctor
```
validations:
required: false
- type: textarea
attributes:
label: Your ~/.bashrc
value: |
```bash
# How to get: cat ~/.bashrc
```
validations:
required: true
- type: textarea
attributes:
label: Notes
description: >
Provide any extra details here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Libera chat
url: https://web.libera.chat/?channel=#bash-it
about: You can ask and answer questions here
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 💡 Feature request
title: "[Feature]: "
description: Suggest an idea for this project
labels: "feature request"
body:
- type: textarea
attributes:
label: Expected behavior
description: Tell us how your feature should work.
validations:
required: true
- type: textarea
attributes:
label: Current behavior
description: Explain the difference your feature will have from current behavior.
validations:
required: true
- type: textarea
attributes:
label: Possible solution
description: Tell us how it could be fixed at your glance.
validations:
required: false
- type: textarea
attributes:
label: Context
description: >
How has this issue affected you? What are you trying to accomplish?
Providing context helps us come up with a solution that is most useful in the real world.
- type: textarea
attributes:
label: Notes
description: >
Provide any extra details here.
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] If my change requires a change to the documentation, I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] If I have added a new file, I also added it to ``clean_files.txt`` and formatted it using ``lint_clean_files.sh``.
- [ ] I have added tests to cover my changes, and all the new and existing tests pass.
11 changes: 11 additions & 0 deletions .github/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Configuration for probot-no-response - https://github.com/probot/no-response

# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 14
# Label requiring a response
responseRequiredLabel: waiting-for-response
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author.
You can always reopen the issue if needed.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

# Triggers the workflow on push or pull request events
on: [push, pull_request]

jobs:
bats-test:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-11]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Install greadlink
if: startsWith(runner.os, 'macOS')
run: brew install coreutils
- name: Install parallel
if: startsWith(runner.os, 'macOS')
run: brew install parallel
- name: Test code
run: test/run

build-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install docs dependencies
run: python3 -m pip install -r docs/requirements.txt
- name: Build the docs
run: sphinx-build -W -b html docs docs/_build/html

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install shfmt
run: go install mvdan.cc/sh/v3/cmd/shfmt@latest
- name: Install shellcheck
env:
scversion: stable # Or latest, vxx, etc
run: |
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv "shellcheck-${scversion}/shellcheck"
sudo cp "shellcheck-${scversion}/shellcheck" /usr/bin/
shellcheck --version
- name: Install pre-commit
run: python3 -m pip install -r test/lint-requirements.txt
- name: Run lint
run: ./lint_clean_files.sh
7 changes: 7 additions & 0 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ bats
*.sublime-workspace
*.sublime-project
enabled/*
/enabled
tmp/

# Do not save profiles
profiles/*
# apart from the default one
!profiles/default.bash_it
10 changes: 7 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[submodule "test_lib/bats-core"]
path = test_lib/bats-core
url = https://github.com/bats-core/bats-core
branch = tags/v1.2.0
[submodule "test_lib/bats-support"]
path = test_lib/bats-support
url = https://github.com/ztombol/bats-support
url = https://github.com/bats-core/bats-support
branch = tags/v0.3.0
[submodule "test_lib/bats-assert"]
path = test_lib/bats-assert
url = https://github.com/ztombol/bats-assert
url = https://github.com/bats-core/bats-assert
branch = tags/v2.0.0
[submodule "test_lib/bats-file"]
path = test_lib/bats-file
url = https://github.com/ztombol/bats-file
url = https://github.com/bats-core/bats-file
branch = tags/v0.3.0
50 changes: 50 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
---
# fail_fast: true
minimum_pre_commit_version: 1.18.1
exclude: "docs/_build/"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: trailing-whitespace
exclude: ".(md|rst)$"
- id: end-of-file-fixer
- id: check-merge-conflict
- id: mixed-line-ending
- id: check-added-large-files
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.5
hooks:
- id: git-check # Configure in .gitattributes
- id: shellcheck
exclude: ".bats$"
- id: shfmt
exclude: ".bats$"
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.7
hooks:
# - id: forbid-crlf
- id: remove-crlf
exclude: ".bat$"
- repo: local
hooks:
- id: dot-sh
name: Check .sh files against bash-it requirements
entry: ./hooks/dot-sh.sh
language: system
files: "\\.sh$"
types: [file]
- id: dot-bash
name: Check .bash files against bash-it requirements
exclude: "test/test_helper.bash"
entry: ./hooks/dot-bash.sh
language: system
files: "\\.bash$"
types: [file]
- id: clean-files-txt
name: Check that clean_files.txt is sorted alphabetically.
entry: ./hooks/check-clean-files-txt.sh
language: system
files: clean_files.txt
10 changes: 10 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2

sphinx:
builder: htmldir
configuration: docs/conf.py

python:
version: 3.7
install:
- requirements: docs/requirements.txt
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit b554ce9

Please sign in to comment.