history.tests
来自「android-w.song.android.widget」· TESTS 代码 · 共 114 行
TESTS
114 行
trap 'rm /tmp/newhistory' 0# bad optionshistory -x# cannot use -r and -w at the same timehistory -r -w /dev/null# bad optionfc -vunset HISTFILESIZE# all of these should result in an empty history listhistory -chistory -r /dev/nullhistory -n /dev/nullhistory -cHISTFILE=history.listHISTCONTROL=ignorebothHISTIGNORE='&:history*:fc*'HISTSIZE=32shopt -s cmdhistset -o historyhistoryfc -lfc -nlfc -lrfc -nlrhistory -s "echo line for history"historyhistory -p '!!'fc -nlHISTFILE=/tmp/newhistoryhistory -aecho displaying \$HISTFILE after history -acat $HISTFILEhistoryhistory -wcat $HISTFILEhistory -s "echo line 2 for history"historyhistory -p '!e'history -p '!!'# this should show up as one history entryfor x in one two threedo :donehistory# just a basic test. a full test suite for history expansion should be# createdset -H!!!eunset HISTSIZEunset HISTFILEfc -l 4fc -l 4 8fc -l one=two three=four 502history 4shopt -so historyshopt -s expand_aliasesalias r="fc -s"echo aa ab acr a=xr x=4 b=8# this had better fail with `no command found'r ccunalias -aalias# these two blocks had better both result in the same outputecho aaecho bbecho ccfc -e catecho aaecho bbecho ccfc -e cat -1set +o historyshopt -q -o historyecho $?${THIS_SH} ./history1.sub${THIS_SH} ./history2.sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?