⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 histexp.tests

📁 android-w.song.android.widget
💻 TESTS
字号:
LC_ALL=CLANG=Ctrap 'rm /tmp/newhistory' 0file=baxhistchars='!^#'	# make sure history comment char is set correctlyunset HISTFILESIZEhistory -cHISTFILE=history.listHISTCONTROL=ignorebothHISTIGNORE='&:#*:history*:fc*'# we will end up exercising the history stifling code as a resultHISTSIZE=32shopt -s cmdhistset -o historyhistory -p '!!'# this should result in a failed history expansion errorhistory -p '!!:z'historyHISTFILE=/tmp/newhistoryhistory -ahistory -whistory -s "echo line 2 for history"historyhistory -p '!e'history -p '!!'set -H!!!ehistoryecho a b c d e!?ch?!-2^2^8!2# we're selecting /bin/sh -c ...; we want `sh'echo !-1:0:t# we're selecting /bin/sh -c ...; we want `/bin'echo !-2:0:h# we're selecting `echo a b c d e'; we want `e'echo !?d?:5echo a b c d eecho !-1:2-$echo !-2:2-4echo !-2:3*echo !!:*echo !?a?:2-echo file.cecho !!:$:recho !-2:$:eecho !-3:$:r:qecho $file.cecho !!:$:recho !-2:^:eecho !-3:$:r:qecho a b c d eecho !!:1-$:xecho !-2:1-$:qecho foo.c foo.o foo.html foo.h!!:s/foo/bar/!-2:gs/foo/bar/!!:gs/bar/x&/!-2:g&# make sure we can use any delimiter in the substitution, not just `/'!!:gs+bar+whix+!!:p# wowecho !?.o?:%:r:q!!:0 !?.h?:%:q!!:-$!:-$history# make sure single quotes inhibit history expansionecho '!!'# make sure backslashes can quote the history expansion characterecho \!\!# but other expansions on the line should still be processedecho '!!' !!:*history -cunset HISTFILE# make sure that the special bash cases are not history expandedcase p in[!A-Z])	echo ok 1;;esacvar1='ok 2'var2=var1echo ${!var2}# Bash-2.01[.1] fails this test -- it attempts history expansion after the# history_comment_charecho ok 3 # !1200

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -