From ce68ece5bcb668aa9855ce6a68e7895f23d893d2 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Wed, 1 Nov 2023 02:40:53 +0300 Subject: [PATCH] Add .tcshrc --- tcsh/.tcshrc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tcsh/.tcshrc diff --git a/tcsh/.tcshrc b/tcsh/.tcshrc new file mode 100644 index 0000000..0c36e6c --- /dev/null +++ b/tcsh/.tcshrc @@ -0,0 +1,28 @@ +if ($?prompt) then + 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`) "' + + set __reset_cursor="%{\e[3 q%}" + set __host_color="%{\033[38;2;140;170;238m%}" + set __git_color="%{\033[38;2;131;139;167m%}" + set __path_color="%{\033[38;2;202;158;230m%}" + set __prompt_key_color="${__host_color}" + set __reset_color="%{\033[0m%}" + + alias precmd 'set prompt="${__host_color}%n@%m ${__git_color}`__git_current_branch`${__path_color}%~ ${__prompt_key_color}${__prompt_key}${__reset_color}${__reset_cursor} "' +endif + +alias l "ls -lah" + +alias .. "cd .." +alias ... "cd ../.." +alias .... "cd ../../.." +alias ..... "cd ../../../.." + +alias dem "doas emerge" +alias stdn "doas shutdown -ah 0" +alias rbot "doas reboot" +alias dv "doas nvim" +alias vi "nvim"