Jim Tcl
Check-in [954bfa31a8]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:docs: Update documentation for recent changes

Add aio sockopt Add history completion Remove aio tcp_nodelay

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:954bfa31a8e1312fbaa43dcd08aed631a82aa0e6
User & Date: steveb@workware.net.au 2017-09-15 02:12:03
Context
2017-09-15
09:17
Implement defer, $jim::defer

Allows commands to run when a proc or interpreter exits.

If the $jim::defer variables exists at proc or interp exit, it is treated as a list of scripts to evaluate (in reverse order).

The [defer] command is a helper to add scripts to $jim::defer

See tests/defer.test

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 027a885518 user: steveb@workware.net.au tags: trunk

02:12
docs: Update documentation for recent changes

Add aio sockopt Add history completion Remove aio tcp_nodelay

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 954bfa31a8 user: steveb@workware.net.au tags: trunk

02:11
history: Add autocompletion support

With 'history completion <cmd>'

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: bc78c3f08b user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to jim_tcl.txt.

54
55
56
57
58
59
60


61
62
63
64
65
66
67
....
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
....
4571
4572
4573
4574
4575
4576
4577







4578
4579
4580
4581
4582
4583
4584
....
5006
5007
5008
5009
5010
5011
5012




5013
5014
5015
5016
5017
5018
5019
--------------
Changes between 0.77 and 0.78
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Add serial/tty support with `aio tty`
2. Add support for 'jimsh -'
3. Add hidden '-commands' option to many commands
4. Add scriptable autocompletion support in interactive mode with `tcl::autocomplete`



Changes between 0.76 and 0.77
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Add support for `aio sync`
2. Add SSL and TLS support in aio
3. Added `zlib`
4. Added support for boolean constants in `expr`
................................................................................
    if it is not open for write)

+$handle *ndelay ?0|1?*+::
    Set O_NDELAY (if arg). Returns current/new setting.
    Note that in general ANSI I/O interacts badly with non-blocking I/O.
    Use with care.

+$handle *tcp_nodelay* boolean+::
    Enable or disable TCP_NODELAY (Nagle's) algorithm.

+$handle *puts ?-nonewline?* 'str'+::
    Write the string, with newline unless -nonewline

+$handle *read ?-nonewline?* '?len?'+::
    Read and return bytes from the stream. To eof if no len.

+$handle *recvfrom* 'maxlen ?addrvar?'+::
................................................................................

+$handle *sendto* 'str ?addr:?port'+::
    Sends the string, +'str'+, to the given address via the socket using sendto(2).
    This is intended for udp/dgram sockets and may give an error or behave in unintended
    ways for other handle types.
    Returns the number of bytes written.








+$handle *sync*+::
    Flush the stream, then fsync(2) to commit any changes to storage.
    Only available on platforms that support fsync(2).

+$handle *tell*+::
    Returns the current seek position

................................................................................
    it is ignored.

+*history getline* 'prompt ?varname?'+::
    Displays the given prompt and allows a line to be entered. Similarly to `gets`,
    if +'varname'+ is given, it receives the line and the length of the line is returned,
    or -1 on EOF. If +'varname'+ is not given, the line is returned directly.





+*history add* 'line'+::
    Adds the given line to the history buffer.

+*history save* 'filename'+::
    Saves the current history buffer to the given file.

+*history show*+::







>
>







 







<
<
<







 







>
>
>
>
>
>
>







 







>
>
>
>







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
....
4549
4550
4551
4552
4553
4554
4555



4556
4557
4558
4559
4560
4561
4562
....
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
....
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
--------------
Changes between 0.77 and 0.78
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Add serial/tty support with `aio tty`
2. Add support for 'jimsh -'
3. Add hidden '-commands' option to many commands
4. Add scriptable autocompletion support in interactive mode with `tcl::autocomplete`
5. Add `aio sockopt`
6. Add scriptable autocompletion support with `history completion`

Changes between 0.76 and 0.77
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Add support for `aio sync`
2. Add SSL and TLS support in aio
3. Added `zlib`
4. Added support for boolean constants in `expr`
................................................................................
    if it is not open for write)

+$handle *ndelay ?0|1?*+::
    Set O_NDELAY (if arg). Returns current/new setting.
    Note that in general ANSI I/O interacts badly with non-blocking I/O.
    Use with care.




+$handle *puts ?-nonewline?* 'str'+::
    Write the string, with newline unless -nonewline

+$handle *read ?-nonewline?* '?len?'+::
    Read and return bytes from the stream. To eof if no len.

+$handle *recvfrom* 'maxlen ?addrvar?'+::
................................................................................

+$handle *sendto* 'str ?addr:?port'+::
    Sends the string, +'str'+, to the given address via the socket using sendto(2).
    This is intended for udp/dgram sockets and may give an error or behave in unintended
    ways for other handle types.
    Returns the number of bytes written.

+$handle *sockopt* '?name value?'+::
    With no arguments, returns a dictionary of socket options currently set for the handle
	(will be empty for a non-socket). With +'name'+ and +'value'+, sets the socket option
	to the given value. Currently supports the following boolean socket options:
	+broadcast, debug, keepalive, nosigpipe, oobinline, tcp_nodelay+, and the following
	integer socket options: +sndbuf, rcvbuf+

+$handle *sync*+::
    Flush the stream, then fsync(2) to commit any changes to storage.
    Only available on platforms that support fsync(2).

+$handle *tell*+::
    Returns the current seek position

................................................................................
    it is ignored.

+*history getline* 'prompt ?varname?'+::
    Displays the given prompt and allows a line to be entered. Similarly to `gets`,
    if +'varname'+ is given, it receives the line and the length of the line is returned,
    or -1 on EOF. If +'varname'+ is not given, the line is returned directly.

+*history completion* 'command'+::
    Sets an autocompletion command (see `tcl::autocomplete`) that is active during `history getline`.
	If the command is empty, autocompletion is disabled.

+*history add* 'line'+::
    Adds the given line to the history buffer.

+*history save* 'filename'+::
    Saves the current history buffer to the given file.

+*history show*+::