Skip to content

Commit 3b9101c

Browse files
committed
Add console colors and ctx autocomplete
1 parent febf605 commit 3b9101c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/build-linux-release.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,28 @@ jobs:
134134
cat > ./docker/Dockerfile << 'EOF'
135135
FROM alpine:3.21
136136
137-
RUN apk add --no-cache libstdc++ libgcc
137+
# Install dependencies
138+
RUN apk add --no-cache libstdc++ libgcc bash ncurses
139+
140+
# Set up bash as the default shell
141+
SHELL ["/bin/bash", "-c"]
142+
143+
# Enable color support
144+
ENV TERM=xterm-256color
145+
ENV COLORTERM=truecolor
146+
147+
# Configure bash to use colors
148+
RUN echo 'export PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/profile
149+
RUN echo 'alias ls="ls --color=auto"' >> /etc/profile
150+
RUN echo 'alias grep="grep --color=auto"' >> /etc/profile
138151
139152
WORKDIR /app
140153
141154
COPY ctx /usr/local/bin/ctx
142-
143155
RUN chmod +x /usr/local/bin/ctx
144156
157+
RUN /usr/local/bin/ctx completion | sudo tee /etc/bash_completion.d/ctx
158+
145159
ENTRYPOINT ["ctx"]
146160
EOF
147161

0 commit comments

Comments
 (0)