From 49b830266ca14c250b8f89c4bbcccbce7d8afcde Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 10 Apr 2021 12:28:39 +0200 Subject: [PATCH] text --- client/src/cmdmain.c | 2 +- client/src/preferences.c | 66 ++++++++++++++++++++-------------------- doc/cliparser_todo.txt | 15 --------- doc/commands.md | 52 +++++++++++++++---------------- 4 files changed, 60 insertions(+), 75 deletions(-) diff --git a/client/src/cmdmain.c b/client/src/cmdmain.c index e54ee9275..94365e6d5 100644 --- a/client/src/cmdmain.c +++ b/client/src/cmdmain.c @@ -296,7 +296,7 @@ static int CmdClear(const char *Cmd) { static command_t CommandTable[] = { {"help", CmdHelp, AlwaysAvailable, "Use `" _YELLOW_(" help") "` for details of a command"}, - {"preferences", CmdPref, AlwaysAvailable, "{ Edit client/device preferences... }"}, + {"prefs", CmdPref, AlwaysAvailable, "{ Edit client/device preferences... }"}, {"--------", CmdHelp, AlwaysAvailable, "----------------------- " _CYAN_("Technology") " -----------------------"}, {"analyse", CmdAnalyse, AlwaysAvailable, "{ Analyse utils... }"}, {"data", CmdData, AlwaysAvailable, "{ Plot window / data buffer manipulation... }"}, diff --git a/client/src/preferences.c b/client/src/preferences.c index 2a9f12650..3228498f4 100644 --- a/client/src/preferences.c +++ b/client/src/preferences.c @@ -504,9 +504,9 @@ static void showBarModeState(prefShowOpt_t opt) { static int setCmdEmoji(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref set emoji ", + CLIParserInit(&ctx, "prefs set emoji ", "Set presistent preference of using emojis in the client", - "pref set emoji --alias" + "prefs set emoji --alias" ); void *argtable[] = { @@ -558,9 +558,9 @@ static int setCmdEmoji(const char *Cmd) { static int setCmdColor(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref set color ", + CLIParserInit(&ctx, "prefs set color ", "Set presistent preference of using colors in the client", - "pref set color --ansi" + "prefs set color --ansi" ); void *argtable[] = { @@ -602,9 +602,9 @@ static int setCmdColor(const char *Cmd) { static int setCmdDebug(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref set clientdebug ", + CLIParserInit(&ctx, "prefs set clientdebug ", "Set presistent preference of using clientside debug level", - "pref set clientdebug --simple" + "prefs set clientdebug --simple" ); void *argtable[] = { @@ -653,9 +653,9 @@ static int setCmdDebug(const char *Cmd) { static int setCmdDeviceDebug (const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref set devicedebug ", + CLIParserInit(&ctx, "prefs set devicedebug ", "Set presistent preference of device side debug level", - "pref set devicedebug --on" + "prefs set devicedebug --on" ); void *argtable[] = { @@ -720,9 +720,9 @@ static int setCmdDeviceDebug (const char *Cmd) static int setCmdHint(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref set hints ", + CLIParserInit(&ctx, "prefs set hints ", "Set presistent preference of showing hint messages in the client", - "pref set hints --on" + "prefs set hints --on" ); void *argtable[] = { @@ -763,9 +763,9 @@ static int setCmdHint(const char *Cmd) { static int setCmdPlotSliders(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref set plotsliders", + CLIParserInit(&ctx, "prefs set plotsliders", "Set presistent preference of showing the plotslider control in the client", - "pref set plotsliders --on" + "prefs set plotsliders --on" ); void *argtable[] = { @@ -805,10 +805,10 @@ static int setCmdPlotSliders(const char *Cmd) { static int setCmdSavePaths(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref set savepaths", + CLIParserInit(&ctx, "prefs set savepaths", "Set presistent preference of file paths in the client", - "pref set savepaths --dump /home/mydumpfolder -> all dump files will be saved into this folder\n" - "pref set savepaths --def /home/myfolder -c -> create if needed, all files will be saved into this folder" + "prefs set savepaths --dump /home/mydumpfolder -> all dump files will be saved into this folder\n" + "prefs set savepaths --def /home/myfolder -c -> create if needed, all files will be saved into this folder" ); void *argtable[] = { @@ -886,9 +886,9 @@ static int setCmdSavePaths(const char *Cmd) { static int setCmdBarMode(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref set barmode", + CLIParserInit(&ctx, "prefs set barmode", "Set presistent preference of HF/LF tune command styled output in the client", - "pref set barmode --mix" + "prefs set barmode --mix" ); void *argtable[] = { @@ -933,9 +933,9 @@ static int setCmdBarMode(const char *Cmd) { static int getCmdEmoji(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref get emoji", + CLIParserInit(&ctx, "prefs get emoji", "Get preference of using emojis in the client", - "pref get emoji" + "prefs get emoji" ); void *argtable[] = { arg_param_begin, @@ -949,9 +949,9 @@ static int getCmdEmoji(const char *Cmd) { static int getCmdHint(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref get hints", + CLIParserInit(&ctx, "prefs get hints", "Get preference of showing hint messages in the client", - "pref get hints" + "prefs get hints" ); void *argtable[] = { arg_param_begin, @@ -965,9 +965,9 @@ static int getCmdHint(const char *Cmd) { static int getCmdColor(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref get color", + CLIParserInit(&ctx, "prefs get color", "Get preference of using colors in the client", - "pref get color" + "prefs get color" ); void *argtable[] = { arg_param_begin, @@ -981,9 +981,9 @@ static int getCmdColor(const char *Cmd) { static int getCmdDebug(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref get clientdebug", + CLIParserInit(&ctx, "prefs get clientdebug", "Get preference of using clientside debug level", - "pref get clientdebug" + "prefs get clientdebug" ); void *argtable[] = { arg_param_begin, @@ -997,9 +997,9 @@ static int getCmdDebug(const char *Cmd) { static int getCmdPlotSlider(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref get plotsliders", + CLIParserInit(&ctx, "prefs get plotsliders", "Get preference of showing the plotslider control in the client", - "pref get plotsliders" + "prefs get plotsliders" ); void *argtable[] = { arg_param_begin, @@ -1013,9 +1013,9 @@ static int getCmdPlotSlider(const char *Cmd) { static int getCmdBarMode(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref get barmode", + CLIParserInit(&ctx, "prefs get barmode", "Get preference of HF/LF tune command styled output in the client", - "pref get barmode" + "prefs get barmode" ); void *argtable[] = { arg_param_begin, @@ -1029,9 +1029,9 @@ static int getCmdBarMode(const char *Cmd) { static int getCmdSavePaths(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref get savepaths", + CLIParserInit(&ctx, "prefs get savepaths", "Get preference of file paths in the client", - "pref get savepaths" + "prefs get savepaths" ); void *argtable[] = { arg_param_begin, @@ -1088,9 +1088,9 @@ static int CmdPrefSet(const char *Cmd) { static int CmdPrefShow(const char *Cmd) { CLIParserContext *ctx; - CLIParserInit(&ctx, "pref show", + CLIParserInit(&ctx, "prefs show", "Show all persistent preferences", - "pref show" + "prefs show" ); void *argtable[] = { arg_param_begin, diff --git a/doc/cliparser_todo.txt b/doc/cliparser_todo.txt index 33f0f5ef0..5904252aa 100644 --- a/doc/cliparser_todo.txt +++ b/doc/cliparser_todo.txt @@ -1,18 +1,3 @@ -preferences show -preferences get barmode -preferences get clientdebug -preferences get color -preferences get savepaths -preferences get emoji -preferences get hints -preferences get plotsliders -preferences set barmode -preferences set clientdebug -preferences set color -preferences set emoji -preferences set hints -preferences set savepaths -preferences set plotsliders hf 15 dump hf 15 info hf 15 raw diff --git a/doc/commands.md b/doc/commands.md index 8404a9b69..72a2eb1b7 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -20,45 +20,45 @@ Check column "offline" for their availability. |`exit `|Y |`Exit program` -### preferences +### prefs { Edit client/device preferences... } |command |offline |description |------- |------- |----------- -|`preferences help `|Y |`This help` -|`preferences show `|Y |`Show all preferences` +|`prefs help `|Y |`This help` +|`prefs show `|Y |`Show all preferences` -### preferences get +### prefs get { Get a preference } |command |offline |description |------- |------- |----------- -|`preferences get barmode`|Y |`Get bar mode preference` -|`preferences get clientdebug`|Y |`Get client debug level preference` -|`preferences get color `|Y |`Get color support preference` -|`preferences get savepaths`|Y |`Get file folder ` -|`preferences get emoji `|Y |`Get emoji display preference` -|`preferences get hints `|Y |`Get hint display preference` -|`preferences get plotsliders`|Y |`Get plot slider display preference` +|`prefs get barmode `|Y |`Get bar mode preference` +|`prefs get clientdebug `|Y |`Get client debug level preference` +|`prefs get color `|Y |`Get color support preference` +|`prefs get savepaths `|Y |`Get file folder ` +|`prefs get emoji `|Y |`Get emoji display preference` +|`prefs get hints `|Y |`Get hint display preference` +|`prefs get plotsliders `|Y |`Get plot slider display preference` -### preferences set +### prefs set { Set a preference } |command |offline |description |------- |------- |----------- -|`preferences set help `|Y |`This help` -|`preferences set barmode`|Y |`Set bar mode` -|`preferences set clientdebug`|Y |`Set client debug level` -|`preferences set color `|Y |`Set color support` -|`preferences set emoji `|Y |`Set emoji display` -|`preferences set hints `|Y |`Set hint display` -|`preferences set savepaths`|Y |`... to be adjusted next ... ` -|`preferences set plotsliders`|Y |`Set plot slider display` +|`prefs set help `|Y |`This help` +|`prefs set barmode `|Y |`Set bar mode` +|`prefs set clientdebug `|Y |`Set client debug level` +|`prefs set color `|Y |`Set color support` +|`prefs set emoji `|Y |`Set emoji display` +|`prefs set hints `|Y |`Set hint display` +|`prefs set savepaths `|Y |`... to be adjusted next ... ` +|`prefs set plotsliders `|Y |`Set plot slider display` ### analyse @@ -406,14 +406,14 @@ Check column "offline" for their availability. |`hf mf wipe `|N |`Wipe card to zeros and default keys/acc` |`hf mf wrbl `|N |`Write MIFARE Classic block` |`hf mf sim `|N |`Simulate MIFARE card` -|`hf mf ecfill `|N |`Fill simulator memory with help of keys from simulator` -|`hf mf eclr `|N |`Clear simulator memory` -|`hf mf egetblk `|N |`Get simulator memory block` -|`hf mf egetsc `|N |`Get simulator memory sector` -|`hf mf ekeyprn `|N |`Print keys from simulator memory` +|`hf mf ecfill `|N |`Fill emulator memory with help of keys from emulator` +|`hf mf eclr `|N |`Clear emulator memory` +|`hf mf egetblk `|N |`Get emulator memory block` +|`hf mf egetsc `|N |`Get emulator memory sector` +|`hf mf ekeyprn `|N |`Print keys from emulator memory` |`hf mf eload `|N |`Load from file emul dump` |`hf mf esave `|N |`Save to file emul dump` -|`hf mf eset `|N |`Set simulator memory block` +|`hf mf eset `|N |`Set emulator memory block` |`hf mf eview `|N |`View emul memory` |`hf mf cgetblk `|N |`Read block` |`hf mf cgetsc `|N |`Read sector`