summaryrefslogtreecommitdiff
path: root/src/commands/printf.c
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-05-02 14:43:47 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-05-02 14:43:47 -0400
commitf6e64afaeebe575b02cc89cc050b8664d3eb5b4f (patch)
tree0cde05b68d259b3056daa62c1d2eb6e734143390 /src/commands/printf.c
parenttac, ls fixes (diff)
downloadlazysphere-f6e64afaeebe575b02cc89cc050b8664d3eb5b4f.tar.gz
lazysphere-f6e64afaeebe575b02cc89cc050b8664d3eb5b4f.tar.bz2
lazysphere-f6e64afaeebe575b02cc89cc050b8664d3eb5b4f.zip
add more escape codes to printf
Diffstat (limited to 'src/commands/printf.c')
-rw-r--r--src/commands/printf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/commands/printf.c b/src/commands/printf.c
index fd08aa8..4663a86 100644
--- a/src/commands/printf.c
+++ b/src/commands/printf.c
@@ -72,6 +72,19 @@ static void handle_slash(char n) {
case 'b':
putchar('\b');
break;
+ case 'f':
+ putchar('\f');
+ break;
+ case 'e':
+ putchar('\e');
+ case 'a':
+ putchar('\a');
+ break;
+ case '"':
+ putchar('"');
+ break;
+ case 'c':
+ exit(EXIT_SUCCESS);
default:
putchar('\\');
putchar(n);