history.info 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426
  1. This is history.info, produced by makeinfo version 6.8 from
  2. history.texi.
  3. This document describes the GNU History library (version 8.2, 19
  4. September 2022), a programming tool that provides a consistent user
  5. interface for recalling lines of previously typed input.
  6. Copyright (C) 1988-2022 Free Software Foundation, Inc.
  7. Permission is granted to copy, distribute and/or modify this
  8. document under the terms of the GNU Free Documentation License,
  9. Version 1.3 or any later version published by the Free Software
  10. Foundation; with no Invariant Sections, no Front-Cover Texts, and
  11. no Back-Cover Texts. A copy of the license is included in the
  12. section entitled "GNU Free Documentation License".
  13. INFO-DIR-SECTION Libraries
  14. START-INFO-DIR-ENTRY
  15. * History: (history). The GNU history library API.
  16. END-INFO-DIR-ENTRY
  17. 
  18. File: history.info, Node: Top, Next: Using History Interactively, Up: (dir)
  19. GNU History Library
  20. *******************
  21. This document describes the GNU History library, a programming tool that
  22. provides a consistent user interface for recalling lines of previously
  23. typed input.
  24. * Menu:
  25. * Using History Interactively:: GNU History User's Manual.
  26. * Programming with GNU History:: GNU History Programmer's Manual.
  27. * GNU Free Documentation License:: License for copying this manual.
  28. * Concept Index:: Index of concepts described in this manual.
  29. * Function and Variable Index:: Index of externally visible functions
  30. and variables.
  31. 
  32. File: history.info, Node: Using History Interactively, Next: Programming with GNU History, Prev: Top, Up: Top
  33. 1 Using History Interactively
  34. *****************************
  35. This chapter describes how to use the GNU History Library interactively,
  36. from a user's standpoint. It should be considered a user's guide. For
  37. information on using the GNU History Library in your own programs, *note
  38. Programming with GNU History::.
  39. * Menu:
  40. * History Interaction:: What it feels like using History as a user.
  41. 
  42. File: history.info, Node: History Interaction, Up: Using History Interactively
  43. 1.1 History Expansion
  44. =====================
  45. The History library provides a history expansion feature that is similar
  46. to the history expansion provided by 'csh'. This section describes the
  47. syntax used to manipulate the history information.
  48. History expansions introduce words from the history list into the
  49. input stream, making it easy to repeat commands, insert the arguments to
  50. a previous command into the current input line, or fix errors in
  51. previous commands quickly.
  52. History expansion takes place in two parts. The first is to
  53. determine which line from the history list should be used during
  54. substitution. The second is to select portions of that line for
  55. inclusion into the current one. The line selected from the history is
  56. called the "event", and the portions of that line that are acted upon
  57. are called "words". Various "modifiers" are available to manipulate the
  58. selected words. The line is broken into words in the same fashion that
  59. Bash does, so that several words surrounded by quotes are considered one
  60. word. History expansions are introduced by the appearance of the
  61. history expansion character, which is '!' by default.
  62. History expansion implements shell-like quoting conventions: a
  63. backslash can be used to remove the special handling for the next
  64. character; single quotes enclose verbatim sequences of characters, and
  65. can be used to inhibit history expansion; and characters enclosed within
  66. double quotes may be subject to history expansion, since backslash can
  67. escape the history expansion character, but single quotes may not, since
  68. they are not treated specially within double quotes.
  69. * Menu:
  70. * Event Designators:: How to specify which history line to use.
  71. * Word Designators:: Specifying which words are of interest.
  72. * Modifiers:: Modifying the results of substitution.
  73. 
  74. File: history.info, Node: Event Designators, Next: Word Designators, Up: History Interaction
  75. 1.1.1 Event Designators
  76. -----------------------
  77. An event designator is a reference to a command line entry in the
  78. history list. Unless the reference is absolute, events are relative to
  79. the current position in the history list.
  80. '!'
  81. Start a history substitution, except when followed by a space, tab,
  82. the end of the line, or '='.
  83. '!N'
  84. Refer to command line N.
  85. '!-N'
  86. Refer to the command N lines back.
  87. '!!'
  88. Refer to the previous command. This is a synonym for '!-1'.
  89. '!STRING'
  90. Refer to the most recent command preceding the current position in
  91. the history list starting with STRING.
  92. '!?STRING[?]'
  93. Refer to the most recent command preceding the current position in
  94. the history list containing STRING. The trailing '?' may be
  95. omitted if the STRING is followed immediately by a newline. If
  96. STRING is missing, the string from the most recent search is used;
  97. it is an error if there is no previous search string.
  98. '^STRING1^STRING2^'
  99. Quick Substitution. Repeat the last command, replacing STRING1
  100. with STRING2. Equivalent to '!!:s^STRING1^STRING2^'.
  101. '!#'
  102. The entire command line typed so far.
  103. 
  104. File: history.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction
  105. 1.1.2 Word Designators
  106. ----------------------
  107. Word designators are used to select desired words from the event. A ':'
  108. separates the event specification from the word designator. It may be
  109. omitted if the word designator begins with a '^', '$', '*', '-', or '%'.
  110. Words are numbered from the beginning of the line, with the first word
  111. being denoted by 0 (zero). Words are inserted into the current line
  112. separated by single spaces.
  113. For example,
  114. '!!'
  115. designates the preceding command. When you type this, the
  116. preceding command is repeated in toto.
  117. '!!:$'
  118. designates the last argument of the preceding command. This may be
  119. shortened to '!$'.
  120. '!fi:2'
  121. designates the second argument of the most recent command starting
  122. with the letters 'fi'.
  123. Here are the word designators:
  124. '0 (zero)'
  125. The '0'th word. For many applications, this is the command word.
  126. 'N'
  127. The Nth word.
  128. '^'
  129. The first argument; that is, word 1.
  130. '$'
  131. The last argument.
  132. '%'
  133. The first word matched by the most recent '?STRING?' search, if the
  134. search string begins with a character that is part of a word.
  135. 'X-Y'
  136. A range of words; '-Y' abbreviates '0-Y'.
  137. '*'
  138. All of the words, except the '0'th. This is a synonym for '1-$'.
  139. It is not an error to use '*' if there is just one word in the
  140. event; the empty string is returned in that case.
  141. 'X*'
  142. Abbreviates 'X-$'
  143. 'X-'
  144. Abbreviates 'X-$' like 'X*', but omits the last word. If 'x' is
  145. missing, it defaults to 0.
  146. If a word designator is supplied without an event specification, the
  147. previous command is used as the event.
  148. 
  149. File: history.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction
  150. 1.1.3 Modifiers
  151. ---------------
  152. After the optional word designator, you can add a sequence of one or
  153. more of the following modifiers, each preceded by a ':'. These modify,
  154. or edit, the word or words selected from the history event.
  155. 'h'
  156. Remove a trailing pathname component, leaving only the head.
  157. 't'
  158. Remove all leading pathname components, leaving the tail.
  159. 'r'
  160. Remove a trailing suffix of the form '.SUFFIX', leaving the
  161. basename.
  162. 'e'
  163. Remove all but the trailing suffix.
  164. 'p'
  165. Print the new command but do not execute it.
  166. 's/OLD/NEW/'
  167. Substitute NEW for the first occurrence of OLD in the event line.
  168. Any character may be used as the delimiter in place of '/'. The
  169. delimiter may be quoted in OLD and NEW with a single backslash. If
  170. '&' appears in NEW, it is replaced by OLD. A single backslash will
  171. quote the '&'. If OLD is null, it is set to the last OLD
  172. substituted, or, if no previous history substitutions took place,
  173. the last STRING in a !?STRING'[?]' search. If NEW is null, each
  174. matching OLD is deleted. The final delimiter is optional if it is
  175. the last character on the input line.
  176. '&'
  177. Repeat the previous substitution.
  178. 'g'
  179. 'a'
  180. Cause changes to be applied over the entire event line. Used in
  181. conjunction with 's', as in 'gs/OLD/NEW/', or with '&'.
  182. 'G'
  183. Apply the following 's' or '&' modifier once to each word in the
  184. event.
  185. 
  186. File: history.info, Node: Programming with GNU History, Next: GNU Free Documentation License, Prev: Using History Interactively, Up: Top
  187. 2 Programming with GNU History
  188. ******************************
  189. This chapter describes how to interface programs that you write with the
  190. GNU History Library. It should be considered a technical guide. For
  191. information on the interactive use of GNU History, *note Using History
  192. Interactively::.
  193. * Menu:
  194. * Introduction to History:: What is the GNU History library for?
  195. * History Storage:: How information is stored.
  196. * History Functions:: Functions that you can use.
  197. * History Variables:: Variables that control behaviour.
  198. * History Programming Example:: Example of using the GNU History Library.
  199. 
  200. File: history.info, Node: Introduction to History, Next: History Storage, Up: Programming with GNU History
  201. 2.1 Introduction to History
  202. ===========================
  203. Many programs read input from the user a line at a time. The GNU
  204. History library is able to keep track of those lines, associate
  205. arbitrary data with each line, and utilize information from previous
  206. lines in composing new ones.
  207. A programmer using the History library has available functions for
  208. remembering lines on a history list, associating arbitrary data with a
  209. line, removing lines from the list, searching through the list for a
  210. line containing an arbitrary text string, and referencing any line in
  211. the list directly. In addition, a history "expansion" function is
  212. available which provides for a consistent user interface across
  213. different programs.
  214. The user using programs written with the History library has the
  215. benefit of a consistent user interface with a set of well-known commands
  216. for manipulating the text of previous lines and using that text in new
  217. commands. The basic history manipulation commands are similar to the
  218. history substitution provided by 'csh'.
  219. The programmer can also use the Readline library, which includes some
  220. history manipulation by default, and has the added advantage of command
  221. line editing.
  222. Before declaring any functions using any functionality the History
  223. library provides in other code, an application writer should include the
  224. file '<readline/history.h>' in any file that uses the History library's
  225. features. It supplies extern declarations for all of the library's
  226. public functions and variables, and declares all of the public data
  227. structures.
  228. 
  229. File: history.info, Node: History Storage, Next: History Functions, Prev: Introduction to History, Up: Programming with GNU History
  230. 2.2 History Storage
  231. ===================
  232. The history list is an array of history entries. A history entry is
  233. declared as follows:
  234. typedef void *histdata_t;
  235. typedef struct _hist_entry {
  236. char *line;
  237. char *timestamp;
  238. histdata_t data;
  239. } HIST_ENTRY;
  240. The history list itself might therefore be declared as
  241. HIST_ENTRY **the_history_list;
  242. The state of the History library is encapsulated into a single
  243. structure:
  244. /*
  245. * A structure used to pass around the current state of the history.
  246. */
  247. typedef struct _hist_state {
  248. HIST_ENTRY **entries; /* Pointer to the entries themselves. */
  249. int offset; /* The location pointer within this array. */
  250. int length; /* Number of elements within this array. */
  251. int size; /* Number of slots allocated to this array. */
  252. int flags;
  253. } HISTORY_STATE;
  254. If the flags member includes 'HS_STIFLED', the history has been
  255. stifled.
  256. 
  257. File: history.info, Node: History Functions, Next: History Variables, Prev: History Storage, Up: Programming with GNU History
  258. 2.3 History Functions
  259. =====================
  260. This section describes the calling sequence for the various functions
  261. exported by the GNU History library.
  262. * Menu:
  263. * Initializing History and State Management:: Functions to call when you
  264. want to use history in a
  265. program.
  266. * History List Management:: Functions used to manage the list
  267. of history entries.
  268. * Information About the History List:: Functions returning information about
  269. the history list.
  270. * Moving Around the History List:: Functions used to change the position
  271. in the history list.
  272. * Searching the History List:: Functions to search the history list
  273. for entries containing a string.
  274. * Managing the History File:: Functions that read and write a file
  275. containing the history list.
  276. * History Expansion:: Functions to perform csh-like history
  277. expansion.
  278. 
  279. File: history.info, Node: Initializing History and State Management, Next: History List Management, Up: History Functions
  280. 2.3.1 Initializing History and State Management
  281. -----------------------------------------------
  282. This section describes functions used to initialize and manage the state
  283. of the History library when you want to use the history functions in
  284. your program.
  285. -- Function: void using_history (void)
  286. Begin a session in which the history functions might be used. This
  287. initializes the interactive variables.
  288. -- Function: HISTORY_STATE * history_get_history_state (void)
  289. Return a structure describing the current state of the input
  290. history.
  291. -- Function: void history_set_history_state (HISTORY_STATE *state)
  292. Set the state of the history list according to STATE.
  293. 
  294. File: history.info, Node: History List Management, Next: Information About the History List, Prev: Initializing History and State Management, Up: History Functions
  295. 2.3.2 History List Management
  296. -----------------------------
  297. These functions manage individual entries on the history list, or set
  298. parameters managing the list itself.
  299. -- Function: void add_history (const char *string)
  300. Place STRING at the end of the history list. The associated data
  301. field (if any) is set to 'NULL'. If the maximum number of history
  302. entries has been set using 'stifle_history()', and the new number
  303. of history entries would exceed that maximum, the oldest history
  304. entry is removed.
  305. -- Function: void add_history_time (const char *string)
  306. Change the time stamp associated with the most recent history entry
  307. to STRING.
  308. -- Function: HIST_ENTRY * remove_history (int which)
  309. Remove history entry at offset WHICH from the history. The removed
  310. element is returned so you can free the line, data, and containing
  311. structure.
  312. -- Function: histdata_t free_history_entry (HIST_ENTRY *histent)
  313. Free the history entry HISTENT and any history library private data
  314. associated with it. Returns the application-specific data so the
  315. caller can dispose of it.
  316. -- Function: HIST_ENTRY * replace_history_entry (int which, const char
  317. *line, histdata_t data)
  318. Make the history entry at offset WHICH have LINE and DATA. This
  319. returns the old entry so the caller can dispose of any
  320. application-specific data. In the case of an invalid WHICH, a
  321. 'NULL' pointer is returned.
  322. -- Function: void clear_history (void)
  323. Clear the history list by deleting all the entries.
  324. -- Function: void stifle_history (int max)
  325. Stifle the history list, remembering only the last MAX entries.
  326. The history list will contain only MAX entries at a time.
  327. -- Function: int unstifle_history (void)
  328. Stop stifling the history. This returns the previously-set maximum
  329. number of history entries (as set by 'stifle_history()'). The
  330. value is positive if the history was stifled, negative if it
  331. wasn't.
  332. -- Function: int history_is_stifled (void)
  333. Returns non-zero if the history is stifled, zero if it is not.
  334. 
  335. File: history.info, Node: Information About the History List, Next: Moving Around the History List, Prev: History List Management, Up: History Functions
  336. 2.3.3 Information About the History List
  337. ----------------------------------------
  338. These functions return information about the entire history list or
  339. individual list entries.
  340. -- Function: HIST_ENTRY ** history_list (void)
  341. Return a 'NULL' terminated array of 'HIST_ENTRY *' which is the
  342. current input history. Element 0 of this list is the beginning of
  343. time. If there is no history, return 'NULL'.
  344. -- Function: int where_history (void)
  345. Returns the offset of the current history element.
  346. -- Function: HIST_ENTRY * current_history (void)
  347. Return the history entry at the current position, as determined by
  348. 'where_history()'. If there is no entry there, return a 'NULL'
  349. pointer.
  350. -- Function: HIST_ENTRY * history_get (int offset)
  351. Return the history entry at position OFFSET. The range of valid
  352. values of OFFSET starts at 'history_base' and ends at
  353. HISTORY_LENGTH - 1 (*note History Variables::). If there is no
  354. entry there, or if OFFSET is outside the valid range, return a
  355. 'NULL' pointer.
  356. -- Function: time_t history_get_time (HIST_ENTRY *entry)
  357. Return the time stamp associated with the history entry ENTRY. If
  358. the timestamp is missing or invalid, return 0.
  359. -- Function: int history_total_bytes (void)
  360. Return the number of bytes that the primary history entries are
  361. using. This function returns the sum of the lengths of all the
  362. lines in the history.
  363. 
  364. File: history.info, Node: Moving Around the History List, Next: Searching the History List, Prev: Information About the History List, Up: History Functions
  365. 2.3.4 Moving Around the History List
  366. ------------------------------------
  367. These functions allow the current index into the history list to be set
  368. or changed.
  369. -- Function: int history_set_pos (int pos)
  370. Set the current history offset to POS, an absolute index into the
  371. list. Returns 1 on success, 0 if POS is less than zero or greater
  372. than the number of history entries.
  373. -- Function: HIST_ENTRY * previous_history (void)
  374. Back up the current history offset to the previous history entry,
  375. and return a pointer to that entry. If there is no previous entry,
  376. return a 'NULL' pointer.
  377. -- Function: HIST_ENTRY * next_history (void)
  378. If the current history offset refers to a valid history entry,
  379. increment the current history offset. If the possibly-incremented
  380. history offset refers to a valid history entry, return a pointer to
  381. that entry; otherwise, return a 'BNULL' pointer.
  382. 
  383. File: history.info, Node: Searching the History List, Next: Managing the History File, Prev: Moving Around the History List, Up: History Functions
  384. 2.3.5 Searching the History List
  385. --------------------------------
  386. These functions allow searching of the history list for entries
  387. containing a specific string. Searching may be performed both forward
  388. and backward from the current history position. The search may be
  389. "anchored", meaning that the string must match at the beginning of the
  390. history entry.
  391. -- Function: int history_search (const char *string, int direction)
  392. Search the history for STRING, starting at the current history
  393. offset. If DIRECTION is less than 0, then the search is through
  394. previous entries, otherwise through subsequent entries. If STRING
  395. is found, then the current history index is set to that history
  396. entry, and the value returned is the offset in the line of the
  397. entry where STRING was found. Otherwise, nothing is changed, and a
  398. -1 is returned.
  399. -- Function: int history_search_prefix (const char *string, int
  400. direction)
  401. Search the history for STRING, starting at the current history
  402. offset. The search is anchored: matching lines must begin with
  403. STRING. If DIRECTION is less than 0, then the search is through
  404. previous entries, otherwise through subsequent entries. If STRING
  405. is found, then the current history index is set to that entry, and
  406. the return value is 0. Otherwise, nothing is changed, and a -1 is
  407. returned.
  408. -- Function: int history_search_pos (const char *string, int direction,
  409. int pos)
  410. Search for STRING in the history list, starting at POS, an absolute
  411. index into the list. If DIRECTION is negative, the search proceeds
  412. backward from POS, otherwise forward. Returns the absolute index
  413. of the history element where STRING was found, or -1 otherwise.
  414. 
  415. File: history.info, Node: Managing the History File, Next: History Expansion, Prev: Searching the History List, Up: History Functions
  416. 2.3.6 Managing the History File
  417. -------------------------------
  418. The History library can read the history from and write it to a file.
  419. This section documents the functions for managing a history file.
  420. -- Function: int read_history (const char *filename)
  421. Add the contents of FILENAME to the history list, a line at a time.
  422. If FILENAME is 'NULL', then read from '~/.history'. Returns 0 if
  423. successful, or 'errno' if not.
  424. -- Function: int read_history_range (const char *filename, int from,
  425. int to)
  426. Read a range of lines from FILENAME, adding them to the history
  427. list. Start reading at line FROM and end at TO. If FROM is zero,
  428. start at the beginning. If TO is less than FROM, then read until
  429. the end of the file. If FILENAME is 'NULL', then read from
  430. '~/.history'. Returns 0 if successful, or 'errno' if not.
  431. -- Function: int write_history (const char *filename)
  432. Write the current history to FILENAME, overwriting FILENAME if
  433. necessary. If FILENAME is 'NULL', then write the history list to
  434. '~/.history'. Returns 0 on success, or 'errno' on a read or write
  435. error.
  436. -- Function: int append_history (int nelements, const char *filename)
  437. Append the last NELEMENTS of the history list to FILENAME. If
  438. FILENAME is 'NULL', then append to '~/.history'. Returns 0 on
  439. success, or 'errno' on a read or write error.
  440. -- Function: int history_truncate_file (const char *filename, int
  441. nlines)
  442. Truncate the history file FILENAME, leaving only the last NLINES
  443. lines. If FILENAME is 'NULL', then '~/.history' is truncated.
  444. Returns 0 on success, or 'errno' on failure.
  445. 
  446. File: history.info, Node: History Expansion, Prev: Managing the History File, Up: History Functions
  447. 2.3.7 History Expansion
  448. -----------------------
  449. These functions implement history expansion.
  450. -- Function: int history_expand (char *string, char **output)
  451. Expand STRING, placing the result into OUTPUT, a pointer to a
  452. string (*note History Interaction::). Returns:
  453. '0'
  454. If no expansions took place (or, if the only change in the
  455. text was the removal of escape characters preceding the
  456. history expansion character);
  457. '1'
  458. if expansions did take place;
  459. '-1'
  460. if there was an error in expansion;
  461. '2'
  462. if the returned line should be displayed, but not executed, as
  463. with the ':p' modifier (*note Modifiers::).
  464. If an error occurred in expansion, then OUTPUT contains a
  465. descriptive error message.
  466. -- Function: char * get_history_event (const char *string, int *cindex,
  467. int qchar)
  468. Returns the text of the history event beginning at STRING +
  469. *CINDEX. *CINDEX is modified to point to after the event
  470. specifier. At function entry, CINDEX points to the index into
  471. STRING where the history event specification begins. QCHAR is a
  472. character that is allowed to end the event specification in
  473. addition to the "normal" terminating characters.
  474. -- Function: char ** history_tokenize (const char *string)
  475. Return an array of tokens parsed out of STRING, much as the shell
  476. might. The tokens are split on the characters in the
  477. HISTORY_WORD_DELIMITERS variable, and shell quoting conventions are
  478. obeyed as described below.
  479. -- Function: char * history_arg_extract (int first, int last, const
  480. char *string)
  481. Extract a string segment consisting of the FIRST through LAST
  482. arguments present in STRING. Arguments are split using
  483. 'history_tokenize'.
  484. 
  485. File: history.info, Node: History Variables, Next: History Programming Example, Prev: History Functions, Up: Programming with GNU History
  486. 2.4 History Variables
  487. =====================
  488. This section describes the externally-visible variables exported by the
  489. GNU History Library.
  490. -- Variable: int history_base
  491. The logical offset of the first entry in the history list.
  492. -- Variable: int history_length
  493. The number of entries currently stored in the history list.
  494. -- Variable: int history_max_entries
  495. The maximum number of history entries. This must be changed using
  496. 'stifle_history()'.
  497. -- Variable: int history_write_timestamps
  498. If non-zero, timestamps are written to the history file, so they
  499. can be preserved between sessions. The default value is 0, meaning
  500. that timestamps are not saved.
  501. The current timestamp format uses the value of HISTORY_COMMENT_CHAR
  502. to delimit timestamp entries in the history file. If that variable
  503. does not have a value (the default), timestamps will not be
  504. written.
  505. -- Variable: char history_expansion_char
  506. The character that introduces a history event. The default is '!'.
  507. Setting this to 0 inhibits history expansion.
  508. -- Variable: char history_subst_char
  509. The character that invokes word substitution if found at the start
  510. of a line. The default is '^'.
  511. -- Variable: char history_comment_char
  512. During tokenization, if this character is seen as the first
  513. character of a word, then it and all subsequent characters up to a
  514. newline are ignored, suppressing history expansion for the
  515. remainder of the line. This is disabled by default.
  516. -- Variable: char * history_word_delimiters
  517. The characters that separate tokens for 'history_tokenize()'. The
  518. default value is '" \t\n()<>;&|"'.
  519. -- Variable: char * history_search_delimiter_chars
  520. The list of additional characters which can delimit a history
  521. search string, in addition to space, TAB, ':' and '?' in the case
  522. of a substring search. The default is empty.
  523. -- Variable: char * history_no_expand_chars
  524. The list of characters which inhibit history expansion if found
  525. immediately following HISTORY_EXPANSION_CHAR. The default is
  526. space, tab, newline, carriage return, and '='.
  527. -- Variable: int history_quotes_inhibit_expansion
  528. If non-zero, the history expansion code implements shell-like
  529. quoting: single-quoted words are not scanned for the history
  530. expansion character or the history comment character, and
  531. double-quoted words may have history expansion performed, since
  532. single quotes are not special within double quotes. The default
  533. value is 0.
  534. -- Variable: int history_quoting_state
  535. An application may set this variable to indicate that the current
  536. line being expanded is subject to existing quoting. If set to ''',
  537. the history expansion function will assume that the line is
  538. single-quoted and inhibit expansion until it reads an unquoted
  539. closing single quote; if set to '"', history expansion will assume
  540. the line is double quoted until it reads an unquoted closing double
  541. quote. If set to zero, the default, the history expansion function
  542. will assume the line is not quoted and treat quote characters
  543. within the line as described above. This is only effective if
  544. HISTORY_QUOTES_INHIBIT_EXPANSION is set.
  545. -- Variable: rl_linebuf_func_t * history_inhibit_expansion_function
  546. This should be set to the address of a function that takes two
  547. arguments: a 'char *' (STRING) and an 'int' index into that string
  548. (I). It should return a non-zero value if the history expansion
  549. starting at STRING[I] should not be performed; zero if the
  550. expansion should be done. It is intended for use by applications
  551. like Bash that use the history expansion character for additional
  552. purposes. By default, this variable is set to 'NULL'.
  553. 
  554. File: history.info, Node: History Programming Example, Prev: History Variables, Up: Programming with GNU History
  555. 2.5 History Programming Example
  556. ===============================
  557. The following program demonstrates simple use of the GNU History
  558. Library.
  559. #include <stdio.h>
  560. #include <readline/history.h>
  561. main (argc, argv)
  562. int argc;
  563. char **argv;
  564. {
  565. char line[1024], *t;
  566. int len, done = 0;
  567. line[0] = 0;
  568. using_history ();
  569. while (!done)
  570. {
  571. printf ("history$ ");
  572. fflush (stdout);
  573. t = fgets (line, sizeof (line) - 1, stdin);
  574. if (t && *t)
  575. {
  576. len = strlen (t);
  577. if (t[len - 1] == '\n')
  578. t[len - 1] = '\0';
  579. }
  580. if (!t)
  581. strcpy (line, "quit");
  582. if (line[0])
  583. {
  584. char *expansion;
  585. int result;
  586. result = history_expand (line, &expansion);
  587. if (result)
  588. fprintf (stderr, "%s\n", expansion);
  589. if (result < 0 || result == 2)
  590. {
  591. free (expansion);
  592. continue;
  593. }
  594. add_history (expansion);
  595. strncpy (line, expansion, sizeof (line) - 1);
  596. free (expansion);
  597. }
  598. if (strcmp (line, "quit") == 0)
  599. done = 1;
  600. else if (strcmp (line, "save") == 0)
  601. write_history ("history_file");
  602. else if (strcmp (line, "read") == 0)
  603. read_history ("history_file");
  604. else if (strcmp (line, "list") == 0)
  605. {
  606. register HIST_ENTRY **the_list;
  607. register int i;
  608. the_list = history_list ();
  609. if (the_list)
  610. for (i = 0; the_list[i]; i++)
  611. printf ("%d: %s\n", i + history_base, the_list[i]->line);
  612. }
  613. else if (strncmp (line, "delete", 6) == 0)
  614. {
  615. int which;
  616. if ((sscanf (line + 6, "%d", &which)) == 1)
  617. {
  618. HIST_ENTRY *entry = remove_history (which);
  619. if (!entry)
  620. fprintf (stderr, "No such entry %d\n", which);
  621. else
  622. {
  623. free (entry->line);
  624. free (entry);
  625. }
  626. }
  627. else
  628. {
  629. fprintf (stderr, "non-numeric arg given to `delete'\n");
  630. }
  631. }
  632. }
  633. }
  634. 
  635. File: history.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Programming with GNU History, Up: Top
  636. Appendix A GNU Free Documentation License
  637. *****************************************
  638. Version 1.3, 3 November 2008
  639. Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
  640. <http://fsf.org/>
  641. Everyone is permitted to copy and distribute verbatim copies
  642. of this license document, but changing it is not allowed.
  643. 0. PREAMBLE
  644. The purpose of this License is to make a manual, textbook, or other
  645. functional and useful document "free" in the sense of freedom: to
  646. assure everyone the effective freedom to copy and redistribute it,
  647. with or without modifying it, either commercially or
  648. noncommercially. Secondarily, this License preserves for the
  649. author and publisher a way to get credit for their work, while not
  650. being considered responsible for modifications made by others.
  651. This License is a kind of "copyleft", which means that derivative
  652. works of the document must themselves be free in the same sense.
  653. It complements the GNU General Public License, which is a copyleft
  654. license designed for free software.
  655. We have designed this License in order to use it for manuals for
  656. free software, because free software needs free documentation: a
  657. free program should come with manuals providing the same freedoms
  658. that the software does. But this License is not limited to
  659. software manuals; it can be used for any textual work, regardless
  660. of subject matter or whether it is published as a printed book. We
  661. recommend this License principally for works whose purpose is
  662. instruction or reference.
  663. 1. APPLICABILITY AND DEFINITIONS
  664. This License applies to any manual or other work, in any medium,
  665. that contains a notice placed by the copyright holder saying it can
  666. be distributed under the terms of this License. Such a notice
  667. grants a world-wide, royalty-free license, unlimited in duration,
  668. to use that work under the conditions stated herein. The
  669. "Document", below, refers to any such manual or work. Any member
  670. of the public is a licensee, and is addressed as "you". You accept
  671. the license if you copy, modify or distribute the work in a way
  672. requiring permission under copyright law.
  673. A "Modified Version" of the Document means any work containing the
  674. Document or a portion of it, either copied verbatim, or with
  675. modifications and/or translated into another language.
  676. A "Secondary Section" is a named appendix or a front-matter section
  677. of the Document that deals exclusively with the relationship of the
  678. publishers or authors of the Document to the Document's overall
  679. subject (or to related matters) and contains nothing that could
  680. fall directly within that overall subject. (Thus, if the Document
  681. is in part a textbook of mathematics, a Secondary Section may not
  682. explain any mathematics.) The relationship could be a matter of
  683. historical connection with the subject or with related matters, or
  684. of legal, commercial, philosophical, ethical or political position
  685. regarding them.
  686. The "Invariant Sections" are certain Secondary Sections whose
  687. titles are designated, as being those of Invariant Sections, in the
  688. notice that says that the Document is released under this License.
  689. If a section does not fit the above definition of Secondary then it
  690. is not allowed to be designated as Invariant. The Document may
  691. contain zero Invariant Sections. If the Document does not identify
  692. any Invariant Sections then there are none.
  693. The "Cover Texts" are certain short passages of text that are
  694. listed, as Front-Cover Texts or Back-Cover Texts, in the notice
  695. that says that the Document is released under this License. A
  696. Front-Cover Text may be at most 5 words, and a Back-Cover Text may
  697. be at most 25 words.
  698. A "Transparent" copy of the Document means a machine-readable copy,
  699. represented in a format whose specification is available to the
  700. general public, that is suitable for revising the document
  701. straightforwardly with generic text editors or (for images composed
  702. of pixels) generic paint programs or (for drawings) some widely
  703. available drawing editor, and that is suitable for input to text
  704. formatters or for automatic translation to a variety of formats
  705. suitable for input to text formatters. A copy made in an otherwise
  706. Transparent file format whose markup, or absence of markup, has
  707. been arranged to thwart or discourage subsequent modification by
  708. readers is not Transparent. An image format is not Transparent if
  709. used for any substantial amount of text. A copy that is not
  710. "Transparent" is called "Opaque".
  711. Examples of suitable formats for Transparent copies include plain
  712. ASCII without markup, Texinfo input format, LaTeX input format,
  713. SGML or XML using a publicly available DTD, and standard-conforming
  714. simple HTML, PostScript or PDF designed for human modification.
  715. Examples of transparent image formats include PNG, XCF and JPG.
  716. Opaque formats include proprietary formats that can be read and
  717. edited only by proprietary word processors, SGML or XML for which
  718. the DTD and/or processing tools are not generally available, and
  719. the machine-generated HTML, PostScript or PDF produced by some word
  720. processors for output purposes only.
  721. The "Title Page" means, for a printed book, the title page itself,
  722. plus such following pages as are needed to hold, legibly, the
  723. material this License requires to appear in the title page. For
  724. works in formats which do not have any title page as such, "Title
  725. Page" means the text near the most prominent appearance of the
  726. work's title, preceding the beginning of the body of the text.
  727. The "publisher" means any person or entity that distributes copies
  728. of the Document to the public.
  729. A section "Entitled XYZ" means a named subunit of the Document
  730. whose title either is precisely XYZ or contains XYZ in parentheses
  731. following text that translates XYZ in another language. (Here XYZ
  732. stands for a specific section name mentioned below, such as
  733. "Acknowledgements", "Dedications", "Endorsements", or "History".)
  734. To "Preserve the Title" of such a section when you modify the
  735. Document means that it remains a section "Entitled XYZ" according
  736. to this definition.
  737. The Document may include Warranty Disclaimers next to the notice
  738. which states that this License applies to the Document. These
  739. Warranty Disclaimers are considered to be included by reference in
  740. this License, but only as regards disclaiming warranties: any other
  741. implication that these Warranty Disclaimers may have is void and
  742. has no effect on the meaning of this License.
  743. 2. VERBATIM COPYING
  744. You may copy and distribute the Document in any medium, either
  745. commercially or noncommercially, provided that this License, the
  746. copyright notices, and the license notice saying this License
  747. applies to the Document are reproduced in all copies, and that you
  748. add no other conditions whatsoever to those of this License. You
  749. may not use technical measures to obstruct or control the reading
  750. or further copying of the copies you make or distribute. However,
  751. you may accept compensation in exchange for copies. If you
  752. distribute a large enough number of copies you must also follow the
  753. conditions in section 3.
  754. You may also lend copies, under the same conditions stated above,
  755. and you may publicly display copies.
  756. 3. COPYING IN QUANTITY
  757. If you publish printed copies (or copies in media that commonly
  758. have printed covers) of the Document, numbering more than 100, and
  759. the Document's license notice requires Cover Texts, you must
  760. enclose the copies in covers that carry, clearly and legibly, all
  761. these Cover Texts: Front-Cover Texts on the front cover, and
  762. Back-Cover Texts on the back cover. Both covers must also clearly
  763. and legibly identify you as the publisher of these copies. The
  764. front cover must present the full title with all words of the title
  765. equally prominent and visible. You may add other material on the
  766. covers in addition. Copying with changes limited to the covers, as
  767. long as they preserve the title of the Document and satisfy these
  768. conditions, can be treated as verbatim copying in other respects.
  769. If the required texts for either cover are too voluminous to fit
  770. legibly, you should put the first ones listed (as many as fit
  771. reasonably) on the actual cover, and continue the rest onto
  772. adjacent pages.
  773. If you publish or distribute Opaque copies of the Document
  774. numbering more than 100, you must either include a machine-readable
  775. Transparent copy along with each Opaque copy, or state in or with
  776. each Opaque copy a computer-network location from which the general
  777. network-using public has access to download using public-standard
  778. network protocols a complete Transparent copy of the Document, free
  779. of added material. If you use the latter option, you must take
  780. reasonably prudent steps, when you begin distribution of Opaque
  781. copies in quantity, to ensure that this Transparent copy will
  782. remain thus accessible at the stated location until at least one
  783. year after the last time you distribute an Opaque copy (directly or
  784. through your agents or retailers) of that edition to the public.
  785. It is requested, but not required, that you contact the authors of
  786. the Document well before redistributing any large number of copies,
  787. to give them a chance to provide you with an updated version of the
  788. Document.
  789. 4. MODIFICATIONS
  790. You may copy and distribute a Modified Version of the Document
  791. under the conditions of sections 2 and 3 above, provided that you
  792. release the Modified Version under precisely this License, with the
  793. Modified Version filling the role of the Document, thus licensing
  794. distribution and modification of the Modified Version to whoever
  795. possesses a copy of it. In addition, you must do these things in
  796. the Modified Version:
  797. A. Use in the Title Page (and on the covers, if any) a title
  798. distinct from that of the Document, and from those of previous
  799. versions (which should, if there were any, be listed in the
  800. History section of the Document). You may use the same title
  801. as a previous version if the original publisher of that
  802. version gives permission.
  803. B. List on the Title Page, as authors, one or more persons or
  804. entities responsible for authorship of the modifications in
  805. the Modified Version, together with at least five of the
  806. principal authors of the Document (all of its principal
  807. authors, if it has fewer than five), unless they release you
  808. from this requirement.
  809. C. State on the Title page the name of the publisher of the
  810. Modified Version, as the publisher.
  811. D. Preserve all the copyright notices of the Document.
  812. E. Add an appropriate copyright notice for your modifications
  813. adjacent to the other copyright notices.
  814. F. Include, immediately after the copyright notices, a license
  815. notice giving the public permission to use the Modified
  816. Version under the terms of this License, in the form shown in
  817. the Addendum below.
  818. G. Preserve in that license notice the full lists of Invariant
  819. Sections and required Cover Texts given in the Document's
  820. license notice.
  821. H. Include an unaltered copy of this License.
  822. I. Preserve the section Entitled "History", Preserve its Title,
  823. and add to it an item stating at least the title, year, new
  824. authors, and publisher of the Modified Version as given on the
  825. Title Page. If there is no section Entitled "History" in the
  826. Document, create one stating the title, year, authors, and
  827. publisher of the Document as given on its Title Page, then add
  828. an item describing the Modified Version as stated in the
  829. previous sentence.
  830. J. Preserve the network location, if any, given in the Document
  831. for public access to a Transparent copy of the Document, and
  832. likewise the network locations given in the Document for
  833. previous versions it was based on. These may be placed in the
  834. "History" section. You may omit a network location for a work
  835. that was published at least four years before the Document
  836. itself, or if the original publisher of the version it refers
  837. to gives permission.
  838. K. For any section Entitled "Acknowledgements" or "Dedications",
  839. Preserve the Title of the section, and preserve in the section
  840. all the substance and tone of each of the contributor
  841. acknowledgements and/or dedications given therein.
  842. L. Preserve all the Invariant Sections of the Document, unaltered
  843. in their text and in their titles. Section numbers or the
  844. equivalent are not considered part of the section titles.
  845. M. Delete any section Entitled "Endorsements". Such a section
  846. may not be included in the Modified Version.
  847. N. Do not retitle any existing section to be Entitled
  848. "Endorsements" or to conflict in title with any Invariant
  849. Section.
  850. O. Preserve any Warranty Disclaimers.
  851. If the Modified Version includes new front-matter sections or
  852. appendices that qualify as Secondary Sections and contain no
  853. material copied from the Document, you may at your option designate
  854. some or all of these sections as invariant. To do this, add their
  855. titles to the list of Invariant Sections in the Modified Version's
  856. license notice. These titles must be distinct from any other
  857. section titles.
  858. You may add a section Entitled "Endorsements", provided it contains
  859. nothing but endorsements of your Modified Version by various
  860. parties--for example, statements of peer review or that the text
  861. has been approved by an organization as the authoritative
  862. definition of a standard.
  863. You may add a passage of up to five words as a Front-Cover Text,
  864. and a passage of up to 25 words as a Back-Cover Text, to the end of
  865. the list of Cover Texts in the Modified Version. Only one passage
  866. of Front-Cover Text and one of Back-Cover Text may be added by (or
  867. through arrangements made by) any one entity. If the Document
  868. already includes a cover text for the same cover, previously added
  869. by you or by arrangement made by the same entity you are acting on
  870. behalf of, you may not add another; but you may replace the old
  871. one, on explicit permission from the previous publisher that added
  872. the old one.
  873. The author(s) and publisher(s) of the Document do not by this
  874. License give permission to use their names for publicity for or to
  875. assert or imply endorsement of any Modified Version.
  876. 5. COMBINING DOCUMENTS
  877. You may combine the Document with other documents released under
  878. this License, under the terms defined in section 4 above for
  879. modified versions, provided that you include in the combination all
  880. of the Invariant Sections of all of the original documents,
  881. unmodified, and list them all as Invariant Sections of your
  882. combined work in its license notice, and that you preserve all
  883. their Warranty Disclaimers.
  884. The combined work need only contain one copy of this License, and
  885. multiple identical Invariant Sections may be replaced with a single
  886. copy. If there are multiple Invariant Sections with the same name
  887. but different contents, make the title of each such section unique
  888. by adding at the end of it, in parentheses, the name of the
  889. original author or publisher of that section if known, or else a
  890. unique number. Make the same adjustment to the section titles in
  891. the list of Invariant Sections in the license notice of the
  892. combined work.
  893. In the combination, you must combine any sections Entitled
  894. "History" in the various original documents, forming one section
  895. Entitled "History"; likewise combine any sections Entitled
  896. "Acknowledgements", and any sections Entitled "Dedications". You
  897. must delete all sections Entitled "Endorsements."
  898. 6. COLLECTIONS OF DOCUMENTS
  899. You may make a collection consisting of the Document and other
  900. documents released under this License, and replace the individual
  901. copies of this License in the various documents with a single copy
  902. that is included in the collection, provided that you follow the
  903. rules of this License for verbatim copying of each of the documents
  904. in all other respects.
  905. You may extract a single document from such a collection, and
  906. distribute it individually under this License, provided you insert
  907. a copy of this License into the extracted document, and follow this
  908. License in all other respects regarding verbatim copying of that
  909. document.
  910. 7. AGGREGATION WITH INDEPENDENT WORKS
  911. A compilation of the Document or its derivatives with other
  912. separate and independent documents or works, in or on a volume of a
  913. storage or distribution medium, is called an "aggregate" if the
  914. copyright resulting from the compilation is not used to limit the
  915. legal rights of the compilation's users beyond what the individual
  916. works permit. When the Document is included in an aggregate, this
  917. License does not apply to the other works in the aggregate which
  918. are not themselves derivative works of the Document.
  919. If the Cover Text requirement of section 3 is applicable to these
  920. copies of the Document, then if the Document is less than one half
  921. of the entire aggregate, the Document's Cover Texts may be placed
  922. on covers that bracket the Document within the aggregate, or the
  923. electronic equivalent of covers if the Document is in electronic
  924. form. Otherwise they must appear on printed covers that bracket
  925. the whole aggregate.
  926. 8. TRANSLATION
  927. Translation is considered a kind of modification, so you may
  928. distribute translations of the Document under the terms of section
  929. 4. Replacing Invariant Sections with translations requires special
  930. permission from their copyright holders, but you may include
  931. translations of some or all Invariant Sections in addition to the
  932. original versions of these Invariant Sections. You may include a
  933. translation of this License, and all the license notices in the
  934. Document, and any Warranty Disclaimers, provided that you also
  935. include the original English version of this License and the
  936. original versions of those notices and disclaimers. In case of a
  937. disagreement between the translation and the original version of
  938. this License or a notice or disclaimer, the original version will
  939. prevail.
  940. If a section in the Document is Entitled "Acknowledgements",
  941. "Dedications", or "History", the requirement (section 4) to
  942. Preserve its Title (section 1) will typically require changing the
  943. actual title.
  944. 9. TERMINATION
  945. You may not copy, modify, sublicense, or distribute the Document
  946. except as expressly provided under this License. Any attempt
  947. otherwise to copy, modify, sublicense, or distribute it is void,
  948. and will automatically terminate your rights under this License.
  949. However, if you cease all violation of this License, then your
  950. license from a particular copyright holder is reinstated (a)
  951. provisionally, unless and until the copyright holder explicitly and
  952. finally terminates your license, and (b) permanently, if the
  953. copyright holder fails to notify you of the violation by some
  954. reasonable means prior to 60 days after the cessation.
  955. Moreover, your license from a particular copyright holder is
  956. reinstated permanently if the copyright holder notifies you of the
  957. violation by some reasonable means, this is the first time you have
  958. received notice of violation of this License (for any work) from
  959. that copyright holder, and you cure the violation prior to 30 days
  960. after your receipt of the notice.
  961. Termination of your rights under this section does not terminate
  962. the licenses of parties who have received copies or rights from you
  963. under this License. If your rights have been terminated and not
  964. permanently reinstated, receipt of a copy of some or all of the
  965. same material does not give you any rights to use it.
  966. 10. FUTURE REVISIONS OF THIS LICENSE
  967. The Free Software Foundation may publish new, revised versions of
  968. the GNU Free Documentation License from time to time. Such new
  969. versions will be similar in spirit to the present version, but may
  970. differ in detail to address new problems or concerns. See
  971. <http://www.gnu.org/copyleft/>.
  972. Each version of the License is given a distinguishing version
  973. number. If the Document specifies that a particular numbered
  974. version of this License "or any later version" applies to it, you
  975. have the option of following the terms and conditions either of
  976. that specified version or of any later version that has been
  977. published (not as a draft) by the Free Software Foundation. If the
  978. Document does not specify a version number of this License, you may
  979. choose any version ever published (not as a draft) by the Free
  980. Software Foundation. If the Document specifies that a proxy can
  981. decide which future versions of this License can be used, that
  982. proxy's public statement of acceptance of a version permanently
  983. authorizes you to choose that version for the Document.
  984. 11. RELICENSING
  985. "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
  986. World Wide Web server that publishes copyrightable works and also
  987. provides prominent facilities for anybody to edit those works. A
  988. public wiki that anybody can edit is an example of such a server.
  989. A "Massive Multiauthor Collaboration" (or "MMC") contained in the
  990. site means any set of copyrightable works thus published on the MMC
  991. site.
  992. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
  993. license published by Creative Commons Corporation, a not-for-profit
  994. corporation with a principal place of business in San Francisco,
  995. California, as well as future copyleft versions of that license
  996. published by that same organization.
  997. "Incorporate" means to publish or republish a Document, in whole or
  998. in part, as part of another Document.
  999. An MMC is "eligible for relicensing" if it is licensed under this
  1000. License, and if all works that were first published under this
  1001. License somewhere other than this MMC, and subsequently
  1002. incorporated in whole or in part into the MMC, (1) had no cover
  1003. texts or invariant sections, and (2) were thus incorporated prior
  1004. to November 1, 2008.
  1005. The operator of an MMC Site may republish an MMC contained in the
  1006. site under CC-BY-SA on the same site at any time before August 1,
  1007. 2009, provided the MMC is eligible for relicensing.
  1008. ADDENDUM: How to use this License for your documents
  1009. ====================================================
  1010. To use this License in a document you have written, include a copy of
  1011. the License in the document and put the following copyright and license
  1012. notices just after the title page:
  1013. Copyright (C) YEAR YOUR NAME.
  1014. Permission is granted to copy, distribute and/or modify this document
  1015. under the terms of the GNU Free Documentation License, Version 1.3
  1016. or any later version published by the Free Software Foundation;
  1017. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  1018. Texts. A copy of the license is included in the section entitled ``GNU
  1019. Free Documentation License''.
  1020. If you have Invariant Sections, Front-Cover Texts and Back-Cover
  1021. Texts, replace the "with...Texts." line with this:
  1022. with the Invariant Sections being LIST THEIR TITLES, with
  1023. the Front-Cover Texts being LIST, and with the Back-Cover Texts
  1024. being LIST.
  1025. If you have Invariant Sections without Cover Texts, or some other
  1026. combination of the three, merge those two alternatives to suit the
  1027. situation.
  1028. If your document contains nontrivial examples of program code, we
  1029. recommend releasing these examples in parallel under your choice of free
  1030. software license, such as the GNU General Public License, to permit
  1031. their use in free software.
  1032. 
  1033. File: history.info, Node: Concept Index, Next: Function and Variable Index, Prev: GNU Free Documentation License, Up: Top
  1034. Appendix B Concept Index
  1035. ************************
  1036. �[index�]
  1037. * Menu:
  1038. * anchored search: Searching the History List.
  1039. (line 10)
  1040. * event designators: Event Designators. (line 6)
  1041. * history events: Event Designators. (line 8)
  1042. * history expansion: History Interaction. (line 6)
  1043. * History Searching: Searching the History List.
  1044. (line 6)
  1045. 
  1046. File: history.info, Node: Function and Variable Index, Prev: Concept Index, Up: Top
  1047. Appendix C Function and Variable Index
  1048. **************************************
  1049. �[index�]
  1050. * Menu:
  1051. * add_history: History List Management.
  1052. (line 9)
  1053. * add_history_time: History List Management.
  1054. (line 16)
  1055. * append_history: Managing the History File.
  1056. (line 28)
  1057. * clear_history: History List Management.
  1058. (line 37)
  1059. * current_history: Information About the History List.
  1060. (line 17)
  1061. * free_history_entry: History List Management.
  1062. (line 25)
  1063. * get_history_event: History Expansion. (line 26)
  1064. * history_arg_extract: History Expansion. (line 41)
  1065. * history_base: History Variables. (line 9)
  1066. * history_comment_char: History Variables. (line 37)
  1067. * history_expand: History Expansion. (line 8)
  1068. * history_expansion_char: History Variables. (line 29)
  1069. * history_get: Information About the History List.
  1070. (line 22)
  1071. * history_get_history_state: Initializing History and State Management.
  1072. (line 14)
  1073. * history_get_time: Information About the History List.
  1074. (line 29)
  1075. * history_inhibit_expansion_function: History Variables. (line 77)
  1076. * history_is_stifled: History List Management.
  1077. (line 50)
  1078. * history_length: History Variables. (line 12)
  1079. * history_list: Information About the History List.
  1080. (line 9)
  1081. * history_max_entries: History Variables. (line 15)
  1082. * history_no_expand_chars: History Variables. (line 52)
  1083. * history_quotes_inhibit_expansion: History Variables. (line 57)
  1084. * history_quoting_state: History Variables. (line 65)
  1085. * history_search: Searching the History List.
  1086. (line 12)
  1087. * history_search_delimiter_chars: History Variables. (line 47)
  1088. * history_search_pos: Searching the History List.
  1089. (line 31)
  1090. * history_search_prefix: Searching the History List.
  1091. (line 21)
  1092. * history_set_history_state: Initializing History and State Management.
  1093. (line 18)
  1094. * history_set_pos: Moving Around the History List.
  1095. (line 9)
  1096. * history_subst_char: History Variables. (line 33)
  1097. * history_tokenize: History Expansion. (line 35)
  1098. * history_total_bytes: Information About the History List.
  1099. (line 33)
  1100. * history_truncate_file: Managing the History File.
  1101. (line 33)
  1102. * history_word_delimiters: History Variables. (line 43)
  1103. * history_write_timestamps: History Variables. (line 19)
  1104. * next_history: Moving Around the History List.
  1105. (line 19)
  1106. * previous_history: Moving Around the History List.
  1107. (line 14)
  1108. * read_history: Managing the History File.
  1109. (line 9)
  1110. * read_history_range: Managing the History File.
  1111. (line 14)
  1112. * remove_history: History List Management.
  1113. (line 20)
  1114. * replace_history_entry: History List Management.
  1115. (line 30)
  1116. * stifle_history: History List Management.
  1117. (line 40)
  1118. * unstifle_history: History List Management.
  1119. (line 44)
  1120. * using_history: Initializing History and State Management.
  1121. (line 10)
  1122. * where_history: Information About the History List.
  1123. (line 14)
  1124. * write_history: Managing the History File.
  1125. (line 22)
  1126. 
  1127. Tag Table:
  1128. Node: Top850
  1129. Node: Using History Interactively1495
  1130. Node: History Interaction2003
  1131. Node: Event Designators3901
  1132. Node: Word Designators5175
  1133. Node: Modifiers6935
  1134. Node: Programming with GNU History8477
  1135. Node: Introduction to History9221
  1136. Node: History Storage10899
  1137. Node: History Functions12034
  1138. Node: Initializing History and State Management13023
  1139. Node: History List Management13835
  1140. Node: Information About the History List16129
  1141. Node: Moving Around the History List17743
  1142. Node: Searching the History List18836
  1143. Node: Managing the History File20761
  1144. Node: History Expansion22581
  1145. Node: History Variables24510
  1146. Node: History Programming Example28490
  1147. Node: GNU Free Documentation License31167
  1148. Node: Concept Index56339
  1149. Node: Function and Variable Index57044
  1150. 
  1151. End Tag Table
  1152. 
  1153. Local Variables:
  1154. coding: utf-8
  1155. End: