tab-completion.tin 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #nop vim: set filetype=tt:;
  2. /*
  3. 本文件属于 PaoTin++ 的一部分。
  4. PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 享有并保留一切法律权利
  5. 你可以在遵照 GPLv3 协议的基础之上使用、修改及重新分发本程序。
  6. */
  7. #event {READ FILE} {
  8. refresh-tab-completion;
  9. };
  10. #alias {refresh-tab-completion} {
  11. #info {ALIASES} save;
  12. #local idx {};
  13. #foreach {*info[ALIASES][]} {idx} {
  14. #local name {$info[ALIASES][$idx][arg1]};
  15. #nop 只有名字规整的 alias 才给加自动补全。;
  16. #if { "$name" == "%*{[^a-zA-Z0-9.-]}%*" } {
  17. #continue;
  18. };
  19. #nop 名字是大骆驼风格命名的,可以加自动补全。;
  20. #if { "$name" == "{[A-Z][a-zA-Z0-9]*}" } {
  21. #tab {$name};
  22. #continue;
  23. };
  24. #nop 如果名字由小数点分成多个部分,那么只有最后一部分是大写字母开头的,才加自动补全。;
  25. #if { "$name" == "%*.{[A-Z][A-Za-z0-9]*}" } {
  26. #tab {$name};
  27. #continue;
  28. };
  29. };
  30. };
  31. #tab #action;
  32. #tab #alias;
  33. #tab #all;
  34. #tab #banner;
  35. #tab #bell;
  36. #tab #break;
  37. #tab #buffer;
  38. #tab #button;
  39. #tab #case;
  40. #tab #cat;
  41. #tab #chat;
  42. #tab #class;
  43. #tab #commands;
  44. #tab #config;
  45. #tab #continue;
  46. #tab #cr;
  47. #tab #cursor;
  48. #tab #daemon;
  49. #tab #debug;
  50. #tab #default;
  51. #tab #delay;
  52. #tab #dictionary;
  53. #tab #draw;
  54. #tab #echo;
  55. #tab #edit;
  56. #tab #else;
  57. #tab #elseif;
  58. #tab #end;
  59. #tab #event;
  60. #tab #foreach;
  61. #tab #format;
  62. #tab #function;
  63. #tab #gag;
  64. #tab #grep;
  65. #tab #help;
  66. #tab #highlight;
  67. #tab #history;
  68. #tab #if;
  69. #tab #ignore;
  70. #tab #info;
  71. #tab #kill;
  72. #tab #killall;
  73. #tab #line;
  74. #tab #list;
  75. #tab #local;
  76. #tab #log;
  77. #tab #loop;
  78. #tab #macro;
  79. #tab #map;
  80. #tab #match;
  81. #tab #math;
  82. #tab #message;
  83. #tab #nop;
  84. #tab #parse;
  85. #tab #path;
  86. #tab #pathdir;
  87. #tab #port;
  88. #tab #prompt;
  89. #tab #read;
  90. #tab #regexp;
  91. #tab #replace;
  92. #tab #return;
  93. #tab #run;
  94. #tab #scan;
  95. #tab #screen;
  96. #tab #script;
  97. #tab #send;
  98. #tab #session;
  99. #tab #showme;
  100. #tab #snoop;
  101. #tab #split;
  102. #tab #ssl;
  103. #tab #substitute;
  104. #tab #switch;
  105. #tab #system;
  106. #tab #tab;
  107. #tab #test;
  108. #tab #textin;
  109. #tab #ticker;
  110. #tab #unaction;
  111. #tab #unalias;
  112. #tab #unbutton;
  113. #tab #undelay;
  114. #tab #unevent;
  115. #tab #unfunction;
  116. #tab #ungag;
  117. #tab #unhighlight;
  118. #tab #unlocal;
  119. #tab #unmacro;
  120. #tab #unpathdir;
  121. #tab #unprompt;
  122. #tab #unsplit;
  123. #tab #unsubstitute;
  124. #tab #untab;
  125. #tab #unticker;
  126. #tab #unvariable;
  127. #tab #variable;
  128. #tab #while;
  129. #tab #write;
  130. #tab #zap;