📄 textbox
字号:
#!/bin/sh# $Id: textbox,v 1.6 2003/08/15 19:40:37 tom Exp $: ${DIALOG=dialog}tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$trap "rm -f $tempfile" 0 1 2 5 15cat << EOF > $tempfileHi, this is a text dialog box. It can be used to display text from a file.The file should not contain any 'tab' characters, so you should 'expand'the file first if it contains 'tab' characters.It's like a simple text file viewer, with these keys implemented:PGDN/SPACE - Move down one pagePGUP/'b' - Move up one pageENTER/DOWN/'j' - Move down one lineUP/'k' - Move up one lineLEFT/'h' - Scroll leftRIGHT/'l' - Scroll right'0' - Move to beginning of lineHOME/'g' - Move to beginning of fileEND/'G' - Move to end of file'/' - Forward search'?' - Backward search'n' - Repeat last search (forward)'N' - Repeat last search (backward)The following is a sample text file:EOFTEXT=/usr/share/common-licenses/GPLtest -f $TEXT || TEXT=../COPYINGcat $TEXT | expand >> $tempfile$DIALOG --clear --title "TEXT BOX" --textbox "$tempfile" 22 77case $? in 0) echo "OK";; 255) echo "ESC pressed.";;esac
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -