-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashal
More file actions
134 lines (106 loc) · 3.33 KB
/
.bashal
File metadata and controls
134 lines (106 loc) · 3.33 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/bin/sh
#alias ssh1='ssh s3543536@coreteaching01.csit.rmit.edu.au'
#alias ssh2='ssh s3543536@coreteaching02.csit.rmit.edu.au'
#alias ssh3='ssh s3543536@coreteaching03.csit.rmit.edu.au'
#alias sshfs1='sudo sshfs -o allow_other s3543536@coreteaching02.csit.rmit.edu.au: /mnt/core1'
#alias sshfs2='sudo sshfs -o allow_other s3543536@coreteaching02.csit.rmit.edu.au: /mnt/core2'
#alias sshfs3='sudo sshfs -o allow_other s3543536@coreteaching02.csit.rmit.edu.au: /mnt/core3'
#alias ct1='s3543536@coreteaching01.csit.rmit.edu.au'
#alias ct2='s3543536@coreteaching02.csit.rmit.edu.au'
#alias ct3='s3543536@coreteaching03.csit.rmit.edu.au'
alias lss='ls'
alias tree='tree -C'
alias gitgud='git log --graph $(git branch | sed "s/. //;/HEAD detached /d")'
cat() {
if [ -d "$1" ]; then
ls "$@"
else
command cat "$@"
fi
}
which() {
LOC=$(command which "$@")
if [ "$LOC" != "" ]; then
command ls -ahl "$LOC"
fi
}
alias ip='/usr/bin/ip -color'
alias dmesg='/usr/bin/dmesg --color=always'
watch() {
command watch -c "$@"
}
#ip() {
#command ip -c "$@"
#}
#can't use bash function, because it throws away quotes in the command
alias grep='command grep --color=auto'
alias pacman='pacman --color=always'
#alias cd=_cd
#
#_cd() {
# command cd "$@"
# pwd > ~/.prev_dir
#}
# can't make a bash function of ls, so we alias it
alias ls=_ls
#always give me colour with ls
_ls() {
#calling command supresses the function lookup so we don't get an infinite loop
command ls -hp --color=auto -G "$@"
}
#xclip() {
# command xclip -selection clip-board $@
#}
#give me more info about the file, like if its a symlink
which() {
LOC=$( command which "$@" )
if [ -f "$LOC" ]; then
#don't want to call "ls" with command.
#we want it to use the above "ls" function
ls -al "$LOC"
fi
}
less() {
# -x4: tab size 4 spaces
# -R: good colours
command less -x4 -R "$@"
}
# this breaks quoted expressions
#git() {
# echo \"$@\"
# command git $(sed 's/^graph$/ log --graph --all --decorate /' - <<< "$@")
#}
if [ -n "$KITTY_INSTALLATION_DIR" ]; then
# vim terminal doesn't play nice with kitty ssh kitten
if [ "$TERM" = 'xterm-kitty' ] && [ -z "$VIM_TERMINAL" ]
then
alias ssh='kitty +kitten ssh'
fi
alias icat='kitty +kitten icat'
fi
alias istnall='install'
alias isntall='install'
alias ctags='ctags --sort=fold'
alias please='sudo $(history -p !!)'
alias cunt='sudo $(history -p !!)'
alias cls='clear;ls'
alias xclip='xclip -selection clip-board'
alias mkae='make -rR -j$(nproc)'
alias maek='make -rR -j$(nproc)'
alias amke='make -rR -j$(nproc)'
alias make='make -rR -j$(nproc)'
alias sduo='sudo'
alias sshg='ssh -i ~/.ssh/mykey angelenglish@35.201.16.82'
alias mountPC='echo "sudo mount.cifs //192.168.1.2/c /mnt/myPc -rw -o username=Angel"; sudo mount.cifs //192.168.1.2/c /mnt/myPc -rw -o username=Angel'
alias mountPD='echo "sudo mount.cifs //192.168.1.2/d /mnt/myPd -rw -o username=Angel"; sudo mount.cifs //192.168.1.2/d /mnt/myPd -rw -o username=Angel'
alias mountMOV='echo "sudo mount.cifs //192.168.1.2/movies /mnt/movies -rw -o username=Angel"; sudo mount.cifs //192.168.1.2/movies /mnt/myPd -rw -o username=Angel'
alias apt-search='apt search'
alias apricot='apropos'
alias mank='man -k'
alias socns='sconsWrapper.sh'
alias sofns='sconsWrapper.sh -f'
alias bbuild='bmdbuild'
alias tiga='tig --all'
tigl() {
tig $( git for-each-ref refs/heads --format='%(refname:short)' ) $@
}