-
Notifications
You must be signed in to change notification settings - Fork 0
/
alias.sh
executable file
·63 lines (57 loc) · 1.48 KB
/
alias.sh
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
#!/bin/sh -x
# .alias.sh
################################################################################
# Aliases set during .shrc.
#
# This file defines all the aliases for my Bourne Shell type environments. Note
# that "alias" isn't a thing in Bourne Shell, so I've created functions to do
# the job. There will be fewer of these than for other shell types, because
# it's a little more costly to update.
################################################################################
# Matt Bisson
# Place chars after certain file types
if [ `uname -s` = 'Linux' ] ; then
ls() {
env ls -Fv $*
}
else
ls() {
env ls -F $*
}
fi
# This is where emacs lives if compiled natively on MacOS.
if [ -x "${CARBON_EMACS_DIR}/Emacs" ] ; then
emacs() {
Emacs $*
}
fi
# Make shorter names for Emacs client/server commands.
emacss() {
emacs -f server-start $*
}
emacsc() {
emacsclient $*
}
if [ -x '/usr/local/bin/less' ] || [ -x '/usr/bin/less' ] ; then
more() { # Less IS more...
less $*
}
fi
# TTY Setting aliases
restty() {
stty ${STTY_PARAM}
}
unstty() {
stty `echo $STTY_PARAM | sed "s/\^./^@/g"`
}
# Simple functions
keb() { # "Kill Emacs Backup Files"
rm -f "*~"
rm -f "#*#"
}
realias() { # Reread this file
. "${HOME}/.alias.sh"
}
rexrdb() { # Reload the X defaults
xrdb -m "${HOME}/.Xdefaults"
}