Merge pull request #2704 from colinpitcher/feature/add-zsh-aliases

Add aliases to .zshrc in workspace when SHELL_OH_MY_ZSH=true
This commit is contained in:
Shao Yu-Lung (Allen) 2020-09-30 11:02:21 +08:00 committed by GitHub
commit 8556088c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1463,6 +1463,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