-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvscode.sh
More file actions
62 lines (52 loc) · 1.53 KB
/
Copy pathvscode.sh
File metadata and controls
62 lines (52 loc) · 1.53 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
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
# File mode creation mask
if [ "$(id -u)" != "0" ]; then
umask 0077
fi
# PATH
export PATH="$PATH:$HOME"/.local/bin:/opt/bin
# Interactive shells
if [ "$PS1" ]; then
# Simplify prompt
export PS1='$ '
# Aliases
alias cp="cp -i"
alias gdb="gdb -q"
alias ls="ls --color=auto -F"
alias ll="ls -F -l"
alias mv="mv -i"
alias rm="rm -i"
# Environment variables
export CC="clang"
export CFLAGS="-fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow"
export EDITOR=nano
export FLASK_APP=application.py
export FLASK_ENV=development
export LANG=C
export LANGUAGE=C.UTF-8
export LC_ALL=C.UTF-8
export LDLIBS="-lcrypt -lcs50 -lm"
export VALGRIND_OPTS="--memcheck:leak-check=full --memcheck:show-leak-kinds=all --memcheck:track-origins=yes"
# History
# https://www.shellhacks.com/tune-command-line-history-bash/
shopt -s histappend # Append Bash Commands to History File
export PROMPT_COMMAND='history -a' # Store Bash History Immediately
shopt -s cmdhist # Use one command per line
# make
make () {
local args=""
local invalid_args=0
for arg; do
case "$arg" in
(*.c) arg=${arg%.c}; invalid_args=1;;
esac
args="$args $arg"
done
if [ $invalid_args -eq 1 ]; then
echo "Did you mean 'make$args'?"
return 1
else
command make -B $*
fi
}
fi
# cmd