-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
78 lines (71 loc) · 1.75 KB
/
.bash_aliases
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
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
alias ll="ls -alF"
alias ressh="sudo service ssh --full-restart"
alias vm="ssh -p 2222 [email protected]"
function G++0 {
if [ "$#" = 1 ]
then
filename="${1%\.*}"
obj_ext=".o"
filename_o=${filename}${obj_ext}
output="test"
echo "g++ --std=c++11 -Wall -O0 -c $1"
g++ --std=c++11 -Wall -O0 -c $1
echo "g++ -o test $filename_o"
g++ -o ${output} $filename_o
elif [ "$#" = 2 ]
then
filename="${1%\.*}"
obj_ext=".o"
filename_o=${filename}${obj_ext}
echo "g++ --std=c++11 -Wall -O0 -c $1"
g++ --std=c++11 -Wall -O0 -c $1
echo "g++ -o $2 $filename_o"
g++ -o $2 $filename_o
else
echo "Usage: G++ code.cc <executable>"
echo "where \"code.cc\" is a simple C++ code,"
echo "\"executable\" being final output filename"
return 0
fi
}
function G++ {
if [ $# == 1 ]
then
filename="${1%.*}"
obj_ext=".o"
filename_o=$filename$obj_ext
echo "g++ --std=c++11 -Wall -c $1"
g++ --std=c++11 -Wall -c $1
echo "g++ -o test $filename_o"
g++ -o test $filename_o
elif [ $# == 2 ]
then
filename="${1%.*}"
obj_ext=".o"
filename_o=$filename$obj_ext
echo "g++ --std=c++11 -Wall -c $1"
g++ --std=c++11 -Wall -c $1
echo "g++ -o $2 $filename_o"
g++ -o $2 $filename_o
else
echo "Usage: G++ code.cc <executable>"
echo "where \"code.cc\" is a simple C++ code,"
echo "\"executable\" being final output filename"
return 0
fi
}
function dev-tmux {
tmux new-session -d -n work
tmux new-window -n files
tmux split-window -h
tmux selectp -t 0
tmux new-window -n testing
tmux split-window -h
tmux selectp -t 0
tmux new-window -n misc
tmux selectw -t 0
tmux -2 attach-session -d
}