From 58ab23db962d8263dccf07f55b7ec0ee330f9576 Mon Sep 17 00:00:00 2001 From: rsteube Date: Wed, 1 Jan 2025 13:29:54 +0100 Subject: [PATCH] compose: added cmd-clink not yet working due to to https://bugs.winehq.org/show_bug.cgi?id=24026 (Tab key just inserts `^I`) --- .docker/cmd-clink.yaml | 8 ++++++++ .docker/cmd-clink/Dockerfile | 17 +++++++++++++++++ compose.yaml | 1 + 3 files changed, 26 insertions(+) create mode 100644 .docker/cmd-clink.yaml create mode 100644 .docker/cmd-clink/Dockerfile diff --git a/.docker/cmd-clink.yaml b/.docker/cmd-clink.yaml new file mode 100644 index 0000000000..7e23585e15 --- /dev/null +++ b/.docker/cmd-clink.yaml @@ -0,0 +1,8 @@ +services: + cmd-clink: + build: + context: cmd-clink + image: ghcr.io/carapace-sh/carapace-bin:cmd-clink + hostname: carapace-bin:cmd-clink + volumes: + - '..:/carapace-bin:ro' diff --git a/.docker/cmd-clink/Dockerfile b/.docker/cmd-clink/Dockerfile new file mode 100644 index 0000000000..2fd3add617 --- /dev/null +++ b/.docker/cmd-clink/Dockerfile @@ -0,0 +1,17 @@ +FROM archlinux + +RUN echo -e "\n[multilib]\nInclude = /etc/pacman.d/mirrorlist\n" >> /etc/pacman.conf + +RUN pacman -Sy --noconfirm elvish unzip wine + +RUN curl -L "https://github.com/chrisant996/clink/releases/download/v1.7.7/clink.1.7.7.521fa7.zip" > /tmp/clink.zip \ + && unzip -d /clink /tmp/clink.zip \ + && rm /tmp/clink.zip + +ENV WINEPATH="Z:\\clink;Z:\\carapace-bin\\cmd\\carapace" + +RUN mkdir -p ~/.config/elvish \ + && echo -e "set paths = [ /carapace-bin/cmd/carapace \$@paths ]\neval (carapace _carapace|slurp)" > ~/.config/elvish/rc.elv +ENV PATH="/carapace-bin/cmd/carapace:$PATH" + +CMD ["wine", "cmd"] diff --git a/compose.yaml b/compose.yaml index fc91a9f285..be2cd8fcd4 100644 --- a/compose.yaml +++ b/compose.yaml @@ -4,6 +4,7 @@ include: # tools - .docker/apk.yaml - .docker/bloop.yaml + - .docker/cmd-clink.yaml - .docker/fzf-tab.yaml - .docker/gcloud.yaml - .docker/nix.yaml