Commit graph

1251 commits

Author SHA1 Message Date
Martin Lund
68e2042fd6 Update man page 2024-05-07 09:12:15 +02:00
Martin Lund
b490233988 Fix build on older GNU/Linux systems without statx 2024-05-05 21:02:28 +02:00
Martin Lund
c2ef2fced5 Add codefactor.io shield 2024-05-04 14:07:55 +02:00
Martin Lund
3a75b098d1 Add new build shields to README 2024-05-04 13:35:40 +02:00
Martin Lund
242a2ea843 Fix line ending in --list output 2024-05-04 13:16:28 +02:00
Martin Lund
ce736c267a Update README 2024-05-03 18:25:17 +02:00
Martin Lund
c88cd3c5f3 Print location of configuratin file in --list output 2024-05-03 18:23:53 +02:00
Martin Lund
59940b3311 Update README 2024-05-03 15:45:39 +02:00
Martin Lund
05785e82b3 Update README 2024-05-03 15:39:52 +02:00
Martin Lund
50253a6a77 Update README 2024-05-03 15:36:53 +02:00
Martin Lund
13f3bedb2f Update README 2024-05-03 15:31:05 +02:00
Martin Lund
6310a9fabc Fix alignment of profile listing 2024-05-03 15:26:55 +02:00
Martin Lund
eb087713a4 Update README 2024-05-03 15:26:11 +02:00
Martin Lund
3e81f36dce Update version date 2024-05-03 14:20:57 +02:00
Martin Lund
fe4e47219e Update NEWS 2024-05-03 14:18:03 +02:00
Martin Lund
ec8f63f06d Improve --list feature on non-linux platform 2024-05-03 14:12:47 +02:00
Martin Lund
5ec33f5d4d Update doc 2024-05-03 11:57:26 +02:00
Martin Lund
adafa00b87 Update NEWS 2024-05-03 11:38:00 +02:00
Martin Lund
31647a934c List available profiles in --list output 2024-05-03 11:35:48 +02:00
Martin Lund
e9c96c5456 Update NEWS 2024-05-03 10:47:01 +02:00
Martin Lund
3b3fca2e8b Always message when saving log file 2024-05-03 10:45:49 +02:00
Martin Lund
a53a4f44de Update NEWS 2024-05-03 10:36:14 +02:00
Martin Lund
60caede5dd Add support for using TID as device in config file 2024-05-03 10:32:33 +02:00
Martin Lund
eae7f8f8d7 Update NEWS 2024-05-03 10:02:44 +02:00
Martin Lund
04dfa682c9 Fix use of invalid flag with regexec() 2024-05-03 09:19:21 +02:00
Martin Lund
62a4a93dec Fix potential buffer overflow in match_and_replace() 2024-05-03 08:39:58 +02:00
Martin Lund
7aa2d3fee2 Fix profile autocompletion 2024-05-03 02:12:12 +02:00
Martin Lund
22bcfdc29f Remove inih dependency from CI builds 2024-05-02 23:44:26 +02:00
Martin Lund
0e9dbcbc77 Replace use of stat() with fstat()
For better security.
2024-05-02 22:30:47 +02:00
Martin Lund
68c78222e1 Fix hexN output mode 2024-05-02 21:50:48 +02:00
Martin Lund
22b4f451ea Update pattern matching example 2024-05-02 20:42:10 +02:00
Martin Lund
15ba034ce5 Fix submenu response when invalid key hit 2024-05-02 19:38:14 +02:00
Martin Lund
17bb6edfd2 Bump version 2024-05-02 18:52:52 +02:00
Martin Lund
65c5a068d8 Replace inih with glib key file parser
After including the use of glib we might as well replace inih
with the glib key file parser.

All configuraiton file parsing has been reworked and also the options
parsing has been cleaned up, resulting in better and stricter
configuration file and option value checks.

Compared to old, configuration files now requires any default
configurations to be put in a group/section named [default].

Configuration file keywords such as "enable", "disable", "on",
"off", "yes", "no", "0", "1" have been retired. Now only "true" and
"false" apply to boolean configuration options. This is done to simplify
things and avoid any confusion.

The pattern option feature has been reworked so now the user can now
access the full match string and any matching subexpression using the
%mN syntax.

For example:

[usb devices]
pattern = usb([0-9]*)
device = /dev/ttyUSB%m1

Then when using tio:
$ tio usb12

   %m0 = 'usb12'  // Full match string
   %m1 = 12       // First match subexpression

Which results in device = /dev/ttyUSB12
2024-05-02 18:35:37 +02:00
Martin Lund
68d3b845b2 Remove CircleCI
Replaced with github workflow CI.
2024-04-30 13:40:07 +02:00
Martin Lund
22f030ebb8 Add github workflow for Ubuntu build 2024-04-30 13:35:46 +02:00
Rui Chen
f5703ff107 remove verbose for meson install and use system glib and pkg-config
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-04-30 10:02:19 +02:00
Rui Chen
3b77eb35cf fix: add build patch for FNM_EXTMATCH
run into the following build failure

```
cc -Isrc/tio.p -Isrc -I../src -I/opt/homebrew/Cellar/glib/2.80.0_2/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.80.0_2/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre2/10.43/include -I/opt/homebrew/Cellar/inih/58/include -I/opt/homebrew/include/lua -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -std=gnu99 -O3 -Wno-unused-result -DHAVE_IOSSIOSPEED -MD -MQ src/tio.p/misc.c.o -MF src/tio.p/misc.c.o.d -o src/tio.p/misc.c.o -c ../src/misc.c
../src/misc.c:201:38: error: use of undeclared identifier 'FNM_EXTMATCH'
        if (fnmatch(pattern, string, FNM_EXTMATCH) == 0)
                                     ^
1 error generated.
```

Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-04-30 10:02:19 +02:00
Rui Chen
054326454b feat: add macos workflow
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-04-30 10:02:19 +02:00
Rui Chen
b763f1289b fix: add macos build patch for fs_get_creation_time
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-04-29 20:21:51 +02:00
Martin Lund
8ead9337d1 Enable extended pattern matching
So that the exclude options can also work as include using special
pattern syntax.

For example, to only include /dev/ttyUSB* devices simply do:

$ tio --exclude-devices=!(/dev/ttyUSB*) --list

See the man page of fnmatch() for all available extended pattern
options.
2024-04-29 19:36:44 +02:00
Martin Lund
d8fb141bc4 Update lua read() description 2024-04-29 16:47:00 +02:00
Martin Lund
a698799a7d Update man page 2024-04-29 16:22:01 +02:00
Martin Lund
5e3722a10e Update man page 2024-04-29 16:09:37 +02:00
Martin Lund
c16a2a1f94 Update README 2024-04-29 16:05:14 +02:00
Martin Lund
e2960c3f82 Update README 2024-04-29 16:00:12 +02:00
Martin Lund
08404e700f Update NEWS 2024-04-29 15:48:00 +02:00
Martin Lund
6d77201ba0 Simplify lua line manipulation API
Collapses lua high(), low(), toggle(), config_high(), config_low(),
config_apply() into one simple function:

set{<line>=<state>, ...}

Line can be any of DTR, RTS, CTS, DSR, CD, RI.

State is high, low, or toggle.

Example:
script = set{DTR=high, RTS=low}; msleep(100); set{DTR=low, RTS=high}; msleep(100); set{RTS=low}

Notice the use of {} instad of () when calling the set function. This is
required to pass parameters by name in lua.
2024-04-29 15:20:53 +02:00
Martin Lund
eef0a15194 Unshadow variable 2024-04-29 01:49:44 +02:00
Martin Lund
6895c05321 Update README 2024-04-28 18:23:08 +02:00