-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_shrc
37 lines (33 loc) · 1.78 KB
/
dot_shrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# SPDX-FileCopyrightText: Chris Wilson <[email protected]>
#
# SPDX-License-Identifier: MIT
# The POSIX sh shell personal interactive initialization script file.
# When invoked as an interactive shell with the name sh, Bash looks for the
# variable ENV, expands its value if it is defined, and uses the expanded value
# as the name of a file to read and execute. For more details, see
# https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
# shellcheck shell=sh
# If an interactive shell is invoked as sh from an existing interactive bash
# shell, PROMPT_COMMAND will be inherited in the environment. If the starship
# prompt was initialized, PROMPT_COMMAND will contain "starship_precmd" and
# you'll see an error like the following:
#
# sh: starship_precmd: command not found
#
# Since starship doesn't support sh, and the only time this file is run is when
# the shell is invoked as sh, just unset PROMPT_COMMAND.
unset PROMPT_COMMAND
# Starting in Ubuntu 6.10, the default system shell, /bin/sh, was changed to
# dash (the Debian Almquist Shell). The default login shell remains bash.
# Opening a terminal from the menu or shortcut [crtl-alt-t] provides interactive
# bash. A script run from the desktop or file manager, through the dialogue 'run
# in terminal' will execute as POSIX dash. See
# https://wiki.ubuntu.com/DashAsBinSh for more details.
#
# If an interactive shell is invoked as sh from an existing interactive bash
# shell, PS1 will be inherited in the environment. If the starship prompt was
# initialized, PS1 will contain a bunch of terminal escape sequences that dash
# doesn't support. Since starship doesn't support sh, and the only time this
# file is run is when the shell is invoked as sh, just set PS1 to something
# supported by dash.
PS1='$ '