Debian Codegraph @

samples/textbox

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # $Id: textbox,v 1.14 2020/11/26 00:05:11 tom Exp $
3
4 . ./setup-varsscip-shell source . . `./setup-vars`.
5
6 . ./setup-tempfilescip-shell source . . `./setup-tempfile`.
7
8 catscip-shell system . . cat. << EOF > $tempfile
9 Hi, this is a text dialog box. It can be used to display text from a file.
10 The file should not contain any 'tab' characters, so you should 'expand'
11 the file first if it contains 'tab' characters.
12
13 It's like a simple text file viewer, with these keys implemented:
14
15 PGDN/SPACE - Move down one page
16 PGUP/'b' - Move up one page
17 ENTER/DOWN/'j' - Move down one line
18 UP/'k' - Move up one line
19 LEFT/'h' - Scroll left
20 RIGHT/'l' - Scroll right
21 '0' - Move to beginning of line
22 HOME/'g' - Move to beginning of file
23 END/'G' - Move to end of file
24 '/' - Forward search
25 '?' - Backward search
26 'n' - Repeat last search (forward)
27 'N' - Repeat last search (backward)
28
29
30 The following is a sample text file:
31
32
33 EOF
34
35 TEXT=/usr/share/common-licenses/GPLscip-shell filesystem . . `/usr/share/common-licenses/GPL`.
36 testscip-shell system . . test. -f $TEXT || TEXT=../COPYING
37
38 expandscip-shell system . . expand. < $TEXT >> $tempfile
39
40 $DIALOG --clear --title "TEXT BOX" "$@" --textbox "$tempfile" 22 77
41
42 returncode=$?
43
44 . ./report-buttonscip-shell source . . `./report-button`.