-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
88 lines (69 loc) · 2.57 KB
/
.bashrc
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env bash
#
# shellcheck disable=SC1091,SC2154
# From `/etc/skel/.bashrc`.
# If not running interactively, don't do anything.
case $- in
*i*) ;;
*) return ;;
esac
[[ -f "$XDG_DATA_HOME"/blesh/ble.sh ]] \
&& . "$XDG_DATA_HOME"/blesh/ble.sh --noattach
# Setting shell options
# If set, bash attempts to save all lines of a multiple-line command in the same
# history entry. This allows easy re-editing of multi-line commands. This
# option is enabled by default, but only has an effect if command history is
# enabled, as described above under HISTORY.
shopt -s cmdhist
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob
# If set, the history list is appended to the file named by the value of the
# HISTFILE variable when the shell exits, rather than overwriting the file.
shopt -s histappend
# Autocorrect typos in path names when using `cd`
shopt -s cdspell
# If set, and the cmdhist option is enabled, multi-line commands are saved to
# the history with embedded newlines rather than using semicolon separators
# where possible.
shopt -s lithist
# The last element of a pipeline may be run by the shell process.
shopt -s lastpipe
# Allows patterns which match no files (see Pathname Expansion above) to expand
# to a null string, rather than themselves.
shopt -s nullglob
# The pattern ** used in a pathname expansion context will match all files and
# zero or more directories and subdirectories. If the pattern is followed by
# a /, only directories and subdirectories match.
shopt -s globstar
# export SHELDON_CONFIG_DIR="$XDG_CONFIG_HOME"/sheldon/bash
# command -v sheldon >/dev/null && eval "$(sheldon source)"
. "$XDG_CONFIG_HOME"/shell/common.sh
# Remove timestamps from history file to let zsh history parse it.
unset HISTTIMEFORMAT
# Configure Ctrl-w to delete words like ZSH.
stty werase undef
bind '\C-w:backward-kill-word'
# Bind Alt-s
bind '"\es":"ssnz\n"'
# Add tab completion for many Bash commands
if ! shopt -oq posix; then
if [[ -f /usr/share/bash-completion/bash_completion ]]; then
. /usr/share/bash-completion/bash_completion
elif [[ -f /usr/local/share/bash-completion/bash_completion ]]; then
# Locally install completions. e.g., Git Bash on Windows.
. /usr/local/share/bash-completion/bash_completion
elif [[ -f /etc/bash_completion ]]; then
. /etc/bash_completion
fi
fi
# Completions
# git
# shellcheck disable=SC1091
[[ -f /usr/share/bash-completion/completions/git ]] \
&& . /usr/share/bash-completion/completions/git
# dot
__git_complete dot __git_main
if is_git_bash; then
start_ssh_agent
fi
[[ -n ${BLE_VERSION-} ]] && ble-attach