Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
bash.bashrc70 linesDownload Raw Back to etc
1# To the extent possible under law, the author(s) have dedicated all 2# copyright and related and neighboring rights to this software to the 3# public domain worldwide. This software is distributed without any warranty. 4# You should have received a copy of the CC0 Public Domain Dedication along 5# with this software. 6# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>. 7 8# /etc/bash.bashrc: executed by bash(1) for interactive shells.9 10# System-wide bashrc file11 12# Check that we haven't already been sourced.13([[ -z ${CYG_SYS_BASHRC} ]] && CYG_SYS_BASHRC="1") || return14 15# If not running interactively, don't do anything16[[ "$-" != *i* ]] && return17 18# If started from sshd, make sure profile is sourced19if [[ -n "$SSH_CONNECTION" ]] && [[ "$PATH" != *:/usr/bin* ]]; then20    source /etc/profile21fi22 23# Warnings24unset _warning_found25for _warning_prefix in '' ${MINGW_PREFIX}; do26    for _warning_file in ${_warning_prefix}/etc/profile.d/*.warning{.once,}; do27        test -f "${_warning_file}" || continue28        _warning="$(command sed 's/^/\t\t/' "${_warning_file}" 2>/dev/null)"29        if test -n "${_warning}"; then30            if test -z "${_warning_found}"; then31                _warning_found='true'32                echo33            fi34            if test -t 135                then printf "\t\e[1;33mwarning:\e[0m\n${_warning}\n\n"36                else printf "\twarning:\n${_warning}\n\n"37            fi38        fi39        [[ "${_warning_file}" = *.once ]] && rm -f "${_warning_file}"40    done41done42unset _warning_found43unset _warning_prefix44unset _warning_file45unset _warning46 47# If MSYS2_PS1 is set, use that as default PS1;48# if a PS1 is already set and exported, use that;49# otherwise set a default prompt50# of user@host, MSYSTEM variable, and current_directory51[[ -n "${MSYS2_PS1}" ]] && export PS1="${MSYS2_PS1}"52# if we have the "High Mandatory Level" group, it means we're elevated53#if [[ -n "$(command -v getent)" ]] && id -G | grep -q "$(getent -w group 'S-1-16-12288' | cut -d: -f2)"54#  then _ps1_symbol='\[\e[1m\]#\[\e[0m\]'55#  else _ps1_symbol='\$'56#fi57case "$(declare -p PS1 2>/dev/null)" in58'declare -x '*) ;; # okay59*)60  export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n'"${_ps1_symbol}"' '61  ;;62esac63unset _ps1_symbol64 65# Uncomment to use the terminal colours set in DIR_COLORS66# eval "$(dircolors -b /etc/DIR_COLORS)"67 68# Fixup git-bash in non login env69shopt -q login_shell || . /etc/profile.d/git-prompt.sh70 
codekingpro/portable-devtools · Team Ai