linenoise.c 2.2026.1 → 2.2026.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -17
- package/linenoise/linenoise.c +1762 -1762
- package/linenoise/linenoise.h +114 -114
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Send feedbacks to antirez at gmail
|
|
|
62
62
|
|
|
63
63
|
Run:
|
|
64
64
|
|
|
65
|
-
```
|
|
65
|
+
```bash
|
|
66
66
|
$ npm i linenoise.c
|
|
67
67
|
```
|
|
68
68
|
|
|
@@ -70,32 +70,23 @@ And then include `linenoise.h` as follows:
|
|
|
70
70
|
|
|
71
71
|
```c
|
|
72
72
|
// main.c
|
|
73
|
-
#include
|
|
73
|
+
#include <linenoise.h>
|
|
74
74
|
|
|
75
75
|
int main() { /* ... */ }
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
Finally, compile while adding the path `node_modules/linenoise.c` to your compiler's include paths.
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
$ clang main.c # or, use gcc
|
|
82
|
-
$ gcc main.c
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
You may also use a simpler approach:
|
|
86
|
-
|
|
87
|
-
```c
|
|
88
|
-
// main.c
|
|
89
|
-
#include <linenoise.h>
|
|
90
|
-
|
|
91
|
-
int main() { /* ... */ }
|
|
81
|
+
$ clang -I./node_modules/linenoise.c main.c # or, use gcc
|
|
82
|
+
$ gcc -I./node_modules/linenoise.c main.c
|
|
92
83
|
```
|
|
93
84
|
|
|
94
|
-
|
|
85
|
+
You may also use a simpler approach with the [cpoach](https://www.npmjs.com/package/cpoach.sh) tool, which automatically adds the necessary include paths of all the installed dependencies for your project.
|
|
95
86
|
|
|
96
87
|
```bash
|
|
97
|
-
$ clang
|
|
98
|
-
$ gcc
|
|
88
|
+
$ cpoach clang main.c # or, use gcc
|
|
89
|
+
$ cpoach gcc main.c
|
|
99
90
|
```
|
|
100
91
|
|
|
101
92
|
|
|
@@ -425,6 +416,7 @@ This approach tests linenoise as users actually experience it, catching renderin
|
|
|
425
416
|
<br>
|
|
426
417
|
|
|
427
418
|
|
|
419
|
+
[](https://wolfram77.github.io)<br>
|
|
428
420
|
[](https://github.com/antirez/linenoise)
|
|
429
421
|
[](https://nodef.github.io)
|
|
430
422
|

|