From 0d94438442439af31a8fc078c88acb8b542b5f70 Mon Sep 17 00:00:00 2001 From: Silas Kraume Date: Wed, 21 Feb 2024 00:18:03 +0100 Subject: [PATCH] fix examples and docs --- ARGUMENTS.md | 12 ++++++------ README.md | 2 +- cat_win/cat.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ARGUMENTS.md b/ARGUMENTS.md index 52cd4429..38445268 100644 --- a/ARGUMENTS.md +++ b/ARGUMENTS.md @@ -452,7 +452,7 @@ Using this Argument allows to pass in Data via the Stdin Stream. The Stdin Pipe will be handled as its own File. ```console -> echo Hello World! | catw -in +> echo Hello World! | catw - -n 1) Hello World! ``` @@ -468,7 +468,7 @@ Line 2 Line 3 ``` ```console -> catw test.txt | catw -io +> catw test.txt | catw - -o Line 1 ``` @@ -670,7 +670,7 @@ This Parameter will be used before most other Arguments such that other Paramete This means a Base64 encoded Input is expected and neccessary. ```console -> echo SGVsbG8gV29ybGQ= | catw -i --b64d +> echo SGVsbG8gV29ybGQ= | catw - --b64d Hello World ``` @@ -680,7 +680,7 @@ Encodes a given Text in Base64. This Parameter will be used after most other Arguments such that other Parameter will be used on the plain Text beforehand. ```console -> echo Hello World | catw -i --b64e +> echo Hello World | catw - --b64e SGVsbG8gV29ybGQ= ``` @@ -694,11 +694,11 @@ In the uppercase Variant of the Parameter any non-mathematical Text will be stri On Error The Expression will evaluate to '???'. ```console -> echo Calculate: (5 * 0x10 * -0b101) % (0o5 ** 2) ! | catw -i --eval +> echo Calculate: (5 * 0x10 * -0b101) % (0o5 ** 2) ! | catw - --eval Calculate: 0 ! ``` ```console -> echo Calculate: (5 * 0x10 * -0b101) % (0o5 ** 2) ! | catw -i --EVAL +> echo Calculate: (5 * 0x10 * -0b101) % (0o5 ** 2) ! | catw - --EVAL 0 ``` diff --git a/README.md b/README.md index 19b742e0..9079176f 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ Read about specific **Arguments & Options** [here](https://github.com/SilenZcien ```py -$ echo "Hello World :)" | catw -i [6:] | catw -i [::-1] -ln +$ echo "Hello World :)" | catw - [6:] | catw - [::-1] -ln > 1) [8] ): dlroW ``` diff --git a/cat_win/cat.py b/cat_win/cat.py index 6f904f9f..2cbee8da 100644 --- a/cat_win/cat.py +++ b/cat_win/cat.py @@ -598,7 +598,7 @@ def print_file(content: list) -> bool: if found_sth: try: - # fails when using -i mode, because the stdin will send en EOF char + # fails when using --stdin mode, because the stdin will send en EOF char # to input without prompting the user input() except (EOFError, UnicodeDecodeError): @@ -672,7 +672,7 @@ def edit_content(content: list, show_bytecode: bool, file_index: int = 0, # if the content of the file is empty, we check if maybe the file is its own pipe-target. # an indicator would be if the file has just been modified to be empty (by the shell). # also the stdout cannot be atty. - # checking if the file is an _unknown_file is not valid, because by using '-i' + # checking if the file is an _unknown_file is not valid, because by using '--stdin' # the stdin will be used to write the file file_mtime = get_file_mtime(holder.files[file_index].path) date_nowtime = datetime.timestamp(datetime.now())