diff options
author | Oskar <[email protected]> | 2024-07-22 11:14:23 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-07-22 11:14:23 +0200 |
commit | ee58eda2d353f709f48619bbdb244e6744d3c32b (patch) | |
tree | 82dc2198e6362882790156dea1a7094790ae5dff /trashsys.c | |
parent | 2205410121527c37da4f59a3031c5ab06cdeda08 (diff) |
not related to -R implementation but id say its about time i make the usage
Diffstat (limited to 'trashsys.c')
-rw-r--r-- | trashsys.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -13,7 +13,23 @@ #include <dirent.h> #include <stdarg.h> -#define USAGE "to be decided" +#define USAGE "tsr [-vt] [-y][-n][-f][-a][-l][-L][-c][-C][-h][-R id] [FILE]\n" +#define LONG_USAGE "tsr [options] filename\n"\ + "\n"\ + "OPTIONS:\n"\ + " -v Verbose mode, not recommended.\n"\ + " -t /tmp mode. tsr will use /tmp instead of the user's $HOME\n"\ + " -y Answer 'yes' when pressing return on all [Y / N] prompts.\n"\ + " -n Answer 'no' when pressing return on all [Y / N] prompts.\n"\ + " -f Force answer 'yes' on all [Y / N] prompts. Prompt will not show.\n"\ + " -a Always ask with a [Y / N] prompt.\n"\ + " -l List all trashed files.\n"\ + " -L List all trashed files with more details.\n"\ + " -c Clear all trashed files that are older than the configured time limit.\n"\ + " -C Clear all trashed files regardless of age. Will prompt with a [Y / N] prompt.\n"\ + " -h Display this help message.\n"\ + " -R id Restore a file by ID. Use -l or -L to find the ID associated with the file.\n"\ + "\n" #define MODE_NORMAL -1 #define MODE_YES 0 #define MODE_NO 1 @@ -24,6 +40,7 @@ #define FUNCTION_SUCCESS 0 #define REM_SZ(remsz, final) (remsz - strlen(final)) #define USAGE_OUT(stream) (fprintf(stream, "%s", USAGE)) +#define USAGE_OUT_L(stream) (fprintf(stream, "%s", LONG_USAGE)) bool v_cvm_fprintf = false; int choice_mode = MODE_NORMAL; @@ -947,7 +964,7 @@ int main (int argc, char *argv[]) { break; case 'h': - USAGE_OUT(stdout); + USAGE_OUT_L(stdout); return EXIT_SUCCESS; break; } |