summaryrefslogtreecommitdiffstats
path: root/etc/newsyntax
blob: 6b5bb03931fa2fcbfa2403e322724f03c9334f11 (plain)
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
#!/bin/sh
#
# newsyntax -- update a screenrc file from 3.2 to 3.3 syntax
#
# please check all comments after running this script and watch out 
# for funny passages.
#
if [ $# != 1 ]; then
  echo "usage $0 screenrcfile"
  exit 1;
fi

#Ultrix 4.2 /bin/sh does not handle "read a < $1" 
#Dean Gaudet <dgaudet@watdragon.uwaterloo.ca>
exec < $1
read a

if [ ."$a" = '.#3.3' ]; then
  echo "$1 already updated"
  exit 0
fi

cp $1 $1.old
echo "#3.3" > $1
echo "# Do not remove the above line. This screen rc file was updated" >> $1
echo "# by the newsyntax script." >> $1
sed < $1.old >> $1 \
-e 's/\([	 #]\)flow/\1defflow/g' \
-e 's/^flow/defflow/g' \
-e 's/\([	 #]\)set[ 	]*defflow/\1flow/g' \
-e 's/^set[ 	]*defflow/flow/g' \
-e 's/\([	 #]\)mode/\1defmode/g' \
-e 's/^mode/defmode/g' \
-e 's/\([	 #]\)set[ 	]*defmode/\1defmode/g' \
-e 's/^set[ 	]*defmode/defmode/g' \
-e 's/\([	 #]\)monitor/\1defmonitor/g' \
-e 's/^monitor/defmonitor/g' \
-e 's/\([	 #]\)set[	 ]*defmonitor/\1monitor/g' \
-e 's/^set[	 ]*defmonitor/monitor/g' \
-e 's/\([	 #]\)login/\1deflogin/g' \
-e 's/^login/deflogin/g' \
-e 's/\([	 #]\)set[	 ]*deflogin/\1login/g' \
-e 's/^set[	 ]*deflogin/login/g' \
-e 's/\([	 #]\)wrap/\1defwrap/g' \
-e 's/^wrap/defwrap/g' \
-e 's/\([	 #]\)set[	 ]*defwrap/\1wrap/g' \
-e 's/^set[	 ]*defwrap/wrap/g' \
-e 's/\([	 #]\)scrollback/\1defscrollback/g' \
-e 's/^scrollback/defscrollback/g' \
-e 's/\([	 #]\)set[	 ]*defscrollback/\1scrollback/g' \
-e 's/^set[	 ]*defscrollback/scrollback/g' \
-e 's/\([	 #]\)refresh/\1allPARtial/g' \
-e 's/^refresh/allPARtial/g' \
-e 's/\([	 #]\)redraw/\1allPARtial/g' \
-e 's/^redraw/allPARtial/g' \
-e 's/\([	 #]\)set[	 ]*allPARtial/\1PARtial/g' \
-e 's/^set[	 ]*allPARtial/PARtial/g' \
-e 's/\([	 #]\)visualbell/\1vbell/g' \
-e 's/^visualbell/vbell/g' \
-e 's/PARtial\([ 	]*\)on/partial\1off/g' \
-e 's/PARtial\([ 	]*\)off/partial\1on/g' \
-e 's/allPARtial/refresh/g' \
-e 's/^set[ 	]//g'