feat(bash): add bash, remove zsh
This commit is contained in:
parent
60f4b6e808
commit
b373fbaaab
7 changed files with 127 additions and 108 deletions
39
config/bash/bashrc
Normal file
39
config/bash/bashrc
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
for _hm in "/etc/profiles/per-user/$(id -un)" "$HOME/.nix-profile"; do
|
||||
[ -f "$_hm/etc/profile.d/hm-session-vars.sh" ] && . "$_hm/etc/profile.d/hm-session-vars.sh" && break
|
||||
done
|
||||
unset _hm
|
||||
|
||||
shopt -s autocd histappend
|
||||
|
||||
HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/bash_history"
|
||||
HISTSIZE=2000
|
||||
HISTFILESIZE=2000
|
||||
HISTCONTROL=ignoreboth:erasedups
|
||||
|
||||
alias ls='eza'
|
||||
alias l='ls --color=auto --group-directories-first'
|
||||
alias ll='l -alF'
|
||||
alias la='ll -R'
|
||||
alias g='git'
|
||||
alias nv='nvim'
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
export THEME="${THEME:-midnight}"
|
||||
export FZF_COMPLETION_TRIGGER=';'
|
||||
export FZF_TMUX=1
|
||||
|
||||
eval "$(fzf --bash)"
|
||||
eval "$(zoxide init bash)"
|
||||
eval "$(direnv hook bash)"
|
||||
eval "$(starship init bash)"
|
||||
|
||||
fzf-config-widget() {
|
||||
local file
|
||||
file="$(FZF_CTRL_T_COMMAND="fd --type file --hidden . \"$XDG_CONFIG_HOME\"/nix | sed \"s|$HOME|~|g\"" fzf --reverse)" || return
|
||||
file="${file/#\~/$HOME}"
|
||||
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}${file}${READLINE_LINE:$READLINE_POINT}"
|
||||
READLINE_POINT=$(( READLINE_POINT + ${#file} ))
|
||||
}
|
||||
bind -x '"\C-e": fzf-config-widget'
|
||||
|
||||
[ -r "$OPAMROOT/opam-init/init.sh" ] && . "$OPAMROOT/opam-init/init.sh" > /dev/null 2> /dev/null
|
||||
24
config/bash/inputrc
Normal file
24
config/bash/inputrc
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
set editing-mode vi
|
||||
set show-mode-in-prompt on
|
||||
set vi-cmd-mode-string "\1\e[2 q\2"
|
||||
set vi-ins-mode-string "\1\e[6 q\2"
|
||||
|
||||
set completion-ignore-case on
|
||||
set colored-stats on
|
||||
set show-all-if-ambiguous on
|
||||
|
||||
$if mode=vi
|
||||
set keymap vi-command
|
||||
"\C-p": previous-history
|
||||
"\C-n": next-history
|
||||
"\C-j": backward-char
|
||||
"\C-k": forward-char
|
||||
"\e[3~": delete-char
|
||||
|
||||
set keymap vi-insert
|
||||
"\C-p": previous-history
|
||||
"\C-n": next-history
|
||||
"\C-j": backward-char
|
||||
"\C-k": forward-char
|
||||
"\e[3~": delete-char
|
||||
$endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue