-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc_linux
More file actions
40 lines (35 loc) · 1.22 KB
/
Copy pathbashrc_linux
File metadata and controls
40 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# ============================================================
# bashrc_linux — Linux / WSL (Ubuntu) / Termux entry point
# Symlink or source this from ~/.bashrc
# ============================================================
# Source system-wide bashrc (Ubuntu/Debian)
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
elif [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# --- WSL Detection ---
if grep -qi microsoft /proc/version 2>/dev/null; then
# WSL-specific
export BROWSER='wslview'
alias open='explorer.exe 2>/dev/null || wslview'
elif [ -n "$TERMUX_VERSION" ]; then
# Termux-specific
export BROWSER='termux-open-url'
alias open='termux-open'
else
# Native Linux
alias open='xdg-open'
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
fi
# --- Linux-specific PATH additions ---
# (most are handled in the shared bashrc)
# --- Bash Completion ---
# On Ubuntu/Debian, bash-completion is auto-sourced via /etc/bash.bashrc
# If not already present, install: sudo apt install bash-completion
# Verify: complete -p git 2>/dev/null && echo "git completions loaded"
# --- Source the shared bashrc ---
if [ -f ~/dotfiles/bashrc ]; then
. ~/dotfiles/bashrc
fi