Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alcover/lacy
compile/run for the lazy
https://github.com/alcover/lacy
c compile linux
Last synced: 3 months ago
JSON representation
compile/run for the lazy
- Host: GitHub
- URL: https://github.com/alcover/lacy
- Owner: alcover
- License: mit
- Created: 2020-06-19T22:04:27.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-10T16:08:38.000Z (over 4 years ago)
- Last Synced: 2024-05-15T13:40:47.808Z (6 months ago)
- Topics: c, compile, linux
- Language: Shell
- Homepage:
- Size: 46.9 KB
- Stars: 82
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![logo](assets/logo.png)
# lacy - *Compile/run for the lazy*
(Linux only)
Want to test a few lines of C ?
Normally you'd have to :
- create `test.c`
- write headers `#include #include ...`
- write entry-point `int main (int argc ...) {}`
- write your code
- save
- finally run `gcc test.c -Wall -Wbar && ./a.out`Forgot a header ? To link math (`-lm`) ?
Bad luck... Now you have to edit `test.c`...No such hassle with **lacy** :
```
$ lacy
int i = pow(2,8);
printf ("%d\n", i);
[CTRL+D]
256
```
**lacy** can also run files.
`$ lacy hello.c`If your code has no `main()`, **lacy** adds classic headers and puts your statements into `main()`.
## Usage
#### File :
```
$ lacy hello.c
Hello!
```#### File + arguments :
```
$ lacy hello.c Bob
Hello Bob!
```#### Pipe :
```
$ cat hello.c | lacy
Hello!
```#### Prompt :
```
$ lacy
printf ("%s\n", "Hello!");
[CTRL+D]
Hello!
```#### Inline :
```
$ lacy 'printf ("%s\n", "Hello!");'
Hello!
```#### Print template :
`$ lacy > new_project.c` (gets you a fresh all-included source)## Options
`$ lacy -h` (help)
`$ lacy -v` (version)