aboutsummaryrefslogtreecommitdiffstats
path: root/bashrc/.bashrc
blob: f3dfc735618401fca2e6abd7b0e626d27ce1fd7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# .bashrc

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias code='code-oss'
alias xi='xbps-install'
export EDITOR='nvim'
PS1='[\u@\h \W]\$ '

function y() {
	local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
	command yazi "$@" --cwd-file="$tmp"
	IFS= read -r -d '' cwd < "$tmp"
	[ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd"
	rm -f -- "$tmp"
}