📄 ksh.1
字号:
.TP 10.BI ^YRestore last item removed from line. (Yank item back to the line.).PP.TP 10.BI ^LLine feed and print current line..PP.TP 10.BI ^@(Null character) Set mark..PP.TP 10.BI M- space(Meta space) Set mark..PP.TP 10.BI ^J (New\ line) Execute the current line..PP.TP 10.BI ^M (Return) Execute the current line..PP.TP 10.I eofEnd-of-file character,normally.BR ^D ,is processed as an End-of-file onlyif the current line is null..PP.TP 10.BI ^PFetch previous command.Each time.B ^Pis enteredthe previous command back in time is accessed.Moves back one line when not on the first line of a multi-line command..PP.TP 10.BI M-<Fetch the least recent (oldest) history line..PP.TP 10.BI M->Fetch the most recent (youngest) history line..PP.TP 10.BI ^NFetch next command line.Each time.B ^Nis enteredthe next command line forward in time is accessed..PP.TP 10.BI ^R stringReverse search history for a previous command line containing.IR string .If a parameter of zero is given, the search is forward..I Stringis terminated by a "RETURN" or "NEW\ LINE".If string is preceded by a.BR ^ ,the matched line must begin with.IR string .If.I stringis omitted,then the next command line containing the most recent.I stringis accessed.In this case a parameter of zeroreverses the direction of the search..PP.TP 10.B ^OOperate \- Execute the current line and fetchthe next line relative to current line from thehistory file..PP.TP 10.BI M- digits(Escape) Define numeric parameter, the digitsare taken as a parameter to the next command.The commands that accept a parameter are.BR ^F ,.BR ^B ,.IR erase ,.BR ^C ,.BR ^D ,.BR ^K ,.BR ^R ,.BR ^P ,.BR ^N ,.BR ^] ,.BR M-. ,.BR M-^] ,.BR M-_ ,.BR M-b ,.BR M-c ,.BR M-d ,.BR M-f ,.B M-h.B M-land.BR M-^H ..PP.TP 10.BI M- letterSoft-key \- Your alias list is searched for analias by the name.BI _ letterand if an alias of this name is defined, itsvalue will be inserted on the input queue.The.I lettermust not be one of the above meta-functions..BI M-] letterSoft-key \- Your alias list is searched for analias by the name.BI __ letterand if an alias of this name is defined, itsvalue will be inserted on the input queue.The can be used to program functions keys on many terminals..PP.TP 10.B M-.The last word of the previous command is insertedon the line.If preceded by a numeric parameter, the valueof this parameter determines which word to insert rather thanthe last word..PP.TP 10.B M-_Same as.BR M-. ..PP.TP 10.B M-*Attempt file name generation on the current word.An asterisk is appended if the word doesn't match any fileor contain any specialpattern characters..PP.TP 10.B M-ESCFile name completion.Replaces the current word with the longest common prefix of allfilenames matching the current word with an asterisk appended.If the match is unique, a.B /is appended if the file is a directory and a space isappended if the file is not a directory..PP.TP 10.B M-=List files matching current word patternif an asterisk were appended..PP.TP 10.BI ^UMultiply parameter of next command by 4..PP.TP 10.BI \eEscape next character.Editing characters, the user's erase, kill andinterrupt (normally.BR ^? )charactersmay be enteredin a command line or in a search string if preceded by a.BR \e .The.B \eremoves the next character'sediting features (if any)..PP.TP 10.BI ^VDisplay version of the shell..PP.TP 10.BI M-\#Insert a.B \#at the beginning of the line and execute it.This causes a comment to be inserted in the history file..PD.SS Vi Editing ModeThere are two typing modes.Initially, when you enter a command you are in the.I inputmode.To edit, the user enters.I controlmode by typing ESC (.B 033) andmoves the cursor to the point needing correction andthen inserts or deletes characters or words as needed.Most control commands accept an optional repeat.I countprior to the command..PPWhen in vi mode on most systems,canonical processing is initially enabled and thecommand will be echoed again if the speed is 1200 baud or greater and itcontains any control characters or less than one second has elapsedsince the prompt was printed.The ESC character terminates canonical processing for the remainder of the commandand the user can then modify the command line.This scheme has the advantages of canonical processing with the type-aheadechoing of raw mode..PPIf the option.B virawis also set, the terminal will always have canonical processingdisabled.This mode is implicit for systems that do not support twoalternate end of line delimiters,and may be helpful for certain terminals..SS Input Edit Commands.PP.RSBy default the editor is in input mode..PD 0.TP 10.I erase(User defined erase character as definedby the stty command, usually.B ^Hor.BR # .)Delete previous character..TP 10.BI ^WDelete the previous blank separated word..TP 10.BI ^DTerminate the shell..TP 10.BI ^VEscape next character.Editing characters, the user's erase or killcharacters may be enteredin a command line or in a search string if preceded by a.BR ^V .The.B ^Vremoves the next character'sediting features (if any)..TP 10.BI \eEscape the next.I eraseor.I killcharacter..PP.RE.SS Motion Edit Commands.RSThese commands will move the cursor..TP 10[\fIcount\fP]\fBl\fPCursor forward (right) one character..TP 10[\fIcount\fP]\fBw\fPCursor forward one alpha-numeric word..TP 10[\fIcount\fP]\fBW\fPCursor to the beginning of the next word that follows a blank..TP 10[\fIcount\fP]\fBe\fPCursor to end of word..TP 10[\fIcount\fP]\fBE\fPCursor to end of the current blank delimited word..TP 10[\fIcount\fP]\fBh\fPCursor backward (left) one character..TP 10[\fIcount\fP]\fBb\fPCursor backward one word..TP 10[\fIcount\fP]\fBB\fPCursor to preceding blank separated word..TP 10[\fIcount\fP]\fB\(bv\fPCursor to column.IR count ..TP 10[\fIcount\fP]\fBf\fP\fIc\fPFind the next character \fIc\fP in the current line..TP 10[\fIcount\fP]\fBF\fP\fIc\fPFind the previous character \fIc\fP in the current line..TP 10[\fIcount\fP]\fBt\fP\fIc\fPEquivalent to.B ffollowed by.BR h ..TP 10[\fIcount\fP]\fBT\fP\fIc\fPEquivalent to.B Ffollowed by.BR l ..TP 10[\fIcount\fP]\fB;\fPRepeats.I counttimes,the last single character find command,.BR f ,.BR F ,.BR t ,or.BR T ..TP 10[\fIcount\fP]\fB,\fPReverses the last single character find command.I counttimes..TP 10.B 0Cursor to start of line..TP 10.B ^Cursor to first non-blank character in line..TP 10.B $Cursor to end of line..RE.SS Search Edit Commands.RSThese commands access your command history..TP 10[\fIcount\fP]\fBk\fPFetch previous command.Each time.B kis enteredthe previous command back in time is accessed..TP 10[\fIcount\fP]\fB\-\fPEquivalent to.BR k ..TP 10[\fIcount\fP]\fBj\fPFetch next command.Each time.B jis enteredthe next command forward in time is accessed..TP 10[\fIcount\fP]\fB+\fPEquivalent to.BR j ..TP 10[\fIcount\fP]\fBG\fPThe command number.I countis fetched.The default is the least recent history command..TP 10.BI / stringSearch backward through history for a previous command containing.IR string ..I Stringis terminated by a "RETURN" or "NEW\ LINE".If string is preceded by a.BR ^ ,the matched line must begin with.IR string .If \fIstring\fP is null the previous string will be used..TP 10.BI ? stringSame as.B /except that search will be in the forward direction..TP 10.B nSearch for next match of the last pattern to.B /or.B ?commands..TP 10.B NSearch for next match of the last pattern to.B /or.BR ? ,but in reverse direction.Search history for the \fIstring\fP entered by the previous \fB/\fP command..RE.SS Text Modification Edit Commands.RSThese commands will modify the line..TP 10.B aEnter input mode and enter text after the current character..TP 10.B AAppend text to the end of the line.Equivalent to.BR $a ..TP 10[\fIcount\fP]\fBc\fP\fImotion\fP.TP 10\fBc\fP[\fIcount\fP]\fImotion\fPDelete current character through the character that.I motionwould move the cursor to and enter input mode.If \fImotion\fP is.BR c ,the entire line will be deleted andinput mode entered..TP 10.B CDelete the current character through the end of line and enter input mode.Equivalent to.BR c$ ..TP 10.B SEquivalent to.BR cc ..TP 10.B DDelete the current character through the end of line.Equivalent to.BR d$ ..TP 10[\fIcount\fP]\fBd\fP\fImotion\fP.TP 10\fBd\fP[\fIcount\fP]\fImotion\fPDelete current character through the character that.I motionwould move to.If \fImotion\fP is.B d ,the entire line will be deleted..TP 10.B iEnter input mode and insert text before the current character..TP 10.B IInsert text before the beginning of the line.Equivalent to.BR 0i ..TP 10[\fIcount\fP]\fBP\fPPlace the previous text modification before the cursor..TP 10[\fIcount\fP]\fBp\fPPlace the previous text modification after the cursor..TP 10.B REnter input mode andreplace characters on the screen with characters you type overlay fashion..TP 10[\fIcount\fP]\fBr\fP\fIc\fPReplace the.I countcharacter(s) starting at the current cursor position with.IR c ,and advance the cursor..TP 10[\fIcount\fP]\fBx\fPDelete current character..TP 10[\fIcount\fP]\fBX\fPDelete preceding character..TP 10[\fIcount\fP]\fB.\fPRepeat the previous text modification command..TP 10[\fIcount\fP]\fB\(ap\fPInvert the case of the.I countcharacter(s) starting at the current cursor position and advance the cursor..TP 10[\fIcount\fP]\fB_\fPCauses the.I countword of the previous command to be appended andinput mode entered.The last word is usedif.I countis omitted..TP 10.B *Causes an.B *to be appended to the current word and file name generation attempted.If no match is found,it rings the bell.Otherwise, the word is replacedby the matching pattern and input mode is entered..TP 10.B \e Filename completion.Replaces the current word with the longest common prefix of allfilenames matching the current word with an asterisk appended.If the match is unique, a.B /is appended if the file is a directory and a space isappended if the file is not a directory..RE.SS Other Edit Commands.RSMiscellaneous commands..TP 10[\fIcount\fP]\fBy\fP\fImotion\fP.TP 10\fBy\fP[\fIcount\fP]\fImotion\fPYank current character through character that.I motionwould move the cursor to and puts them into the delete buffer.The text and cursor are unchanged..TP 10.B YYanks from current position to end of line.Equivalent to.BR y$ ..TP 10.B uUndo the last text modifying command..TP 10.B UUndo all the text modifying commands performed on the line..TP 10[\fIcount\fP]\fBv\fPReturns the command.BI "fc \-e ${\s-1VISUAL\s+1:\-${\s-1EDITOR\s+1:\-vi}}" " count"in the input buffer.If.I countis omitted, then the current line is used..TP 10.BI ^LLine feed and print current line.Has effect only in control mode..TP 10.BI ^J (New\ line) Execute the current line, regardless of mode..TP 10.BI ^M (Return) Execute the current line, regardless of mode..TP 10.B \#Sends the line afterinserting a.B \#in front of the line.Useful for causing the current line to beinserted in the history without being executed..TP 10.B = List the file names that match the current word if an asterisk wereappended it..TP 10.BI @ letterYour alias list is searched for analias by the name.BI _ letterand if an alias of this name is defined, itsvalue will be inserted on the input queue for processing..RE.PD.SS Special Commands.The following simple-commands are executed in the shell process.Input/Output redirection is permitted.Unless otherwise indicated, the output is written on file descriptor 1and the exit status, when there is no syntax error, is zero.Commands that are preceded by one or two \(dgare treated specially in the following ways:.PD 0.TP1.Parameter assignment lists preceding the commandremain in effect when the command completes..TP2.I/O redirections are processed after parameter assignments..TP3.Errorscause a scriptthat contains them to abort..TP4.Words,following a command preceded by \(dg\(dgthat are in the format of a parameter assignment,are expanded with the same rules as a parameter assignment.This means thattilde substitution is performed after the.B =sig
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -