diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..de7227c --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: [rsteube] +polar: carapace-sh diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..f0c7adb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,68 @@ +name: Bug +description: File a bug/issue +title: "" +labels: [bug, fund] +body: +- type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + validations: + required: false +- type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + validations: + required: false +- type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: false +- type: input + attributes: + label: Version + description: Version where this occured. + validations: + required: false +- type: checkboxes + id: os + attributes: + label: OS + description: Operating System where this occured. + options: + - label: Darwin + - label: Linux + - label: Termux + - label: Windows +- type: checkboxes + id: shell + attributes: + label: Shell + description: Shell where this occured. + options: + - label: Bash + - label: Cmd + - label: Elvish + - label: Fish + - label: Nushell + - label: Oil + - label: Powershell + - label: Xonsh + - label: Zsh +- type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/request.yaml b/.github/ISSUE_TEMPLATE/request.yaml new file mode 100644 index 0000000..5ca1ed7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/request.yaml @@ -0,0 +1,26 @@ +name: Request +description: Submit a request +title: "<title>" +labels: [enhancement, fund] +body: +- type: textarea + attributes: + label: Request + description: Describe the feature or problem you’d like to solve. + validations: + required: false +- type: textarea + attributes: + label: Proposed solution + description: How will it benefit the project and its users. + validations: + required: false +- type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the request! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false diff --git a/.github/advanced-issue-labeler.yml b/.github/advanced-issue-labeler.yml new file mode 100644 index 0000000..8532763 --- /dev/null +++ b/.github/advanced-issue-labeler.yml @@ -0,0 +1,37 @@ +# syntax - https://github.com/redhat-plumbers-in-action/advanced-issue-labeler#policy +--- +policy: + - section: + - id: ["os"] + label: + - name: "ver: 1.6.x" + keys: ["v1_6", "v1.6", "1.6.x"] + - name: linux + keys: ["Linux"] + - name: darwin + keys: ["Darwin"] + - name: termux + keys: ["Termux"] + - name: windows + keys: ["Windows"] + + - id: ["shell"] + label: + - name: bash + keys: ["Bash"] + - name: cmd-clink + keys: ["Cmd"] + - name: elvish + keys: ["Elvish"] + - name: fish + keys: ["Fish"] + - name: nushell + keys: ["Nushell"] + - name: oil + keys: ["Oil"] + - name: powershell + keys: ["Powershell"] + - name: xonsh + keys: ["Xonsh"] + - name: zsh + keys: ["Zsh"] diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..1230149 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..965addb --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,65 @@ +name: Docker + +on: + push: + branches: + - 'master' + tags: + - 'v*' + +jobs: + docker: + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - uses: actions/checkout@v4 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build base image + run: docker compose build base + + - name: Build base dependent images + run: docker compose build mdbook shell-* + + - name: Build shell-* dependent image + run: docker compose build shell + + - name: Build shell dependent image + run: docker compose build vhs + + - name: Upload the images + run: | + tag=latest + [[ "$GITHUB_REF" =~ ^refs/tags/ ]] && tag="${GITHUB_REF/refs\/tags\//}" + docker image tag ghcr.io/carapace-sh/base ghcr.io/carapace-sh/base:${tag} + docker image tag ghcr.io/carapace-sh/mdbook ghcr.io/carapace-sh/mdbook:${tag} + docker image tag ghcr.io/carapace-sh/shell-bash-ble ghcr.io/carapace-sh/shell-bash-ble:${tag} + docker image tag ghcr.io/carapace-sh/shell-elvish ghcr.io/carapace-sh/shell-elvish:${tag} + docker image tag ghcr.io/carapace-sh/shell-fish ghcr.io/carapace-sh/shell-fish:${tag} + docker image tag ghcr.io/carapace-sh/shell-nushell ghcr.io/carapace-sh/shell-nushell:${tag} + docker image tag ghcr.io/carapace-sh/shell-oil ghcr.io/carapace-sh/shell-oil:${tag} + docker image tag ghcr.io/carapace-sh/shell-powershell ghcr.io/carapace-sh/shell-powershell:${tag} + docker image tag ghcr.io/carapace-sh/shell-xonsh ghcr.io/carapace-sh/shell-xonsh:${tag} + docker image tag ghcr.io/carapace-sh/shell-zsh ghcr.io/carapace-sh/shell-zsh:${tag} + docker image tag ghcr.io/carapace-sh/shell ghcr.io/carapace-sh/shell:${tag} + docker image tag ghcr.io/carapace-sh/vhs ghcr.io/carapace-sh/vhs:${tag} + + docker image push ghcr.io/carapace-sh/base:${tag} + docker image push ghcr.io/carapace-sh/mdbook:${tag} + docker image push ghcr.io/carapace-sh/shell-bash-ble:${tag} + docker image push ghcr.io/carapace-sh/shell-elvish:${tag} + docker image push ghcr.io/carapace-sh/shell-fish:${tag} + docker image push ghcr.io/carapace-sh/shell-nushell:${tag} + docker image push ghcr.io/carapace-sh/shell-oil:${tag} + docker image push ghcr.io/carapace-sh/shell-powershell:${tag} + docker image push ghcr.io/carapace-sh/shell-xonsh:${tag} + docker image push ghcr.io/carapace-sh/shell-zsh:${tag} + docker image push ghcr.io/carapace-sh/shell:${tag} + docker image push ghcr.io/carapace-sh/vhs:${tag} diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml new file mode 100644 index 0000000..8e3bea9 --- /dev/null +++ b/.github/workflows/issue-labeler.yml @@ -0,0 +1,29 @@ +name: Label Issues +on: + issues: + types: [opened, edited] + +permissions: + contents: read + +jobs: + label-component: + runs-on: ubuntu-latest + + permissions: + issues: write + + steps: + - uses: actions/checkout@v4 + + - name: Parse issue form + uses: stefanbuck/github-issue-parser@v3 + id: issue-parser + with: + template-path: .github/ISSUE_TEMPLATE/bug_report.yaml + + - name: Set issue labels + uses: redhat-plumbers-in-action/advanced-issue-labeler@v3 + with: + issue-form: ${{ steps.issue-parser.outputs.jsonString }} + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/base/Dockerfile b/base/Dockerfile new file mode 100644 index 0000000..47e5552 --- /dev/null +++ b/base/Dockerfile @@ -0,0 +1,12 @@ +FROM debian:bookworm-slim AS base + +RUN apt-get update && apt-get install -y curl + +ARG version=1.21.1 +RUN curl -L "https://github.com/starship/starship/releases/download/v${version}/starship-x86_64-unknown-linux-gnu.tar.gz" | tar -xvz starship \ + && mv starship /usr/local/bin/ + +ADD starship.toml /root/.config/ +ADD bashrc.sh /root/.bashrc + +ENV LS_COLORS=*~=0;38;2;58;60;78:bd=1;38;2;241;250;140;48;2;40;42;54:ca=0:cd=1;38;2;241;250;140;48;2;40;42;54:di=0;38;2;189;147;249:do=1;38;2;255;121;198;48;2;40;42;54:ex=0;38;2;80;250;123:fi=0;38;2;248;248;242:ln=0;38;2;139;233;253:mh=0:mi=0;38;2;255;85;85;48;2;40;42;54:no=0;38;2;248;248;242:or=1;38;2;255;85;85;48;2;40;42;54:ow=0;38;2;189;147;249;48;2;80;250;123:pi=0;38;2;241;250;140;48;2;40;42;54:rs=0;38;2;255;184;108:sg=0;38;2;40;42;54;48;2;241;250;140:so=1;38;2;255;121;198;48;2;40;42;54:st=0;38;2;248;248;242;48;2;189;147;249:su=0;38;2;248;248;242;48;2;255;85;85:tw=0;38;2;40;42;54;48;2;80;250;123:*.1=0;38;2;255;184;108:*.a=0;38;2;80;250;123:*.c=0;38;2;255;184;108:*.d=0;38;2;255;184;108:*.h=0;38;2;255;184;108:*.m=0;38;2;255;184;108:*.o=0;38;2;58;60;78:*.p=0;38;2;255;184;108:*.r=0;38;2;255;184;108:*.t=0;38;2;255;184;108:*.v=0;38;2;255;184;108:*.z=1;38;2;255;85;85:*.7z=1;38;2;255;85;85:*.ai=0;38;2;255;121;198:*.as=0;38;2;255;184;108:*.bc=0;38;2;58;60;78:*.bz=1;38;2;255;85;85:*.cc=0;38;2;255;184;108:*.cp=0;38;2;255;184;108:*.cr=0;38;2;255;184;108:*.cs=0;38;2;255;184;108:*.db=1;38;2;255;85;85:*.di=0;38;2;255;184;108:*.el=0;38;2;255;184;108:*.ex=0;38;2;255;184;108:*.fs=0;38;2;255;184;108:*.go=0;38;2;255;184;108:*.gv=0;38;2;255;184;108:*.gz=1;38;2;255;85;85:*.ha=0;38;2;255;184;108:*.hh=0;38;2;255;184;108:*.hi=0;38;2;58;60;78:*.hs=0;38;2;255;184;108:*.jl=0;38;2;255;184;108:*.js=0;38;2;255;184;108:*.ko=0;38;2;80;250;123:*.kt=0;38;2;255;184;108:*.la=0;38;2;58;60;78:*.ll=0;38;2;255;184;108:*.lo=0;38;2;58;60;78:*.ma=0;38;2;255;121;198:*.mb=0;38;2;255;121;198:*.md=0;38;2;255;184;108:*.mk=0;38;2;255;184;108:*.ml=0;38;2;255;184;108:*.mn=0;38;2;255;184;108:*.nb=0;38;2;255;184;108:*.nu=0;38;2;255;184;108:*.pl=0;38;2;255;184;108:*.pm=0;38;2;255;184;108:*.pp=0;38;2;255;184;108:*.ps=0;38;2;255;184;108:*.py=0;38;2;255;184;108:*.rb=0;38;2;255;184;108:*.rm=1;38;2;255;184;108:*.rs=0;38;2;255;184;108:*.sh=0;38;2;255;184;108:*.so=0;38;2;80;250;123:*.td=0;38;2;255;184;108:*.ts=0;38;2;255;184;108:*.ui=0;38;2;255;184;108:*.vb=0;38;2;255;184;108:*.wv=0;38;2;139;233;253:*.xz=1;38;2;255;85;85:*FAQ=0;38;2;255;184;108:*.3ds=0;38;2;255;121;198:*.3fr=0;38;2;255;121;198:*.3mf=0;38;2;255;121;198:*.adb=0;38;2;255;184;108:*.ads=0;38;2;255;184;108:*.aif=0;38;2;139;233;253:*.amf=0;38;2;255;121;198:*.ape=0;38;2;139;233;253:*.apk=1;38;2;255;85;85:*.ari=0;38;2;255;121;198:*.arj=1;38;2;255;85;85:*.arw=0;38;2;255;121;198:*.asa=0;38;2;255;184;108:*.asm=0;38;2;255;184;108:*.aux=0;38;2;58;60;78:*.avi=1;38;2;255;184;108:*.awk=0;38;2;255;184;108:*.bag=1;38;2;255;85;85:*.bak=0;38;2;58;60;78:*.bat=0;38;2;80;250;123:*.bay=0;38;2;255;121;198:*.bbl=0;38;2;58;60;78:*.bcf=0;38;2;58;60;78:*.bib=0;38;2;255;184;108:*.bin=1;38;2;255;85;85:*.blg=0;38;2;58;60;78:*.bmp=0;38;2;255;121;198:*.bsh=0;38;2;255;184;108:*.bst=0;38;2;255;184;108:*.bz2=1;38;2;255;85;85:*.c++=0;38;2;255;184;108:*.cap=0;38;2;255;121;198:*.cfg=0;38;2;255;184;108:*.cgi=0;38;2;255;184;108:*.clj=0;38;2;255;184;108:*.com=0;38;2;80;250;123:*.cpp=0;38;2;255;184;108:*.cr2=0;38;2;255;121;198:*.cr3=0;38;2;255;121;198:*.crw=0;38;2;255;121;198:*.css=0;38;2;255;184;108:*.csv=0;38;2;255;184;108:*.csx=0;38;2;255;184;108:*.cxx=0;38;2;255;184;108:*.dae=0;38;2;255;121;198:*.dcr=0;38;2;255;121;198:*.dcs=0;38;2;255;121;198:*.deb=1;38;2;255;85;85:*.def=0;38;2;255;184;108:*.dll=0;38;2;80;250;123:*.dmg=1;38;2;255;85;85:*.dng=0;38;2;255;121;198:*.doc=0;38;2;255;184;108:*.dot=0;38;2;255;184;108:*.dox=0;38;2;255;184;108:*.dpr=0;38;2;255;184;108:*.drf=0;38;2;255;121;198:*.dxf=0;38;2;255;121;198:*.eip=0;38;2;255;121;198:*.elc=0;38;2;255;184;108:*.elm=0;38;2;255;184;108:*.epp=0;38;2;255;184;108:*.eps=0;38;2;255;121;198:*.erf=0;38;2;255;121;198:*.erl=0;38;2;255;184;108:*.exe=0;38;2;80;250;123:*.exr=0;38;2;255;121;198:*.exs=0;38;2;255;184;108:*.fbx=0;38;2;255;121;198:*.fff=0;38;2;255;121;198:*.fls=0;38;2;58;60;78:*.flv=1;38;2;255;184;108:*.fnt=0;38;2;255;184;108:*.fon=0;38;2;255;184;108:*.fsi=0;38;2;255;184;108:*.fsx=0;38;2;255;184;108:*.gif=0;38;2;255;121;198:*.git=0;38;2;58;60;78:*.gpr=0;38;2;255;121;198:*.gvy=0;38;2;255;184;108:*.h++=0;38;2;255;184;108:*.hda=0;38;2;255;121;198:*.hip=0;38;2;255;121;198:*.hpp=0;38;2;255;184;108:*.htc=0;38;2;255;184;108:*.htm=0;38;2;255;184;108:*.hxx=0;38;2;255;184;108:*.ico=0;38;2;255;121;198:*.ics=0;38;2;255;184;108:*.idx=0;38;2;58;60;78:*.igs=0;38;2;255;121;198:*.iiq=0;38;2;255;121;198:*.ilg=0;38;2;58;60;78:*.img=1;38;2;255;85;85:*.inc=0;38;2;255;184;108:*.ind=0;38;2;58;60;78:*.ini=0;38;2;255;184;108:*.inl=0;38;2;255;184;108:*.ino=0;38;2;255;184;108:*.ipp=0;38;2;255;184;108:*.iso=1;38;2;255;85;85:*.jar=1;38;2;255;85;85:*.jpg=0;38;2;255;121;198:*.jsx=0;38;2;255;184;108:*.jxl=0;38;2;255;121;198:*.k25=0;38;2;255;121;198:*.kdc=0;38;2;255;121;198:*.kex=0;38;2;255;184;108:*.kra=0;38;2;255;121;198:*.kts=0;38;2;255;184;108:*.log=0;38;2;58;60;78:*.ltx=0;38;2;255;184;108:*.lua=0;38;2;255;184;108:*.m3u=0;38;2;139;233;253:*.m4a=0;38;2;139;233;253:*.m4v=1;38;2;255;184;108:*.mdc=0;38;2;255;121;198:*.mef=0;38;2;255;121;198:*.mid=0;38;2;139;233;253:*.mir=0;38;2;255;184;108:*.mkv=1;38;2;255;184;108:*.mli=0;38;2;255;184;108:*.mos=0;38;2;255;121;198:*.mov=1;38;2;255;184;108:*.mp3=0;38;2;139;233;253:*.mp4=1;38;2;255;184;108:*.mpg=1;38;2;255;184;108:*.mrw=0;38;2;255;121;198:*.msi=1;38;2;255;85;85:*.mtl=0;38;2;255;121;198:*.nef=0;38;2;255;121;198:*.nim=0;38;2;255;184;108:*.nix=0;38;2;255;184;108:*.nrw=0;38;2;255;121;198:*.obj=0;38;2;255;121;198:*.obm=0;38;2;255;121;198:*.odp=0;38;2;255;184;108:*.ods=0;38;2;255;184;108:*.odt=0;38;2;255;184;108:*.ogg=0;38;2;139;233;253:*.ogv=1;38;2;255;184;108:*.orf=0;38;2;255;121;198:*.org=0;38;2;255;184;108:*.otf=0;38;2;255;184;108:*.otl=0;38;2;255;121;198:*.out=0;38;2;58;60;78:*.pas=0;38;2;255;184;108:*.pbm=0;38;2;255;121;198:*.pcx=0;38;2;255;121;198:*.pdf=0;38;2;255;184;108:*.pef=0;38;2;255;121;198:*.pgm=0;38;2;255;121;198:*.php=0;38;2;255;184;108:*.pid=0;38;2;58;60;78:*.pkg=1;38;2;255;85;85:*.png=0;38;2;255;121;198:*.pod=0;38;2;255;184;108:*.ppm=0;38;2;255;121;198:*.pps=0;38;2;255;184;108:*.ppt=0;38;2;255;184;108:*.pro=0;38;2;255;184;108:*.ps1=0;38;2;255;184;108:*.psd=0;38;2;255;121;198:*.ptx=0;38;2;255;121;198:*.pxn=0;38;2;255;121;198:*.pyc=0;38;2;58;60;78:*.pyd=0;38;2;58;60;78:*.pyo=0;38;2;58;60;78:*.qoi=0;38;2;255;121;198:*.r3d=0;38;2;255;121;198:*.raf=0;38;2;255;121;198:*.rar=1;38;2;255;85;85:*.raw=0;38;2;255;121;198:*.rpm=1;38;2;255;85;85:*.rst=0;38;2;255;184;108:*.rtf=0;38;2;255;184;108:*.rw2=0;38;2;255;121;198:*.rwl=0;38;2;255;121;198:*.rwz=0;38;2;255;121;198:*.sbt=0;38;2;255;184;108:*.sql=0;38;2;255;184;108:*.sr2=0;38;2;255;121;198:*.srf=0;38;2;255;121;198:*.srw=0;38;2;255;121;198:*.stl=0;38;2;255;121;198:*.stp=0;38;2;255;121;198:*.sty=0;38;2;58;60;78:*.svg=0;38;2;255;121;198:*.swf=1;38;2;255;184;108:*.swp=0;38;2;58;60;78:*.sxi=0;38;2;255;184;108:*.sxw=0;38;2;255;184;108:*.tar=1;38;2;255;85;85:*.tbz=1;38;2;255;85;85:*.tcl=0;38;2;255;184;108:*.tex=0;38;2;255;184;108:*.tga=0;38;2;255;121;198:*.tgz=1;38;2;255;85;85:*.tif=0;38;2;255;121;198:*.tml=0;38;2;255;184;108:*.tmp=0;38;2;58;60;78:*.toc=0;38;2;58;60;78:*.tsx=0;38;2;255;184;108:*.ttf=0;38;2;255;184;108:*.txt=0;38;2;255;184;108:*.typ=0;38;2;255;184;108:*.usd=0;38;2;255;121;198:*.vcd=1;38;2;255;85;85:*.vim=0;38;2;255;184;108:*.vob=1;38;2;255;184;108:*.vsh=0;38;2;255;184;108:*.wav=0;38;2;139;233;253:*.wma=0;38;2;139;233;253:*.wmv=1;38;2;255;184;108:*.wrl=0;38;2;255;121;198:*.x3d=0;38;2;255;121;198:*.x3f=0;38;2;255;121;198:*.xlr=0;38;2;255;184;108:*.xls=0;38;2;255;184;108:*.xml=0;38;2;255;184;108:*.xmp=0;38;2;255;184;108:*.xpm=0;38;2;255;121;198:*.xvf=0;38;2;255;121;198:*.yml=0;38;2;255;184;108:*.zig=0;38;2;255;184;108:*.zip=1;38;2;255;85;85:*.zsh=0;38;2;255;184;108:*.zst=1;38;2;255;85;85:*TODO=1;38;2;255;184;108:*hgrc=0;38;2;255;184;108:*.avif=0;38;2;255;121;198:*.bash=0;38;2;255;184;108:*.braw=0;38;2;255;121;198:*.conf=0;38;2;255;184;108:*.dart=0;38;2;255;184;108:*.data=0;38;2;255;121;198:*.diff=0;38;2;255;184;108:*.docx=0;38;2;255;184;108:*.epub=0;38;2;255;184;108:*.fish=0;38;2;255;184;108:*.flac=0;38;2;139;233;253:*.h264=1;38;2;255;184;108:*.hack=0;38;2;255;184;108:*.heif=0;38;2;255;121;198:*.hgrc=0;38;2;255;184;108:*.html=0;38;2;255;184;108:*.iges=0;38;2;255;121;198:*.info=0;38;2;255;184;108:*.java=0;38;2;255;184;108:*.jpeg=0;38;2;255;121;198:*.json=0;38;2;255;184;108:*.less=0;38;2;255;184;108:*.lisp=0;38;2;255;184;108:*.lock=0;38;2;58;60;78:*.make=0;38;2;255;184;108:*.mojo=0;38;2;255;184;108:*.mpeg=1;38;2;255;184;108:*.nims=0;38;2;255;184;108:*.opus=0;38;2;139;233;253:*.orig=0;38;2;58;60;78:*.pptx=0;38;2;255;184;108:*.prql=0;38;2;255;184;108:*.psd1=0;38;2;255;184;108:*.psm1=0;38;2;255;184;108:*.purs=0;38;2;255;184;108:*.raku=0;38;2;255;184;108:*.rlib=0;38;2;58;60;78:*.sass=0;38;2;255;184;108:*.scad=0;38;2;255;184;108:*.scss=0;38;2;255;184;108:*.step=0;38;2;255;121;198:*.tbz2=1;38;2;255;85;85:*.tiff=0;38;2;255;121;198:*.toml=0;38;2;255;184;108:*.usda=0;38;2;255;121;198:*.usdc=0;38;2;255;121;198:*.usdz=0;38;2;255;121;198:*.webm=1;38;2;255;184;108:*.webp=0;38;2;255;121;198:*.woff=0;38;2;255;184;108:*.xbps=1;38;2;255;85;85:*.xlsx=0;38;2;255;184;108:*.yaml=0;38;2;255;184;108:*stdin=0;38;2;58;60;78:*v.mod=0;38;2;255;184;108:*.blend=0;38;2;255;121;198:*.cabal=0;38;2;255;184;108:*.cache=0;38;2;58;60;78:*.class=0;38;2;58;60;78:*.cmake=0;38;2;255;184;108:*.ctags=0;38;2;58;60;78:*.dylib=0;38;2;80;250;123:*.dyn_o=0;38;2;58;60;78:*.gcode=0;38;2;255;184;108:*.ipynb=0;38;2;255;184;108:*.mdown=0;38;2;255;184;108:*.patch=0;38;2;255;184;108:*.rmeta=0;38;2;58;60;78:*.scala=0;38;2;255;184;108:*.shtml=0;38;2;255;184;108:*.swift=0;38;2;255;184;108:*.toast=1;38;2;255;85;85:*.woff2=0;38;2;255;184;108:*.xhtml=0;38;2;255;184;108:*Icon\r=0;38;2;58;60;78:*LEGACY=0;38;2;255;184;108:*NOTICE=0;38;2;255;184;108:*README=0;38;2;255;184;108:*go.mod=0;38;2;255;184;108:*go.sum=0;38;2;58;60;78:*passwd=0;38;2;255;184;108:*shadow=0;38;2;255;184;108:*stderr=0;38;2;58;60;78:*stdout=0;38;2;58;60;78:*.bashrc=0;38;2;255;184;108:*.config=0;38;2;255;184;108:*.dyn_hi=0;38;2;58;60;78:*.flake8=0;38;2;255;184;108:*.gradle=0;38;2;255;184;108:*.groovy=0;38;2;255;184;108:*.ignore=0;38;2;255;184;108:*.matlab=0;38;2;255;184;108:*.nimble=0;38;2;255;184;108:*COPYING=0;38;2;255;184;108:*INSTALL=0;38;2;255;184;108:*LICENCE=0;38;2;255;184;108:*LICENSE=0;38;2;255;184;108:*TODO.md=1;38;2;255;184;108:*VERSION=0;38;2;255;184;108:*.alembic=0;38;2;255;121;198:*.desktop=0;38;2;255;184;108:*.gemspec=0;38;2;255;184;108:*.mailmap=0;38;2;255;184;108:*Doxyfile=0;38;2;255;184;108:*Makefile=0;38;2;255;184;108:*TODO.txt=1;38;2;255;184;108:*setup.py=0;38;2;255;184;108:*.DS_Store=0;38;2;58;60;78:*.cmake.in=0;38;2;255;184;108:*.fdignore=0;38;2;255;184;108:*.kdevelop=0;38;2;255;184;108:*.markdown=0;38;2;255;184;108:*.rgignore=0;38;2;255;184;108:*.tfignore=0;38;2;255;184;108:*CHANGELOG=0;38;2;255;184;108:*COPYRIGHT=0;38;2;255;184;108:*README.md=0;38;2;255;184;108:*bun.lockb=0;38;2;58;60;78:*configure=0;38;2;255;184;108:*.gitconfig=0;38;2;255;184;108:*.gitignore=0;38;2;255;184;108:*.localized=0;38;2;58;60;78:*.scons_opt=0;38;2;58;60;78:*.timestamp=0;38;2;58;60;78:*CODEOWNERS=0;38;2;255;184;108:*Dockerfile=0;38;2;255;184;108:*INSTALL.md=0;38;2;255;184;108:*README.txt=0;38;2;255;184;108:*SConscript=0;38;2;255;184;108:*SConstruct=0;38;2;255;184;108:*.cirrus.yml=0;38;2;255;184;108:*.gitmodules=0;38;2;255;184;108:*.synctex.gz=0;38;2;58;60;78:*.travis.yml=0;38;2;255;184;108:*INSTALL.txt=0;38;2;255;184;108:*LICENSE-MIT=0;38;2;255;184;108:*MANIFEST.in=0;38;2;255;184;108:*Makefile.am=0;38;2;255;184;108:*Makefile.in=0;38;2;58;60;78:*.applescript=0;38;2;255;184;108:*.fdb_latexmk=0;38;2;58;60;78:*.webmanifest=0;38;2;255;184;108:*CHANGELOG.md=0;38;2;255;184;108:*CONTRIBUTING=0;38;2;255;184;108:*CONTRIBUTORS=0;38;2;255;184;108:*appveyor.yml=0;38;2;255;184;108:*configure.ac=0;38;2;255;184;108:*.bash_profile=0;38;2;255;184;108:*.clang-format=0;38;2;255;184;108:*.editorconfig=0;38;2;255;184;108:*CHANGELOG.txt=0;38;2;255;184;108:*.gitattributes=0;38;2;255;184;108:*.gitlab-ci.yml=0;38;2;255;184;108:*CMakeCache.txt=0;38;2;58;60;78:*CMakeLists.txt=0;38;2;255;184;108:*LICENSE-APACHE=0;38;2;255;184;108:*pyproject.toml=0;38;2;255;184;108:*CODE_OF_CONDUCT=0;38;2;255;184;108:*CONTRIBUTING.md=0;38;2;255;184;108:*CONTRIBUTORS.md=0;38;2;255;184;108:*.sconsign.dblite=0;38;2;58;60;78:*CONTRIBUTING.txt=0;38;2;255;184;108:*CONTRIBUTORS.txt=0;38;2;255;184;108:*requirements.txt=0;38;2;255;184;108:*package-lock.json=0;38;2;58;60;78:*CODE_OF_CONDUCT.md=0;38;2;255;184;108:*.CFUserTextEncoding=0;38;2;58;60;78:*CODE_OF_CONDUCT.txt=0;38;2;255;184;108:*azure-pipelines.yml=0;38;2;255;184;108 diff --git a/base/bashrc.sh b/base/bashrc.sh new file mode 100644 index 0000000..b6ee6e8 --- /dev/null +++ b/base/bashrc.sh @@ -0,0 +1 @@ +eval "$(starship init bash)" diff --git a/base/starship.toml b/base/starship.toml new file mode 100644 index 0000000..4453983 --- /dev/null +++ b/base/starship.toml @@ -0,0 +1,3 @@ +[shell] +disabled = false +unknown_indicator = "oil" diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 0000000..e0cb5b1 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:bookworm AS build +LABEL org.opencontainers.image.source https://github.com/carapace-sh/docker + +# USER root + +RUN apt-get update \ + && apt-get install -y \ + shellcheck \ + sudo + +RUN git config --system safe.directory '*' diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..c541357 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,49 @@ +services: + base: + build: base + image: ghcr.io/carapace-sh/base + + mdbook: + build: mdbook + image: ghcr.io/carapace-sh/mdbook + + + shell-bash-ble: + build: shell-bash-ble + image: ghcr.io/carapace-sh/shell-bash-ble + + shell-elvish: + build: shell-elvish + image: ghcr.io/carapace-sh/shell-elvish + + shell-fish: + build: shell-fish + image: ghcr.io/carapace-sh/shell-fish + + shell-nushell: + build: shell-nushell + image: ghcr.io/carapace-sh/shell-nushell + + shell-oil: + build: shell-oil + image: ghcr.io/carapace-sh/shell-oil + + shell-powershell: + build: shell-powershell + image: ghcr.io/carapace-sh/shell-powershell + + shell-xonsh: + build: shell-xonsh + image: ghcr.io/carapace-sh/shell-xonsh + + shell-zsh: + build: shell-zsh + image: ghcr.io/carapace-sh/shell-zsh + + shell: + build: shell + image: ghcr.io/carapace-sh/shell + + vhs: + build: vhs + image: ghcr.io/carapace-sh/vhs diff --git a/mdbook/Dockerfile b/mdbook/Dockerfile new file mode 100644 index 0000000..d3a7286 --- /dev/null +++ b/mdbook/Dockerfile @@ -0,0 +1,13 @@ +FROM ghcr.io/carapace-sh/base +ARG version=0.4.43 + +RUN apt-get update && apt-get install -y unzip + +RUN curl -L "https://github.com/rust-lang/mdBook/releases/download/v${version}/mdbook-v${version}-x86_64-unknown-linux-gnu.tar.gz" | tar -xvz mdbook \ + && mv mdbook /usr/local/bin/ + +RUN curl -L "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.7/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip" > mdbook-linkcheck.zip \ + && unzip mdbook-linkcheck.zip mdbook-linkcheck \ + && rm mdbook-linkcheck.zip \ + && chmod +x mdbook-linkcheck \ + && mv mdbook-linkcheck /usr/local/bin/ diff --git a/shell-bash-ble/Dockerfile b/shell-bash-ble/Dockerfile new file mode 100644 index 0000000..7b480b6 --- /dev/null +++ b/shell-bash-ble/Dockerfile @@ -0,0 +1,15 @@ +FROM ghcr.io/carapace-sh/base AS bash-ble + +RUN apt-get update && apt-get install -y gawk git make +RUN git clone --recursive https://github.com/akinomyoga/ble.sh \ + && make -C ble.sh + +FROM ghcr.io/carapace-sh/base +COPY --from=bash-ble /ble.sh/out /root/.config/bash-ble/ble + +RUN apt-get update && apt-get install -y procps + +ADD blerc.sh /root/.config/bash-ble/blerc +ADD bash-ble.sh /usr/local/bin/bash-ble + +CMD ["bash-ble"] diff --git a/shell-bash-ble/bash-ble.sh b/shell-bash-ble/bash-ble.sh new file mode 100755 index 0000000..009d131 --- /dev/null +++ b/shell-bash-ble/bash-ble.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +bash --rcfile ~/.config/bash-ble/blerc "$@" diff --git a/shell-bash-ble/blerc.sh b/shell-bash-ble/blerc.sh new file mode 100644 index 0000000..3e224db --- /dev/null +++ b/shell-bash-ble/blerc.sh @@ -0,0 +1,2 @@ +source ~/.bashrc +source ~/.config/bash-ble/ble/ble.sh diff --git a/shell-elvish/Dockerfile b/shell-elvish/Dockerfile new file mode 100644 index 0000000..42d9a05 --- /dev/null +++ b/shell-elvish/Dockerfile @@ -0,0 +1,9 @@ +FROM ghcr.io/carapace-sh/base +ARG version=0.21.0 + +RUN curl https://dl.elv.sh/linux-amd64/elvish-v${version}.tar.gz | tar -xvz \ + && mv elvish /usr/local/bin/elvish + +ADD rc.elv /root/.config/elvish/ + +CMD ["elvish"] diff --git a/shell-elvish/rc.elv b/shell-elvish/rc.elv new file mode 100644 index 0000000..5050f82 --- /dev/null +++ b/shell-elvish/rc.elv @@ -0,0 +1,2 @@ +set-env STARSHIP_SHELL elvish +set edit:prompt = { starship prompt } diff --git a/shell-fish/Dockerfile b/shell-fish/Dockerfile new file mode 100644 index 0000000..8169195 --- /dev/null +++ b/shell-fish/Dockerfile @@ -0,0 +1,7 @@ +FROM ghcr.io/carapace-sh/base + +RUN apt-get update && apt-get install -y fish + +ADD config.fish /root/.config/fish/ + +CMD ["fish"] diff --git a/shell-fish/config.fish b/shell-fish/config.fish new file mode 100644 index 0000000..c179c03 --- /dev/null +++ b/shell-fish/config.fish @@ -0,0 +1 @@ +starship init fish | source diff --git a/shell-nushell/Dockerfile b/shell-nushell/Dockerfile new file mode 100644 index 0000000..1195ffd --- /dev/null +++ b/shell-nushell/Dockerfile @@ -0,0 +1,10 @@ +FROM ghcr.io/carapace-sh/base +ARG version=0.101.0 + +RUN curl -L https://github.com/nushell/nushell/releases/download/${version}/nu-${version}-x86_64-unknown-linux-gnu.tar.gz | tar -xvz \ + && mv nu-${version}-x86_64-unknown-linux-gnu/nu /usr/local/bin + +ADD config.nu /root/.config/nushell/ +ADD env.nu /root/.config/nushell/ + +CMD ["nu"] diff --git a/shell-nushell/config.nu b/shell-nushell/config.nu new file mode 100644 index 0000000..3f14279 --- /dev/null +++ b/shell-nushell/config.nu @@ -0,0 +1,35 @@ +$env.config = { + show_banner: false, + completions: { + case_sensitive: false + quick: true + partial: true + algorithm: "prefix" + external: { + enable: true + max_results: 1000 + } + use_ls_colors: true + } + + menus: [ + { + name: completion_menu + only_buffer_difference: false + marker: "| " + type: { + layout: columnar + columns: 4 + col_width: 20 + col_padding: 2 + } + style: { + text: white + selected_text: {attr: r} + description_text: white_dimmed + } + } + ] +} + +use ~/.cache/starship/init.nu diff --git a/shell-nushell/env.nu b/shell-nushell/env.nu new file mode 100644 index 0000000..3937ca3 --- /dev/null +++ b/shell-nushell/env.nu @@ -0,0 +1,2 @@ +mkdir ~/.cache/starship +starship init nu | save -f ~/.cache/starship/init.nu diff --git a/shell-nushell/rc.elv b/shell-nushell/rc.elv new file mode 100644 index 0000000..5050f82 --- /dev/null +++ b/shell-nushell/rc.elv @@ -0,0 +1,2 @@ +set-env STARSHIP_SHELL elvish +set edit:prompt = { starship prompt } diff --git a/shell-oil/Dockerfile b/shell-oil/Dockerfile new file mode 100644 index 0000000..ea7863c --- /dev/null +++ b/shell-oil/Dockerfile @@ -0,0 +1,18 @@ +FROM ghcr.io/carapace-sh/base AS oil +ARG version=0.24.0 + +RUN apt-get update && apt-get install -y gcc make libreadline-dev +RUN curl https://www.oilshell.org/download/oil-${version}.tar.gz | tar -xvz \ + && cd oil-*/ \ + && ./configure \ + && make \ + && ./install + +FROM ghcr.io/carapace-sh/base +COPY --from=oil /usr/local/bin/* /usr/local/bin/ + +RUN apt-get update && apt-get install -y libreadline-dev + +ADD oshrc.sh /root/.config/oils/oshrc + +CMD ["osh"] diff --git a/shell-oil/oshrc.sh b/shell-oil/oshrc.sh new file mode 100644 index 0000000..64a2e0f --- /dev/null +++ b/shell-oil/oshrc.sh @@ -0,0 +1,2 @@ +export STARSHIP_SHELL='oil' +PS1="$(starship prompt)" diff --git a/shell-powershell/Dockerfile b/shell-powershell/Dockerfile new file mode 100644 index 0000000..caa8ca3 --- /dev/null +++ b/shell-powershell/Dockerfile @@ -0,0 +1,12 @@ +FROM ghcr.io/carapace-sh/base +ARG version=7.4.6 +ARG build=1 + +RUN apt-get update && apt-get install -y libicu72 +RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell_${version}-${build}.deb_amd64.deb > powershell.deb \ + && dpkg -i powershell.deb \ + && rm powershell.deb + +ADD profile.ps1 /root/.config/powershell/ + +CMD ["pwsh"] diff --git a/shell-powershell/profile.ps1 b/shell-powershell/profile.ps1 new file mode 100644 index 0000000..bb3c18e --- /dev/null +++ b/shell-powershell/profile.ps1 @@ -0,0 +1,5 @@ +$env:STARSHIP_SHELL = 'powershell' +Invoke-Expression (&starship init powershell) + +Set-PSReadLineOption -Colors @{ "Selection" = "`e[7m" } +Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete diff --git a/shell-xonsh/Dockerfile b/shell-xonsh/Dockerfile new file mode 100644 index 0000000..3b9516e --- /dev/null +++ b/shell-xonsh/Dockerfile @@ -0,0 +1,7 @@ +FROM ghcr.io/carapace-sh/base + +RUN apt-get update && apt-get install -y xonsh + +ADD rc.xsh /root/.config/xonsh/ + +CMD ["xonsh"] diff --git a/shell-xonsh/rc.xsh b/shell-xonsh/rc.xsh new file mode 100644 index 0000000..fc60ef9 --- /dev/null +++ b/shell-xonsh/rc.xsh @@ -0,0 +1,6 @@ + +$STARSHIP_SHELL="xonsh" +$PROMPT=lambda: $(starship prompt) + +$COMPLETIONS_CONFIRM=True +$COMPLETION_QUERY_LIMIT = 500 diff --git a/shell-zsh/Dockerfile b/shell-zsh/Dockerfile new file mode 100644 index 0000000..1a472e1 --- /dev/null +++ b/shell-zsh/Dockerfile @@ -0,0 +1,7 @@ +FROM ghcr.io/carapace-sh/base + +RUN apt-get update && apt-get install -y zsh + +ADD zshrc.sh /root/.zshrc + +CMD ["zsh"] diff --git a/shell-zsh/zshrc.sh b/shell-zsh/zshrc.sh new file mode 100644 index 0000000..b6806b1 --- /dev/null +++ b/shell-zsh/zshrc.sh @@ -0,0 +1,7 @@ +export STARSHIP_SHELL=zsh +eval "$(starship init zsh)" + +zstyle ':completion:*' menu select +zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' + +autoload -U compinit && compinit diff --git a/shell/Dockerfile b/shell/Dockerfile new file mode 100644 index 0000000..93b1dd9 --- /dev/null +++ b/shell/Dockerfile @@ -0,0 +1,27 @@ +FROM ghcr.io/carapace-sh/base + +RUN apt-get update && apt-get install -y fish libicu72 xonsh zsh + +COPY --from=ghcr.io/carapace-sh/shell-bash-ble /usr/local/bin/bash-ble /usr/local/bin/bash-ble +COPY --from=ghcr.io/carapace-sh/shell-bash-ble /root/.config/bash-ble /root/.config/bash-ble + +COPY --from=ghcr.io/carapace-sh/shell-elvish /usr/local/bin/elvish /usr/local/bin/elvish +COPY --from=ghcr.io/carapace-sh/shell-elvish /root/.config/elvish /root/.config/elvish + +COPY --from=ghcr.io/carapace-sh/shell-fish /root/.config/fish /root/.config/fish + +COPY --from=ghcr.io/carapace-sh/shell-nushell /usr/local/bin/nu /usr/local/bin/nu +COPY --from=ghcr.io/carapace-sh/shell-nushell /root/.config/nushell /root/.config/nushell + +COPY --from=ghcr.io/carapace-sh/shell-oil /usr/local/bin/osh /usr/local/bin/osh +COPY --from=ghcr.io/carapace-sh/shell-oil /root/.config/oils /root/.config/oils + +COPY --from=ghcr.io/carapace-sh/shell-powershell /opt/microsoft/ /opt/microsoft +COPY --from=ghcr.io/carapace-sh/shell-powershell /root/.config/powershell/ /root/.config/powershell +RUN ln -s /opt/microsoft/powershell/7/pwsh /usr/local/bin/pwsh + +COPY --from=ghcr.io/carapace-sh/shell-xonsh /root/.config/xonsh /root/.config/xonsh + +COPY --from=ghcr.io/carapace-sh/shell-zsh /root/.zshrc /root/.zshrc + +CMD ["elvish"] diff --git a/vhs/Dockerfile b/vhs/Dockerfile new file mode 100644 index 0000000..0cbc344 --- /dev/null +++ b/vhs/Dockerfile @@ -0,0 +1,16 @@ +FROM ghcr.io/carapace-sh/shell + +RUN apt-get update && apt-get install -y chromium ffmpeg fonts-jetbrains-mono + + +RUN curl -L https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 > /usr/local/bin/ttyd \ + && chmod +x /usr/local/bin/ttyd + +RUN apt-get install -y git +RUN curl -L https://go.dev/dl/go1.23.4.linux-amd64.tar.gz | tar -C /usr/local -xzf - +ENV PATH=$PATH:/usr/local/go/bin +RUN git clone https://github.com/rsteube/vhs --depth 1 \ + && cd vhs \ + && GOBIN=/usr/local/bin/ go install + +ENV VHS_NO_SANDBOX 1