-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,39 @@ | ||
export LS_COLORS="${LS_COLORS}di=1;34:" | ||
export EXA_COLORS="da=1;34:gm=1;34" | ||
#alias ls='exa' | ||
alias ll='ls -alh' | ||
export PATH=$PATH:~/.composer/vendor/bin:./bin:./vendor/bin:./node_modules/.bin:~/.yarn/bin | ||
source ~/.git-completion.bash | ||
source ~/.git-prompt.sh | ||
export PATH=$PATH:~/.config/composer/vendor/bin:~/.composer/vendor/bin:./bin:./vendor/bin:./node_modules/.bin:~/.yarn/bin | ||
|
||
#CONTAINER_ID=$(basename $(cat /proc/1/cpuset)) | ||
#export HOST_DISPLAY_NAME=$HOSTNAME | ||
#if sudo docker ps -q &>/dev/null; then | ||
# DOCKER_COMPOSE_PROJECT=$(sudo docker inspect ${CONTAINER_ID} | grep '"com.docker.compose.project":' | awk '{print $2}' | tr --delete '"' | tr --delete ',') | ||
# export HOST_DISPLAY_NAME=$(sudo docker inspect ${CONTAINER_ID} --format='{{.Name}}') | ||
# export HOST_DISPLAY_NAME=${HOST_DISPLAY_NAME:1} | ||
#fi; | ||
# only enable docker aliases if docker-socket is mounted | ||
CONTAINER_ID=$(basename $(findmnt /etc/hosts -o SOURCE | grep -o 'containers\/.\+\/')) | ||
export HOST_DISPLAY_NAME=$HOSTNAME | ||
if sudo docker ps -q &>/dev/null; then | ||
DOCKER_COMPOSE_PROJECT=$(sudo docker inspect ${CONTAINER_ID} | jq -r '.[0].Config.Labels."com.docker.compose.project"') | ||
export NODE_CONTAINER=$(sudo docker ps -f "name=${DOCKER_COMPOSE_PROJECT}" --format {{.Names}} | grep node) | ||
export HOST_DISPLAY_NAME=$(sudo docker inspect ${CONTAINER_ID} --format='{{.Name}}') | ||
export HOST_DISPLAY_NAME=${HOST_DISPLAY_NAME:1} | ||
fi; | ||
|
||
export HISTCONTROL=ignoreboth:erasedups | ||
|
||
if [[ $CONTAINER_ID != ${HOSTNAME}* ]] ; then | ||
export HOST_DISPLAY_NAME=$HOSTNAME | ||
fi; | ||
fi | ||
|
||
PS1='\033]2;'$(pwd)'\007\[\e[0;36m\][\[\e[1;31m\]\u\[\e[0;36m\]@\[\e[1;34m\]$HOST_DISPLAY_NAME\[\e[0;36m\]: \[\e[0m\]\w\[\e[0;36m\]]\[\e[0m\]\$\[\e[1;32m\]\s\[\e[0;33m\]$(__git_ps1)\[\e[0;36m\]> \[\e[0m\]\n$ '; | ||
source ~/.bash_git | ||
|
||
PS1='\033]2;$HOST_DISPLAY_NAME: \w\007\[\e[0;36m\][\[\e[1;31m\]\u\[\e[0;36m\]@\[\e[1;34m\]$HOST_DISPLAY_NAME\[\e[0;36m\]: \[\e[0m\]\w\[\e[0;36m\]]\[\e[0m\]\$\[\e[1;32m\]\s\[\e[0;33m\]$(__git_ps1)\[\e[0;36m\]> \[\e[0m\]\n$ '; | ||
|
||
# Run SSH Agent and add key 7d | ||
if [ -z "$SSH_AUTH_SOCK" ] ; then | ||
eval `ssh-agent -s` | ||
if [ -f ~/.ssh/id_rsa ]; then | ||
ssh-add -t 604800 ~/.ssh/id_rsa | ||
fi; | ||
fi | ||
if [ -f ~/.ssh/id_ed25519 ]; then | ||
ssh-add -t 604800 ~/.ssh/id_ed25519 | ||
fi | ||
fi | ||
|
||
if [ -v VIRTUAL_HOST ] ; then | ||
echo 'Frontend URLs:' | ||
echo $VIRTUAL_HOST | tr "," "\n" | awk '{print " https://" $0}' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters