github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/containers/ddev-webserver/ddev-webserver-base-files/etc/bash.bashrc (about)

     1  # System-wide .bashrc file for interactive bash(1) shells.
     2  
     3  # To enable the settings / commands in this file for login shells as well,
     4  # this file has to be sourced in /etc/profile.
     5  
     6  # If not running interactively, don't do anything
     7  [ -z "$PS1" ] && return
     8  
     9  # check the window size after each command and, if necessary,
    10  # update the values of LINES and COLUMNS.
    11  shopt -s checkwinsize
    12  
    13  # set variable identifying the chroot you work in (used in the prompt below)
    14  if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    15      debian_chroot=$(cat /etc/debian_chroot)
    16  fi
    17  
    18  # set a fancy prompt (non-color, overwrite the one in /etc/profile)
    19  PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    20  
    21  # if the command-not-found package is installed, use it
    22  if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
    23  	function command_not_found_handle {
    24  	        # check because c-n-f could've been removed in the meantime
    25                  if [ -x /usr/lib/command-not-found ]; then
    26  		   /usr/lib/command-not-found -- "$1"
    27                     return $?
    28                  elif [ -x /usr/share/command-not-found/command-not-found ]; then
    29  		   /usr/share/command-not-found/command-not-found -- "$1"
    30                     return $?
    31  		else
    32  		   printf "%s: command not found\n" "$1" >&2
    33  		   return 127
    34  		fi
    35  	}
    36  fi
    37  
    38  export HISTFILE=/mnt/ddev-global-cache/bashhistory/${HOSTNAME}/bash_history
    39  
    40  [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
    41  [ -s "$NVM_DIR/bash_completion" ] && source "$NVM_DIR/bash_completion"