diff --git a/.ddev/addon-metadata/pimp-my-shell/manifest.yaml b/.ddev/addon-metadata/pimp-my-shell/manifest.yaml index 634958b..55ca9b5 100644 --- a/.ddev/addon-metadata/pimp-my-shell/manifest.yaml +++ b/.ddev/addon-metadata/pimp-my-shell/manifest.yaml @@ -1,15 +1,17 @@ name: pimp-my-shell repository: . version: "" -install_date: "2024-03-28T11:32:16-03:00" +install_date: "2024-03-29T20:20:05-03:00" project_files: - web-build/Dockerfile.pimp-my-shell - homeadditions/.bashrc.d/pimp-my-shell.sh - config.pimp-my-shell.yaml - commands/web/ahoy - commands/web/gum + - commands/host/fish - homeadditions/.local/share/bash-completion/completions/ahoy - homeadditions/.config/starship.toml + - homeadditions/.config/fish/conf.d/z.fish - pimp-my-shell/hooks/README.md - pimp-my-shell/hooks/post-import-db.sh - pimp-my-shell/hooks/post-import-db.d diff --git a/.ddev/commands/host/fish b/.ddev/commands/host/fish new file mode 100755 index 0000000..0319a7d --- /dev/null +++ b/.ddev/commands/host/fish @@ -0,0 +1,9 @@ +#!/bin/bash + +## #ddev-generated +## Description: Opens up a fish shell in the container or executs a command within a fish shell +## Usage: fish +## Example: ddev fish +## ExecRaw: true + +ddev exec fish "$@" diff --git a/.ddev/homeadditions/.config/fish/conf.d/z.fish b/.ddev/homeadditions/.config/fish/conf.d/z.fish new file mode 100644 index 0000000..f6a757c --- /dev/null +++ b/.ddev/homeadditions/.config/fish/conf.d/z.fish @@ -0,0 +1,3 @@ +#ddev-generated + +lua /opt/z.lua/z.lua --init fish | source diff --git a/.ddev/web-build/Dockerfile.pimp-my-shell b/.ddev/web-build/Dockerfile.pimp-my-shell index c008e9d..a86e827 100644 --- a/.ddev/web-build/Dockerfile.pimp-my-shell +++ b/.ddev/web-build/Dockerfile.pimp-my-shell @@ -1,8 +1,32 @@ #ddev-generated + +# ahoy RUN wget -q https://github.com/ahoy-cli/ahoy/releases/download/v2.1.1/ahoy-bin-linux-`dpkg --print-architecture` -O - > /usr/local/bin/ahoy && chmod +x /usr/local/bin/ahoy + +# fzf et al RUN mkdir -p /opt/fzf && cd /opt/fzf && git init && git remote add origin https://github.com/junegunn/fzf.git && git fetch --depth 1 origin db6db49ed642caf9cbe716f80d4fa40052118068 && git checkout FETCH_HEAD && /opt/fzf/install --all && cp /root/.fzf.bash /opt RUN mkdir -p /opt/fzf-git.sh && cd /opt/fzf-git.sh && git init && git remote add origin https://github.com/junegunn/fzf-git.sh.git && git fetch --depth 1 origin 0f1e52079ffd9741eec723f8fd92aa09f376602f && git checkout FETCH_HEAD + +# bat RUN wget -q https://github.com/sharkdp/bat/releases/download/v0.24.0/bat_0.24.0_`dpkg --print-architecture`.deb -O bat.deb && dpkg -i bat.deb && rm bat.deb + +# z.lua RUN mkdir -p /opt/z.lua && wget https://github.com/skywind3000/z.lua/archive/refs/tags/1.8.18.zip -qO- | bsdtar xf - --strip-components=1 -C /opt/z.lua + +# starship RUN curl -sS https://starship.rs/install.sh | sh -s -- -y -v v1.18.1 + +# gum RUN wget -q https://github.com/charmbracelet/gum/releases/download/v0.13.0/gum_0.13.0_`dpkg --print-architecture`.deb -O gum.deb && dpkg -i gum.deb && rm gum.deb + +# fish +RUN echo "deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_`lsb_release -rs`/ /" | sudo tee /etc/apt/sources.list.d/shells:fish:release:3.list +RUN curl -fsSL https://download.opensuse.org/repositories/shells:fish:release:3/Debian_`lsb_release -rs`/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_fish_release_3.gpg > /dev/null +RUN apt update && apt satisfy -y "fish (>=3.7)" +USER $uid:$gid +# The ?v= is only there to bust the Dockerfile build cache if there's +# a new version we wan't to make sure it'll get into the builds. It doesn't +# change the installed version or the version of the install script, +# it will always be the latest at the time of the build. +RUN echo "curl -sL 'https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish?4.4.4' | source && fisher install jorgebucaran/fisher" | fish +USER root:root diff --git a/README.md b/README.md index a538d44..a308290 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,12 @@ projects, making it easier/nicer to work inside the container with some initial defaults. - https://github.com/ahoy-cli/ahoy -- https://github.com/skywind3000/z.lua +- https://github.com/skywind3000/z.lua (working on both bash and fish) - https://github.com/junegunn/fzf - https://github.com/junegunn/fzf-git.sh - https://starship.rs/ - https://github.com/charmbracelet/gum +- https://github.com/fish-shell/fish-shell / https://fishshell.com/ It also has: diff --git a/commands/host/fish b/commands/host/fish new file mode 100644 index 0000000..0319a7d --- /dev/null +++ b/commands/host/fish @@ -0,0 +1,9 @@ +#!/bin/bash + +## #ddev-generated +## Description: Opens up a fish shell in the container or executs a command within a fish shell +## Usage: fish +## Example: ddev fish +## ExecRaw: true + +ddev exec fish "$@" diff --git a/homeadditions/.config/fish/conf.d/z.fish b/homeadditions/.config/fish/conf.d/z.fish new file mode 100644 index 0000000..f6a757c --- /dev/null +++ b/homeadditions/.config/fish/conf.d/z.fish @@ -0,0 +1,3 @@ +#ddev-generated + +lua /opt/z.lua/z.lua --init fish | source diff --git a/install.yaml b/install.yaml index 06707a6..068263d 100644 --- a/install.yaml +++ b/install.yaml @@ -5,8 +5,10 @@ project_files: - config.pimp-my-shell.yaml - commands/web/ahoy - commands/web/gum + - commands/host/fish - homeadditions/.local/share/bash-completion/completions/ahoy - homeadditions/.config/starship.toml + - homeadditions/.config/fish/conf.d/z.fish - pimp-my-shell/hooks/README.md - pimp-my-shell/hooks/post-import-db.sh - pimp-my-shell/hooks/post-import-db.d diff --git a/web-build/Dockerfile.pimp-my-shell b/web-build/Dockerfile.pimp-my-shell index c008e9d..a86e827 100644 --- a/web-build/Dockerfile.pimp-my-shell +++ b/web-build/Dockerfile.pimp-my-shell @@ -1,8 +1,32 @@ #ddev-generated + +# ahoy RUN wget -q https://github.com/ahoy-cli/ahoy/releases/download/v2.1.1/ahoy-bin-linux-`dpkg --print-architecture` -O - > /usr/local/bin/ahoy && chmod +x /usr/local/bin/ahoy + +# fzf et al RUN mkdir -p /opt/fzf && cd /opt/fzf && git init && git remote add origin https://github.com/junegunn/fzf.git && git fetch --depth 1 origin db6db49ed642caf9cbe716f80d4fa40052118068 && git checkout FETCH_HEAD && /opt/fzf/install --all && cp /root/.fzf.bash /opt RUN mkdir -p /opt/fzf-git.sh && cd /opt/fzf-git.sh && git init && git remote add origin https://github.com/junegunn/fzf-git.sh.git && git fetch --depth 1 origin 0f1e52079ffd9741eec723f8fd92aa09f376602f && git checkout FETCH_HEAD + +# bat RUN wget -q https://github.com/sharkdp/bat/releases/download/v0.24.0/bat_0.24.0_`dpkg --print-architecture`.deb -O bat.deb && dpkg -i bat.deb && rm bat.deb + +# z.lua RUN mkdir -p /opt/z.lua && wget https://github.com/skywind3000/z.lua/archive/refs/tags/1.8.18.zip -qO- | bsdtar xf - --strip-components=1 -C /opt/z.lua + +# starship RUN curl -sS https://starship.rs/install.sh | sh -s -- -y -v v1.18.1 + +# gum RUN wget -q https://github.com/charmbracelet/gum/releases/download/v0.13.0/gum_0.13.0_`dpkg --print-architecture`.deb -O gum.deb && dpkg -i gum.deb && rm gum.deb + +# fish +RUN echo "deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_`lsb_release -rs`/ /" | sudo tee /etc/apt/sources.list.d/shells:fish:release:3.list +RUN curl -fsSL https://download.opensuse.org/repositories/shells:fish:release:3/Debian_`lsb_release -rs`/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_fish_release_3.gpg > /dev/null +RUN apt update && apt satisfy -y "fish (>=3.7)" +USER $uid:$gid +# The ?v= is only there to bust the Dockerfile build cache if there's +# a new version we wan't to make sure it'll get into the builds. It doesn't +# change the installed version or the version of the install script, +# it will always be the latest at the time of the build. +RUN echo "curl -sL 'https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish?4.4.4' | source && fisher install jorgebucaran/fisher" | fish +USER root:root