Add aliases to ZSH in workspace

Updated Workspace Dockerfile to add aliases to .zshrc if SHELL_OH_MY_ZSH is set to "true".
This commit is contained in:
Colin Pitcher 2020-09-11 15:12:51 -04:00
parent ade6f6b1a7
commit f640027bcb

View File

@ -1413,6 +1413,36 @@ bindkey "^?" backward-delete-char\n' >> /home/laradock/.zshrc \
USER root
###########################################################################
# ZSH User Aliases
###########################################################################
USER root
COPY ./aliases.sh /root/aliases.sh
COPY ./aliases.sh /home/laradock/aliases.sh
RUN if [ ${SHELL_OH_MY_ZSH} = true ]; then \
sed -i 's/\r//' /root/aliases.sh && \
sed -i 's/\r//' /home/laradock/aliases.sh && \
chown laradock:laradock /home/laradock/aliases.sh && \
echo "" >> ~/.zshrc && \
echo "# Load Custom Aliases" >> ~/.zshrc && \
echo "source ~/aliases.sh" >> ~/.zshrc && \
echo "" >> ~/.zshrc \
;fi
USER laradock
RUN if [ ${SHELL_OH_MY_ZSH} = true ]; then \
echo "" >> ~/.zshrc && \
echo "# Load Custom Aliases" >> ~/.zshrc && \
echo "source ~/aliases.sh" >> ~/.zshrc && \
echo "" >> ~/.zshrc \
;fi
USER root
#
#--------------------------------------------------------------------------
# Final Touch