Skip to content

Commit

Permalink
fish shell
Browse files Browse the repository at this point in the history
  • Loading branch information
hanoii committed Mar 29, 2024
1 parent 0e9b3c7 commit db5dad6
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .ddev/addon-metadata/pimp-my-shell/manifest.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 9 additions & 0 deletions .ddev/commands/host/fish
Original file line number Diff line number Diff line change
@@ -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 "$@"
3 changes: 3 additions & 0 deletions .ddev/homeadditions/.config/fish/conf.d/z.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ddev-generated

lua /opt/z.lua/z.lua --init fish | source
24 changes: 24 additions & 0 deletions .ddev/web-build/Dockerfile.pimp-my-shell
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
9 changes: 9 additions & 0 deletions commands/host/fish
Original file line number Diff line number Diff line change
@@ -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 "$@"
3 changes: 3 additions & 0 deletions homeadditions/.config/fish/conf.d/z.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ddev-generated

lua /opt/z.lua/z.lua --init fish | source
2 changes: 2 additions & 0 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions web-build/Dockerfile.pimp-my-shell
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit db5dad6

Please sign in to comment.