-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtd200
executable file
·67 lines (60 loc) · 1.68 KB
/
td200
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
# Source this -*- shell-script -*-
# Set terminal type to Tandy 200
export TERM=td200
# Try hackerb9's 8-bit Model-T locale.
export LANG=$(locale -a|grep -om1 T200)
# Fallback to ASCII, not Unicode chars.
export LANG=${LANG:-C}
# Reset the terminal (turns off labels)
reset
# Turn on software flow control (^S/^Q)
stty ixon ixoff
# Some apps ignore the size in TERMINFO
stty rows 16 cols 40
export LINES=16 COLUMNS=40
# Backspace key sends ^H not ^?
stty erase ^H
# Right arrow key sends ^\, so don't use that to abort and dump core.
stty quit undef
# Translate Carriage Return to Newline (for uploads > N_TTY_BUF_SIZE)
stty icrnl
# Don't logout when exiting terminal mode in TELCOM
stty clocal
# Nice short prompt
PS1='\$ '
# Workarounds
export GCC_COLORS=""
alias nano="nano -Opx"
alias w3m="w3m -color=0"
alias git="git -c color.ui=never"
export MANWIDTH=40
export MANPAGER=less
# man-db splats colors willy-nilly.
export GROFF_NO_SGR=1
# Allow Esc p, Esc q for reverse text.
# (Also prevents less from appending Esc [m to every line.)
export LESSANSIENDCHARS=pq
# No ANSI colors in Bash tab completion
bind 'set colored-completion-prefix off'
# Omit ^[?2004h before each prompt.
bind 'set enable-bracketed-paste off'
# BTW: ~/.inputrc is the better
# place to put these bind settings:
#
# $if term=td200
# set colored-completion-prefix off
# set enable-bracketed-paste off
# $endif
if [ $0 != bash -a $SHLVL -gt 1 ]; then
echo "Error, do not run this script."
echo "It must be sourced, like so:"
echo -ne "\n\t"
if type $(basename $0)>/dev/null 2>&1
then
echo ". $(basename $0)"
else
echo "source $0"
fi
echo
false # Return error, but without using 'exit' or 'return'
fi