feat: add bashrc, inputrc
This commit is contained in:
parent
2ecb557a02
commit
ec960de41d
2 changed files with 25 additions and 0 deletions
22
bashrc
Normal file
22
bashrc
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
## editor
|
||||||
|
export EDITOR=nvim
|
||||||
|
alias vi=nvim
|
||||||
|
|
||||||
|
## color
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
|
||||||
|
## https://blog.naskya.net/post/6kic0tebueju/#firefish-%e3%82%92%e8%b5%b7%e5%8b%95
|
||||||
|
alias sudo='sudo '
|
||||||
|
alias start="bash -c 'systemctl start \$0; journalctl --catalog --pager-end --follow --unit=\$0'"
|
||||||
|
|
||||||
|
## PS1
|
||||||
|
EPS0='\e]0;\u@\h: \w\a'
|
||||||
|
EPS1='\u@\h'
|
||||||
|
EPS2=':\w\$'
|
||||||
|
sup39_update_PS1 () {
|
||||||
|
bind "set vi-ins-mode-string \"\1${EPS0@P}\e[38;5;49m\2${EPS1@P}\1\e[39m\2${EPS2@P}\""
|
||||||
|
bind "set vi-cmd-mode-string \"\1${EPS0@P}\e[38;5;200m\2${EPS1@P}\1\e[39m\2${EPS2@P}\""
|
||||||
|
}
|
||||||
|
PROMPT_COMMAND=sup39_update_PS1
|
||||||
|
PS1=' '
|
3
inputrc
Normal file
3
inputrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
set editing-mode vi
|
||||||
|
set show-mode-in-prompt on
|
||||||
|
"jk": vi-movement-mode
|
Loading…
Reference in a new issue