Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # .bashrc
- # Source global definitions
- if [ -f /etc/bashrc ]; then
- . /etc/bashrc
- fi
- # User specific environment
- if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
- PATH="$HOME/.local/bin:$HOME/bin:$PATH"
- fi
- export PATH
- # Uncomment the following line if you don't like systemctl's auto-paging feature:
- # export SYSTEMD_PAGER=
- # User specific aliases and functions
- if [ -d ~/.bashrc.d ]; then
- for rc in ~/.bashrc.d/*; do
- if [ -f "$rc" ]; then
- . "$rc"
- fi
- done
- fi
- unset rc
- # Automatically added by the Guix install script.
- if [ -n "$GUIX_ENVIRONMENT" ]; then
- if [[ $PS1 =~ (.*)"\\$" ]]; then
- PS1="${BASH_REMATCH[1]} [env]\\\$ "
- fi
- fi
- # vterm
- vterm_printf() {
- if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ]); then
- # Tell tmux to pass the escape sequences through
- printf "\ePtmux;\e\e]%s\007\e\\" "$1"
- elif [ "${TERM%%-*}" = "screen" ]; then
- # GNU screen (screen, screen-256color, screen-256color-bce)
- printf "\eP\e]%s\007\e\\" "$1"
- else
- printf "\e]%s\e\\" "$1"
- fi
- }
- # clear vterm screen
- if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
- function clear() {
- vterm_printf "51;Evterm-clear-scrollback";
- tput clear;
- }
- fi
- # prompt tracking
- vterm_prompt_end(){
- vterm_printf "51;A$(whoami)@$(hostname):$(pwd)"
- }
- PS1=$PS1'\[$(vterm_prompt_end)\]'
Advertisement
Add Comment
Please, Sign In to add comment