Compare commits
No commits in common. "b14dccdae0dbdc66375012a5b18f0f4f418493f8" and "96a4d2ce5f03476b0c5f554c15b84a368cb68d6e" have entirely different histories.
b14dccdae0
...
96a4d2ce5f
21
.zsh_aliases
21
.zsh_aliases
@ -53,20 +53,13 @@ if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null; then
|
|||||||
alias open="/mnt/c/Windows/explorer.exe" # Mac-style 'open' command
|
alias open="/mnt/c/Windows/explorer.exe" # Mac-style 'open' command
|
||||||
|
|
||||||
# 2. VS Code (Dynamic Alias)
|
# 2. VS Code (Dynamic Alias)
|
||||||
if [ -f "/mnt/c/Windows/System32/cmd.exe" ]; then
|
# This finds the username automatically so it works on any Windows machine
|
||||||
_WIN_USER=$(/mnt/c/Windows/System32/cmd.exe /c 'echo %USERNAME%' 2>/dev/null | tr -d '\r')
|
_WIN_USER=$(cmd.exe /c 'echo %USERNAME%' 2>/dev/null | tr -d '\r')
|
||||||
|
|
||||||
# Only proceed if we actually got a username back
|
if [ -d "/mnt/c/Users/$_WIN_USER/AppData/Local/Programs/Microsoft VS Code/bin" ]; then
|
||||||
if [ -n "$_WIN_USER" ]; then
|
alias code="/mnt/c/Users/$_WIN_USER/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code"
|
||||||
USER_CODE="/mnt/c/Users/$_WIN_USER/AppData/Local/Programs/Microsoft VS Code/bin/code"
|
elif [ -d "/mnt/c/Program Files/Microsoft VS Code/bin" ]; then
|
||||||
SYS_CODE="/mnt/c/Program Files/Microsoft VS Code/bin/code"
|
alias code="/mnt/c/Program\ Files/Microsoft\ VS\ Code/bin/code"
|
||||||
|
|
||||||
if [ -f "$USER_CODE" ]; then
|
|
||||||
# We use single quotes for the alias definition to handle the spaces safely
|
|
||||||
alias code="'$USER_CODE'"
|
|
||||||
elif [ -f "$SYS_CODE" ]; then
|
|
||||||
alias code="'$SYS_CODE'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
2
setup.sh
2
setup.sh
@ -167,7 +167,7 @@ echo -e "${BLUE} LOG:${YELLOW} Configuring Git Credentials...${NC}"
|
|||||||
if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null; then
|
if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null; then
|
||||||
GCM_WIN="/mnt/c/Program Files/Git/mingw64/bin/git-credential-manager.exe"
|
GCM_WIN="/mnt/c/Program Files/Git/mingw64/bin/git-credential-manager.exe"
|
||||||
if [ -f "$GCM_WIN" ]; then
|
if [ -f "$GCM_WIN" ]; then
|
||||||
git config --global credential.helper "! \"$GCM_WIN\""
|
git config --global credential.helper "\"$GCM_WIN\""
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Linux Server: Cache credentials for 12 hour
|
# Linux Server: Cache credentials for 12 hour
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user