-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
32 lines (26 loc) · 978 Bytes
/
.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
#!/usr/bin/env bash
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# prepare environment for non-login sessions
for file in ~/.bashrc.d/{.*,*} ; do
[ -f "$file" ] && source "$file"
done;
os=$(uname -s)
[ "$os" == "Linux" ] && [ -f /etc/bash_completion ] && source /etc/bash_completion
[ "$os" == "Darwin" ] && [ -f $(brew --prefix)/etc/bash_completion ] && source $(brew --prefix)/etc/bash_completion
command_not_found_handle1() {
if cmd.exe /c "(where $1 || (help $1 |findstr /V Try)) >nul 2>nul && ($* || exit 0)"; then
return $?
else
if [ -x /usr/lib/command-not-found ]; then
/usr/lib/command-not-found -- "$1"
return $?
elif [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/share/command-not-found/command-not-found -- "$1"
return $?
else
printf "%s: command not found\n" "$1" >&2
return 127
fi
fi
}