Improve tcsh config
parent
13bcedbba4
commit
f5a59c7c6a
|
@ -1,3 +1,4 @@
|
||||||
set __prompt_key_color="${__host_color}"
|
set __prompt_key_color="${__prompt_success_color}"
|
||||||
if (! $__last_code == 0) set __prompt_key_color="%{\033[38;2;231;130;132m%}"
|
if (! $__last_code == 0) set __prompt_key_color="${__prompt_failure_color}"
|
||||||
set prompt="${__host_color}%n@%m ${__git_color}`__git_current_branch`${__path_color}%C ${__prompt_key_color}${__prompt_key}${__reset_color}${__reset_cursor} "
|
|
||||||
|
set prompt="${__time_color}%T ${__host_color}%n@%m ${__path_color}%~ ${__git_color}`__git_current_branch` \n${__prompt_key_color}%#${__reset_color}${__reset_cursor} "
|
||||||
|
|
26
tcsh/.tcshrc
26
tcsh/.tcshrc
|
@ -1,31 +1,35 @@
|
||||||
set SHELL="`which tcsh`"
|
setenv EDITOR "nvim"
|
||||||
|
setenv SHELL "`which tcsh`"
|
||||||
|
setenv PAGER "less"
|
||||||
|
|
||||||
if ($?prompt) then
|
if ($?prompt) then
|
||||||
set complete=enhance
|
set complete=enhance
|
||||||
|
set promptchars = '$#'
|
||||||
set __prompt_key='$'
|
|
||||||
if ($USER == "root") set __prompt_key='#'
|
|
||||||
|
|
||||||
alias __git_current_branch 'git rev-parse --abbrev-ref HEAD >& /dev/null && echo "(`git rev-parse --abbrev-ref HEAD`) "'
|
alias __git_current_branch 'git rev-parse --abbrev-ref HEAD >& /dev/null && echo "(`git rev-parse --abbrev-ref HEAD`) "'
|
||||||
|
|
||||||
set __reset_cursor="%{\e[3 q%}"
|
set __reset_cursor="%{\033[3 q%}"
|
||||||
set __reset_color="%{\033[0m%}"
|
set __reset_color="%{\033[0m%}"
|
||||||
|
set __time_color="${__reset_color}%{\033[38;2;131;139;167m%}"
|
||||||
set __host_color="${__reset_color}%{\033[38;2;140;170;238m%}"
|
set __host_color="${__reset_color}%{\033[38;2;140;170;238m%}"
|
||||||
set __git_color="${__reset_color}%{\033[38;2;131;139;167m%}"
|
|
||||||
set __path_color="${__reset_color}%{\033[1m%}%{\033[38;2;202;158;230m%}"
|
set __path_color="${__reset_color}%{\033[1m%}%{\033[38;2;202;158;230m%}"
|
||||||
|
set __git_color="${__reset_color}%{\033[38;2;131;139;167m%}"
|
||||||
|
|
||||||
|
set __prompt_success_color="${__reset_color}%{\033[38;2;140;170;238m%}"
|
||||||
|
set __prompt_failure_color="${__reset_color}%{\033[38;2;231;130;132m%}"
|
||||||
|
|
||||||
alias precmd 'set __last_code=$?; source ~/.precmd.tcsh'
|
alias precmd 'set __last_code=$?; source ~/.precmd.tcsh'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
alias l "ls -lah"
|
|
||||||
|
|
||||||
alias .. "cd .."
|
alias .. "cd .."
|
||||||
alias ... "cd ../.."
|
alias ... "cd ../.."
|
||||||
alias .... "cd ../../.."
|
alias .... "cd ../../.."
|
||||||
alias ..... "cd ../../../.."
|
alias ..... "cd ../../../.."
|
||||||
|
|
||||||
|
alias dp "doas pacman"
|
||||||
alias dem "doas emerge"
|
alias dem "doas emerge"
|
||||||
alias stdn "doas shutdown -ah 0"
|
alias stdn "doas shutdown -ah 0"
|
||||||
alias rbot "doas reboot"
|
alias rbot "doas reboot"
|
||||||
alias dv "doas nvim"
|
alias dv "doas vi"
|
||||||
alias vi "nvim"
|
alias ls "ls --color"
|
||||||
alias vis "nvim -S Session.vim"
|
alias l "ls -lah"
|
||||||
|
|
Loading…
Reference in New Issue