CEPL:(1)

πŸ“¦ version 32.1.0, in arch rolling

πŸŽ€ CEPL:(1) β€” User Commands πŸŽ€

πŸ’– NAME πŸ’–

cepl β€” a C and C++ REPL πŸ’…

πŸ›°οΈ SYNOPSIS πŸ›°οΈ

cepl [-hpvw] [-a<out.s>] [-c<compiler>] [-e<code to evaluate>] [-l<library>] [-I<include directory>] [-L<library directory>] [-s<standard>] [-o<out.c>]

πŸ’– DESCRIPTION πŸ’–

A readline C and C++ REPL with history, tab-completion, and undo. It’s giving β€œterminal main character” energy, no cap. 🫢

🌸 USAGE 🌸

Okay so the following environment variables are respected: CFLAGS, LDFLAGS, LDLIBS, and LIBS. ✨

Command history is read from and saved to ~/.cepl_history. πŸŽ€

To switch between C/C++ modes, specify your C or C++ compiler with -c, such as:

cepl -cg++ -lboost_filesystem -lboost_context -lboost_system

to run in C++ mode linking against Boost and compiling with g++, or:

cepl -cclang -lelf

to run in C mode linking against libelf and compiling with clang. πŸ¦‹

When the -l flag is passed, the library argument is scanned for symbols which are then added to readline completion. πŸ‘‘

πŸ’… OPTIONS πŸ’…

Command line options, coming in hot:

  • -a, --asm β€” Name of file to output assembly to.
  • -c, --compiler β€” Specify alternate compiler.
  • -e, --eval β€” Evaluate argument as C/C++ code.
  • -h, --help β€” Show help/usage information.
  • -o, --output β€” Name of the file to output C/C++ code to.
  • -p, --parse β€” Disable addition of dynamic library symbols to readline completion.
  • -s, --std β€” Specify which C/C++ standard to use.
  • -v, --version β€” Show version information.
  • -w, --warnings β€” Compile with -Wall -Wextra -pedantic flags.
  • -l β€” Link against specified library (flag can be repeated).
  • -I β€” Search directory for header files (flag can be repeated).
  • -L β€” Search directory for libraries (flag can be repeated).

πŸ¦‹ COMMANDS πŸ¦‹

Lines prefixed with a ; are interpreted as commands ([] text is optional). Bestie, here’s the command menu:

  • ;f[unction] β€” Line is defined outside of main() (e.g. ;f #define SWAP2(X) ((((X) >> 8) & 0xff) | (((X) & 0xff) << 8))).
  • ;h[elp] β€” Show help.
  • ;m[an] β€” Show manpage for argument (e.g. ;m strpbrk).
  • ;q[uit] β€” Exit CEPL.
  • ;r[eset] β€” Reset CEPL to its initial program state.
  • ;u[ndo] β€” Incremental undo (can be repeated).

πŸ“ NOTES πŸ“

Please direct any bug/issue reports, as well as any feature requests, to <https://github.com/alyptik/cepl>. 🫢

πŸ‘‘ AUTHORS πŸ‘‘

  • Joey Pabalinas β€” <joeypabalinas@gmail.com.com> πŸ’–

cepl-32.1.0 Β· July 2024 β€” bestie out, go write some C/C++ πŸ’…βœ¨

πŸ“¦ where this page comes from