-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
64 lines (53 loc) · 2.35 KB
/
.bashrc
File metadata and controls
64 lines (53 loc) · 2.35 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Define colors
RED='\033[0;31m'
GREEMSGCOLOR='\033[0;32m'
BLUE='\033[0;34m'
BOLD='\033[1m'
RESET='\033[0m'
# Define background colors for buttons
BG_GRAY='\033[48;5;235m'
BG_BLUE='\033[48;5;26m'
WHITE='\033[97m'
# Boring old man helper msg
echo ""
echo -e "${BOLD}${BLUE}=== ${WHITE}Hotkeys${BLUE} ===${RESET}"
echo -e "${BG_GRAY}${WHITE} CTRL+FN+INSERT ${RESET} ${GREEMSGCOLOR}Copy${RESET}"
echo -e "${BG_GRAY}${WHITE} SHIFT+FN+INSERT ${RESET} ${GREEMSGCOLOR}Paste${RESET}"
echo -e "${BG_GRAY}${WHITE} SPACE + P ${RESET} ${GREEMSGCOLOR}Paste (Crossterm Fix)${RESET}"
echo ""
echo -e "${BOLD}${BLUE}=== ${WHITE}Modern Tools (Replacements)${BLUE} ===${RESET}"
echo -e "${WHITE}ls${RESET} → ${GREEMSGCOLOR}eza${RESET} (try: ${WHITE}ls${RESET}, ${WHITE}la${RESET}, ${WHITE}ll${RESET})"
echo -e "${WHITE}cat${RESET} → ${GREEMSGCOLOR}bat${RESET}"
echo -e "${WHITE}grep${RESET} → ${GREEMSGCOLOR}rg${RESET}"
echo -e "${WHITE}find${RESET} → ${GREEMSGCOLOR}fd${RESET}"
echo -e "${WHITE}history${RESET} → ${GREEMSGCOLOR}fzf${RESET} (${WHITE}CTRL+R${RESET})"
echo ""
echo -e "${BOLD}${BLUE}=== ${WHITE}Example usage${BLUE} ===${RESET}"
echo -e "${WHITE}fd svelte | fzf${RESET} (Find & pick a file)"
echo -e "${WHITE}fd svelte | fzf | xargs hx${RESET} (Find, pick, & open in Helix)"
echo ""
echo -e "${BOLD}${BLUE}=== ${WHITE}Custom Aliases${BLUE} ===${RESET}"
echo -e "${WHITE}etree${RESET} → ${GREEMSGCOLOR}eza Tree View${RESET}"
echo ""
# Eza tree view ignore git and sorted
alias etree='eza -T --group-directories-first --git-ignore --sort=name'
# --- eza (replaces ls) ---
alias ll='eza -l -a --header --icons --git --group-directories-first' # list long, all, with git
alias la='eza -a --icons --group-directories-first' # list all
alias ls='eza --icons --group-directories-first' # simple list
# --- bat (replaces cat) ---
alias cat='bat'
# --- ripgrep (replaces grep) ---
alias grep='rg'
# --- fd (replaces find) ---
# LOL I can just type fd directly
alias find='fd'
# --- fzf (Fuzzy Finder) Setup ---
# fzf installed via scoop
if [[ -f "$HOME/scoop/apps/fzf/current/shell/key-bindings.bash" ]]; then
source "$HOME/scoop/apps/fzf/current/shell/key-bindings.bash"
fi
# fzf boring border
export FZF_DEFAULT_OPTS='--border=rounded --preview="bat --color=always --line-range :50 {}" --height 40%'
# boring lazy reload command
alias reload='source ~/.bashrc'