From 5084c3d947026c4b2033f281b7b5e0ee7cf99d58 Mon Sep 17 00:00:00 2001 From: Sergey Veneckiy Date: Tue, 11 Jun 2024 14:21:32 +0400 Subject: [PATCH] docs: Update README and --help option to show tab key functionality --- Readme.md | 2 +- handle_arguments.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Readme.md b/Readme.md index 44e5833..46bb617 100644 --- a/Readme.md +++ b/Readme.md @@ -25,7 +25,7 @@ Flex your math muscles with uc (Unix Calculator)'s ability to handle up to 30+di 🌋 Quick Result Recall! 🔙 -Messed up? Just hit the up arrow and uc (Unix Calculator) retrieves your last result faster than a lightning strike! ⚡ +Messed up? Just hit the up arrow and uc (Unix Calculator) retrieves your last result faster than a lightning strike! Press key to insert your previous result to expression! ⚡ 🌋 Chain Calculations! ⚡ diff --git a/handle_arguments.c b/handle_arguments.c index 81fbadf..092ba48 100644 --- a/handle_arguments.c +++ b/handle_arguments.c @@ -17,6 +17,16 @@ void print_help() { printf(" -v, --version Print the version information and exit.\n"); printf(" -h, --help Print this help message and exit.\n"); printf("\n"); + printf("Commands:\n"); + printf(" > tab (Add to Expression field previous result)\n"); + printf("\n"); + printf(" > e (Switch to Exponent calculation mode)\n"); + printf(" Enter Base: 2\n"); + printf(" Enter Exponent: 8\n"); + printf(" 256\n"); + printf("\n"); + printf(" > q (Exit)\n"); + printf("\n"); printf("Examples:\n"); printf(" > 20 000 + 5\n"); printf(" 20 005\n"); @@ -27,14 +37,6 @@ void print_help() { printf(" > 800 000 / 7\n"); printf(" 114 285.7143\n"); printf("\n"); - printf(" > e\n"); - printf(" Enter Base: 2\n"); - printf(" Enter Exponent: 8\n"); - printf(" 256\n"); - printf("\n"); - printf(" > q\n"); - printf(" exit\n"); - } void handle_arguments(int argc, char *argv[]) {