亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 3256 | 回復: 6
打印 上一主題 下一主題

[其他] tcshrc中的complete是什么 [復制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2012-07-25 09:04 |只看該作者 |倒序瀏覽
自己home下有個.tcshrc的配置文件,其中的complete是什么意思
求大俠們賜教。。。
  1. complete cd         'p/1/d/'        #cd <dir>
  2. complete man        'n/*/c/'        #man <command>
  3. complete which      'n/*/c/'        #which <command>
  4. complete whereis    'n/*/c/'        #whereis <command>
  5. complete where      'n/*/c/'        #whereis <command>
  6. complete set        'p/1/s/'        #set <shell-valiable>
  7. complete unset      'p/1/s/'        #unset <shell-valiable>
  8. .......................................
復制代碼

論壇徽章:
5
2015年辭舊歲徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亞洲杯之朝鮮
日期:2015-03-13 22:47:33IT運維版塊每日發(fā)帖之星
日期:2016-01-09 06:20:00IT運維版塊每周發(fā)帖之星
日期:2016-03-07 16:27:44
2 [報告]
發(fā)表于 2012-07-25 09:46 |只看該作者
回復 1# guoweiqust


    內(nèi)置命令。

論壇徽章:
8
摩羯座
日期:2014-11-26 18:59:452015亞冠之浦和紅鉆
日期:2015-06-23 19:10:532015亞冠之西悉尼流浪者
日期:2015-08-21 08:40:5815-16賽季CBA聯(lián)賽之山東
日期:2016-01-31 18:25:0515-16賽季CBA聯(lián)賽之四川
日期:2016-02-16 16:08:30程序設(shè)計版塊每日發(fā)帖之星
日期:2016-06-29 06:20:002017金雞報曉
日期:2017-01-10 15:19:5615-16賽季CBA聯(lián)賽之佛山
日期:2017-02-27 20:41:19
3 [報告]
發(fā)表于 2012-07-25 10:19 |只看該作者
定義命令的補齊規(guī)則

論壇徽章:
15
2015年辭舊歲徽章
日期:2015-03-03 16:54:15雙魚座
日期:2015-01-15 17:29:44午馬
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉雞
日期:2014-04-02 12:24:51雙子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥豬
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大;照
日期:2013-04-17 11:48:45
4 [報告]
發(fā)表于 2012-07-26 08:20 |只看該作者
Completion and listing (+)

The shell is often able to complete words when given a unique abbreviation. Type part of a word (for example 'ls /usr/lost') and hit the tab key to run the complete-word editor command. The shell completes the filename '/usr/lost' to '/usr/lost+found/', replacing the incomplete word with the complete word in the input buffer. (Note the terminal '/'; completion adds a '/' to the end of completed directories and a space to the end of other completed words, to speed typing and provide a visual indicator of successful completion. The addsuffix shell variable can be unset to prevent this.) If no match is found (perhaps '/usr/lost+found' doesn't exist), the terminal bell rings. If the word is already complete (perhaps there is a '/usr/lost' on your system, or perhaps you were thinking too far ahead and typed the whole thing) a '/' or space is added to the end if it isn't already there.
Completion works anywhere in the line, not at just the end; completed text pushes the rest of the line to the right. Completion in the middle of a word often results in leftover characters to the right of the cursor that need to be deleted.

Commands and variables can be completed in much the same way. For example, typing 'em[tab]' would complete 'em' to 'emacs' if emacs were the only command on your system beginning with 'em'. Completion can find a command in any directory in path or if given a full pathname. Typing 'echo $ar[tab]' would complete '$ar' to '$argv' if no other variable began with 'ar'.

The shell parses the input buffer to determine whether the word you want to complete should be completed as a filename, command or variable. The first word in the buffer and the first word following ';', '|', '|&', '&&' or '||' is considered to be a command. A word beginning with '$' is considered to be a variable. Anything else is a filename. An empty line is 'completed' as a filename.

You can list the possible completions of a word at any time by typing '^D' to run the delete-char-or-list-or-eof editor command. The shell lists the possible completions using the ls-F builtin (q.v.) and reprints the prompt and unfinished command line, for example:

> ls /usr/l[^D]
lbin/ lib/ local/ lost+found/
> ls /usr/l
If the autolist shell variable is set, the shell lists the remaining choices (if any) whenever completion fails:
> set autolist
> nm /usr/lib/libt[tab]
libtermcap.a@ libtermlib.a@
> nm /usr/lib/libterm
If autolist is set to 'ambiguous', choices are listed only when completion fails and adds no new characters to the word being completed.
A filename to be completed can contain variables, your own or others' home directories abbreviated with '~' (see Filename substitution) and directory stack entries abbreviated with '=' (see Directory stack substitution). For example,

> ls ~k[^D]
kahn kas kellogg
> ls ~ke[tab]
> ls ~kellogg/
or
> set local = /usr/local
> ls $lo[tab]
> ls $local/[^D]
bin/ etc/ lib/ man/ src/
> ls $local/
Note that variables can also be expanded explicitly with the expand-variables editor command.
delete-char-or-list-or-eof lists at only the end of the line; in the middle of a line it deletes the character under the cursor and on an empty line it logs one out or, if ignoreeof is set, does nothing. 'M-^D', bound to the editor command list-choices, lists completion possibilities anywhere on a line, and list-choices (or any one of the related editor commands that do or don't delete, list and/or log out, listed under delete-char-or-list-or-eof) can be bound to '^D' with the bindkey builtin command if so desired.

The complete-word-fwd and complete-word-back editor commands (not bound to any keys by default) can be used to cycle up and down through the list of possible completions, replacing the current word with the next or previous word in the list.

The shell variable fignore can be set to a list of suffixes to be ignored by completion. Consider the following:

> ls
Makefile condiments.h~ main.o side.c
README main.c meal side.o
condiments.h main.c~
> set fignore = (.o \~)
> emacs ma[^D]
main.c main.c~ main.o
> emacs ma[tab]
> emacs main.c
'main.c~' and 'main.o' are ignored by completion (but not listing), because they end in suffixes in fignore. Note that a '\' was needed in front of '~' to prevent it from being expanded to home as described under Filename substitution. fignore is ignored if only one completion is possible.
If the complete shell variable is set to 'enhance', completion 1) ignores case and 2) considers periods, hyphens and underscores ('.', '-' and '_') to be word separators and hyphens and underscores to be equivalent. If you had the following files

comp.lang.c comp.lang.perl comp.std.c++
comp.lang.c++ comp.std.c
and typed 'mail -f c.l.c[tab]', it would be completed to 'mail -f comp.lang.c', and ^D would list 'comp.lang.c' and 'comp.lang.c++'. 'mail -f c..c++[^D]' would list 'comp.lang.c++' and 'comp.std.c++'. Typing 'rm a--file[^D]' in the following directory
A_silly_file a-hyphenated-file another_silly_file
would list all three files, because case is ignored and hyphens and underscores are equivalent. Periods, however, are not equivalent to hyphens or underscores.
Completion and listing are affected by several other shell variables: recexact can be set to complete on the shortest possible unique match, even if more typing might result in a longer match:

> ls
fodder foo food foonly
> set recexact
> rm fo[tab]
just beeps, because 'fo' could expand to 'fod' or 'foo', but if we type another 'o',
> rm foo[tab]
> rm foo
the completion completes on 'foo', even though 'food' and 'foonly' also match. autoexpand can be set to run the expand-history editor command before each completion attempt, autocorrect can be set to spelling-correct the word to be completed (see Spelling correction) before each completion attempt and correct can be set to complete commands automatically after one hits 'return'. matchbeep can be set to make completion beep or not beep in a variety of situations, and nobeep can be set to never beep at all. nostat can be set to a list of directories and/or patterns that match directories to prevent the completion mechanism from stat(2)ing those directories. listmax and listmaxrows can be set to limit the number of items and rows (respectively) that are listed without asking first. recognize_only_executables can be set to make the shell list only executables when listing commands, but it is quite slow.
Finally, the complete builtin command can be used to tell the shell how to complete words other than filenames, commands and variables. Completion and listing do not work on glob-patterns (see Filename substitution), but the list-glob and expand-glob editor commands perform equivalent functions for glob-patterns.

Spelling correction (+)

The shell can sometimes correct the spelling of filenames, commands and variable names as well as completing and listing them.
Individual words can be spelling-corrected with the spell-word editor command (usually bound to M-s and M-S) and the entire input buffer with spell-line (usually bound to M-$). The correct shell variable can be set to 'cmd' to correct the command name or 'all' to correct the entire line each time return is typed, and autocorrect can be set to correct the word to be completed before each completion attempt.

When spelling correction is invoked in any of these ways and the shell thinks that any part of the command line is misspelled, it prompts with the corrected line:

> set correct = cmd
> lz /usr/bin
CORRECT>ls /usr/bin (y|n|e|a)?
One can answer 'y' or space to execute the corrected line, 'e' to leave the uncorrected command in the input buffer, 'a' to abort the command as if '^C' had been hit, and anything else to execute the original line unchanged.
Spelling correction recognizes user-defined completions (see the complete builtin command). If an input word in a position for which a completion is defined resembles a word in the completion list, spelling correction registers a misspelling and suggests the latter word as a correction. However, if the input word does not match any of the possible completions for that position, spelling correction does not register a misspelling.

Like completion, spelling correction works anywhere in the line, pushing the rest of the line to the right and possibly leaving extra characters to the right of the cursor.

Beware: spelling correction is not guaranteed to work the way one intends, and is provided mostly as an experimental feature. Suggestions and improvements are welcome.

論壇徽章:
0
5 [報告]
發(fā)表于 2012-07-26 13:28 |只看該作者
回復 4# rdcwayx


   一堆英語看著就頭暈啊。。。

論壇徽章:
15
2015年辭舊歲徽章
日期:2015-03-03 16:54:15雙魚座
日期:2015-01-15 17:29:44午馬
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉雞
日期:2014-04-02 12:24:51雙子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥豬
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大;照
日期:2013-04-17 11:48:45
6 [報告]
發(fā)表于 2012-07-26 13:30 |只看該作者
本帖最后由 rdcwayx 于 2012-07-26 13:31 編輯

如果實在看不懂,用google translate, 可以大篇幅的翻譯,而且本身都不是很難的英語。

論壇徽章:
0
7 [報告]
發(fā)表于 2012-07-29 14:43 |只看該作者
回復 6# rdcwayx

好的,謝謝。。
   
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP