Include Python virtual env name on the terminal prompt (#670)

Normally when you activate a Python virtual env, it updates the terminal prompt to include the env name wrapped in parenthesis as a prefix on the PS1. Currently, that doesn't work with the default bash `codespaces` theme. This change updates the theme to prepend the virtual env name to the prompt if a virtual env is defined via the `$VIRTUAL_ENV` environment variable, which is similar to the logic that the venv activate script runs.
This commit is contained in:
John Keech 2020-12-01 09:55:12 -08:00 коммит произвёл GitHub
Родитель 7f40157ff9
Коммит 66787779ba
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
32 изменённых файлов: 248 добавлений и 0 удалений

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"

Просмотреть файл

@ -225,7 +225,15 @@ prompt() {
fi
local cwd="\$(pwd | sed "s|^\${HOME}|~|")"
PS1="\${green}\${USERNAME} \${arrow_color}➜\${reset_color} \${bold_blue}\${cwd}\${reset_color} \$(scm_prompt_info)\${white}$ \${reset_color}"
# Prepend Python virtual env version to prompt
if [[ -n \$VIRTUAL_ENV ]]; then
if [ -z "\${VIRTUAL_ENV_DISABLE_PROMPT:-}" ]; then
PS1="(\`basename \"\$VIRTUAL_ENV\"\`) \${PS1:-}"
fi
fi
}
SCM_THEME_PROMPT_PREFIX="\${reset_color}\${cyan}(\${bold_red}"
SCM_THEME_PROMPT_SUFFIX="\${reset_color} "
SCM_THEME_PROMPT_DIRTY=" \${bold_yellow}✗\${reset_color}\${cyan})"