chore(shell): drop oh my zsh; split .zshenv; add history hygiene (#13) #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: ShellCheck | |
| 'on': | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| shellcheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install ShellCheck | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y shellcheck | |
| - name: Run ShellCheck | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mapfile -t files < <(git ls-files -- \ | |
| ':(glob)**/*.sh' \ | |
| ':(glob)**/*.bash' \ | |
| ':(glob)**/*.zsh' \ | |
| ':(glob)**/.bashrc' \ | |
| ':(glob)**/.bash_aliases' \ | |
| ':(glob)**/.zshrc' \ | |
| ':(glob)**/.profile') | |
| if [ "${#files[@]}" -eq 0 ]; then | |
| echo "No shell files to check." | |
| exit 0 | |
| fi | |
| echo "Checking ${#files[@]} file(s) with ShellCheck..." | |
| shellcheck -S error -x "${files[@]}" |