Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Add support for backspace key
Browse files Browse the repository at this point in the history
  • Loading branch information
mrunix00 committed Mar 26, 2023
1 parent e36a6b4 commit d968e4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ read_command() {
if (ferror(stdin)) {
fprintf(stderr, "[-] Failed reading stdin: %s\n", strerror(errno));
return NULL;
} else if (c == '\b') {
if (i > 0) i--;
} else if (c == '\\') {
c = getchar();
if (c == '\n') continue;
Expand Down

0 comments on commit d968e4e

Please sign in to comment.