Sha256: e9078e068c0ccfa290e27a9bf038ef0cf73afe6e33b2e24e8d255490473f3a14

Contents?: true

Size: 1.59 KB

Versions: 7

Compression:

Stored size: 1.59 KB

Contents

#!/bin/bash
set -e

codespaces_bash="$(cat \
<<'EOF'
# Codespaces bash prompt theme
__bash_prompt() {
    local userpart='`export XIT=$? \
        && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \
        && echo -n "\[\033[0;36m\][IM ${IMAGEMAGICK_VERSION}]" \
        && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`'
    local gitbranch='`\
        if [ "$(git config --get codespaces-theme.hide-status 2>/dev/null)" != 1 ]; then \
            export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \
            if [ "${BRANCH}" != "" ]; then \
                echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \
                && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \
                        echo -n " \[\033[1;33m\]✗"; \
                fi \
                && echo -n "\[\033[0;36m\]) "; \
            fi; \
        fi`'
    local lightblue='\[\033[1;34m\]'
    local removecolor='\[\033[0m\]'
    PS1="${userpart} ${lightblue}\w ${gitbranch}${removecolor}\$ "
    unset -f __bash_prompt
}
__bash_prompt

__show_notice() {
  local __message="
\033[0;32mWelcome to Codespaces! You are using the pre-configured rmagick image.\033[0m

\033[0;35mTests can be executed with:\033[0m bundle exec rake
\033[0;35mCode style can be checked with:\033[0m STYLE_CHECKS=true bundle exec rubocop
"
  echo -e "$__message"

  unset -f __show_notice
}
__show_notice
EOF
)"

echo "${codespaces_bash}" >> "/root/.bashrc"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rmagick-6.0.0 .devcontainer/setup-user.sh
rmagick-5.5.0 .devcontainer/setup-user.sh
rmagick-5.4.4 .devcontainer/setup-user.sh
rmagick-5.4.3 .devcontainer/setup-user.sh
rmagick-5.4.2 .devcontainer/setup-user.sh
rmagick-5.4.1 .devcontainer/setup-user.sh
rmagick-5.4.0 .devcontainer/setup-user.sh