Skip to content
Snippets Groups Projects
Commit 98fe06ab authored by Sven Mäder's avatar Sven Mäder :speech_balloon:
Browse files

Move common to profile/_assets

parent bf849a2a
No related branches found
No related tags found
No related merge requests found
......@@ -27,4 +27,5 @@ function source_dir_if_exists {
source_if_exists "${1}/.bashrc"
}
# source envrcd files
source_if_exists "${ENVRCD_PATH}/${ENVRCD_NAME}.d/*"
#!/bin/bash
# allowed characters for ENVRCD_SET_PROFILE and ENVRCD_SET_USER
VALID='0-9a-zA-Z_-'
# ENVRCD_SET_PROFILE must start with an alphanumeric character
PROFILE_FORMAT='^[0-9a-zA-Z]'
# validate settings variable for security reasons
if [ ! -z "${ENVRCD_SET_PROFILE}" ]; then
valid='0-9a-zA-Z_-'
if [[ ! ${ENVRCD_SET_PROFILE} =~ [^${valid}] ]]; then
if [[ ! ${ENVRCD_SET_PROFILE} =~ [^${VALID}] ]] && [[ ${ENVRCD_SET_PROFILE} =~ ${PROFILE_FORMAT} ]]; then
debug "ENVRCD_SET_PROFILE contains valid characters: ${ENVRCD_SET_PROFILE}"
export ENVRCD_PROFILE="${ENVRCD_SET_PROFILE}"
else
......@@ -16,7 +20,7 @@ fi
# validate settings variable for security reasons
if [ ! -z "${ENVRCD_SET_USER}" ]; then
valid='0-9a-zA-Z_-'
if [[ ! ${ENVRCD_SET_USER} =~ [^${valid}] ]]; then
if [[ ! ${ENVRCD_SET_USER} =~ [^${VALID}] ]]; then
debug "ENVRCD_SET_USER contains valid characters: ${ENVRCD_SET_USER}"
export ENVRCD_USER="${ENVRCD_SET_USER}"
else
......@@ -25,3 +29,6 @@ if [ ! -z "${ENVRCD_SET_USER}" ]; then
unset ENVRCD_USER
fi
fi
unset VALID
unset PROFILE_FORMAT
File moved
File moved
File moved
#!/bin/bash
source_if_exists "${ENVRCD_PATH}/common/functions/truncate_pwd"
source_if_exists "${ENVRCD_PATH}/common/functions/git_status"
source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/truncate_pwd"
source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/git_status"
function envrcd_prompt_ataraxia {
# Truncate the directory path if it exceeds a certain length. arguments: spacefree pwdminlen
......
#!/bin/bash
source_if_exists "${ENVRCD_PATH}/common/functions/truncate_pwd"
source_if_exists "${ENVRCD_PATH}/common/functions/git_status"
source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/truncate_pwd"
source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/git_status"
function envrcd_prompt_default {
# truncate the directory path if it exceeds a certain length. arguments: spacefree pwdminlen
......
../../../../common/vim/colors/jellybeans.vim
\ No newline at end of file
../../../_assets/vim/colors/jellybeans.vim
\ No newline at end of file
#!/bin/bash
source_if_exists "${ENVRCD_PATH}/common/functions/exit_status"
source_if_exists "${ENVRCD_PATH}/common/functions/truncate_pwd"
source_if_exists "${ENVRCD_PATH}/common/functions/git_status"
source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/exit_status"
source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/truncate_pwd"
source_if_exists "${ENVRCD_PATH}/profile/_assets/functions/git_status"
function envrcd_prompt_rda {
# show exit status of last command (needs to be the first function called). arguments: good, bad
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment