-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.bashrc
More file actions
93 lines (75 loc) · 2.56 KB
/
.bashrc
File metadata and controls
93 lines (75 loc) · 2.56 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# sttt scanline -d 0.4 -c 11
alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '
# 设置代理函数
function on() {
export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890
export all_proxy=socks5://127.0.0.1:7890
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
}
# 取消代理函数
function off() {
unset https_proxy
unset http_proxy
unset all_proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
}
eval "$(starship init bash)"
export MCFLY_RESULTS=50
eval "$(mcfly init bash)"
# # HSTR configuration - add this to ~/.bashrc
# alias hh=hstr # hh to be alias for hstr
# export HSTR_CONFIG=hicolor # get more colors
# shopt -s histappend # append new history items to .bash_history
# export HISTCONTROL=ignorespace # leading space hides commands from history
# export HISTFILESIZE=10000 # increase history file size (default is 500)
# export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
# # ensure synchronization between bash memory and history file
# export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
# function hstrnotiocsti {
# { READLINE_LINE="$({ </dev/tty hstr ${READLINE_LINE}; } 2>&1 1>&3 3>&-)"; } 3>&1
# READLINE_POINT=${#READLINE_LINE}
# }
# # if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
# if [[ $- =~ .*i.* ]]; then bind -x '"\C-r": "hstrnotiocsti"'; fi
# export HSTR_TIOCSTI=n
# Use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] &&
# . /usr/share/bash-completion/bash_completion
. /usr/share/bash-completion/bash_completion
alias tserv_start="systemctl --user restart cptserv-server"
alias tserv_close="systemctl --user stop cptserv-server"
alias ssh-agent-cyg='eval `ssh-agent -s`'
# yazi
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}
# default editor
# export EDITOR=neovide
export EDITOR=nvim
function wre() {
pkill -9 way-edges
nohup way-edges daemon 2>&1 >/tmp/way-edges.log &
}
# Created by `pipx` on 2024-11-12 10:24:56
# export PATH="$PATH:/home/ogios/.local/bin"
alias ghc="git clone"
alias carinst="cargo install"
alias carinstlocal="cargo install --path ."
export NEOVIDE_FORK=1
fastfetch
# yy