Skip to content

Commit

Permalink
wsl
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-eraigosa committed Mar 31, 2024
1 parent 2d7e64b commit 6d095e9
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 8 deletions.
11 changes: 11 additions & 0 deletions opt/profiles/.bash_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ fi

if [ "$(uname -s)" = "Darwin" ]; then
alias code="open '/Applications/Visual Studio Code.app'"
else
alias code="/mnt/c/Program\ Files/Microsoft\ VS\ Code/Code.exe"
fi

# gpg
Expand All @@ -205,3 +207,12 @@ fi
alias python=python3
alias pip=pip3
alias vault-login=vault-login.sh

# docker windows
if [ -d /mnt/c/Program\ Files/Docker/Docker/resources/bin/ ]; then
alias docker='/mnt/c/Program\ Files/Docker/Docker/resources/bin/docker.exe'
alias kubectl='/mnt/c/Program\ Files/Docker/Docker/resources/bin/kubectl.exe'
alias docker-compose='/mnt/c/Program\ Files/Docker/Docker/resources/bin/docker-compose.exe'
fi
alias python='python3'
alias pip='pip3'
4 changes: 4 additions & 0 deletions opt/profiles/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,7 @@ export PATH="$PATH:/usr/local/bin"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

if [ -f /home/linuxbrew/.linuxbrew/bin/brew ] ; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
13 changes: 9 additions & 4 deletions opt/profiles/.goenv.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# export GOPATH=$HOME/go
# export GOPATH=$HOME/GitHub/go
# export PATH=$PATH:$GOPATH/bin
# unset GOROOT
# https://golang.org/doc/gopath_code.html#GOPATH
# export PATH=$PATH:$(go env GOPATH)/bin

export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
export GOENV_ROOT=$HOME/go
if [[ "$(uname -r | awk -F'-' '{print $3}')" = "Microsoft" ]] ; then
export GOENV_ROOT=/mnt/c/Program\ Files/Go
alias go='go.exe'
fi

# export GOENV_ROOT="$HOME/.goenv"
export PATH=$GOENV_ROOT/bin:$PATH
eval "$(go env init -)"
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"
15 changes: 14 additions & 1 deletion opt/profiles/.profile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ if [ `command -v facter` ]; then
fi
echo "|$id|$ip" > ~/.info
# SSH BANNER -------------------------
rm ~/.motd
if [ -f ~/.motd ]; then
rm ~/.motd
fi
owner="wenlock"
owner=$(printf '%-40s' $owner)
host=$(hostname | awk -F. '{print $1"."$2}')
Expand Down Expand Up @@ -105,4 +107,15 @@ export RBENV_VERSION=2.7.1
test -e "/workspace/Human-Connection/.devcontainer/profile_devcontainer_alias.sh" && \
source "/workspace/Human-Connection/.devcontainer/profile_devcontainer_alias.sh"

if [ -d "/home/linuxbrew" ]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
# docker windows
if [ -d "/mnt/c/Program\ Files/Docker/Docker" ]; then
alias docker='/mnt/c/Program\ Files/Docker/Docker/resources/bin/docker.exe'
alias docker-compose='/mnt/c/Program\ Files/Docker/Docker/resources/bin/docker-compose.exe'
fi

eval "$(ssh-agent -s)"
export GPG_TTY=$(tty)
/bin/bash -c zsh
7 changes: 4 additions & 3 deletions opt/profiles/.zshrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/zsh
# Path to your oh-my-zsh installation.

autoload -Uz compinit
compinit

# Pull the latest repos
if [ -f "${HOME}/.gitrepos" ] ; then
Expand All @@ -11,7 +10,7 @@ if [ -f "${HOME}/.gitrepos" ] ; then
"${HOME}/.gitrepos"
fi

. ~/.profile
#. ~/.profile
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Expand Down Expand Up @@ -195,3 +194,5 @@ if [ -f ~/.secrets.env ] ; then
source ~/.secrets.env
fi

# autoload -Uz compinit
# compinit

0 comments on commit 6d095e9

Please sign in to comment.