-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bashrc
More file actions
35 lines (29 loc) · 1.6 KB
/
dot_bashrc
File metadata and controls
35 lines (29 loc) · 1.6 KB
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
#!/usr/bin/env bash
# ----------------------------------------------------------------------------
# bashrc is executed for interactive non-login shells,
# while bash_profile is executed for login shells
# ----------------------------------------------------------------------------
# Source shared shell config
source "$HOME/.shellrc"
# ----------------------------------------------------------------------------
# History (bash-specific)
# ----------------------------------------------------------------------------
# For HISTCONTROL:
# ignorespace flag tells bash to ignore commands that start with spaces
# ignoredups flag tells bash to ignore duplicate successive entries
# ignoreboth flag is equivalent to ignorespace:ignoredups
export HISTCONTROL=ignoreboth
# HISTFILESIZE controls how many lines are saved to disk (bash-specific)
# HISTSIZE (shared) controls in-memory history size
export HISTFILESIZE=10000
# ----------------------------------------------------------------------------
# Prompt (bash-specific)
# ----------------------------------------------------------------------------
# _PROMPT_ID, _PROMPT_INFO, and _PROMPT_RESET set in .shellrc; \[...\] marks non-printing sequences for bash
PS1="\[${_PROMPT_ID}\]\u@\h\[${_PROMPT_RESET}\]:\[${_PROMPT_INFO}\]\w\[${_PROMPT_RESET}\]\$ "
# ----------------------------------------------------------------------------
# nvm bash completion (bash-specific) (OPTIONAL)
# ----------------------------------------------------------------------------
if [ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ]; then
\. "/usr/local/opt/nvm/etc/bash_completion.d/nvm"
fi