You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to extend the behavior of the program in the following ways:
The search should also include multiple terms (Feature 1);
When you search a phrase in the dotfiles using the new context option (example: -x), the search should include the comments associated (Feature 2);
Shell variable interpolation in the search output, if variable exists and if using a new option (example: -n) (Feature 3);
Any entry shoud have an ID (Autoadded during the search phase), so you can execute easily the command using a new option (example: -r) (Feature 4).
Example of dotfiles.
cat tar
# To create an uncompressed archive:
tar -cvf /path/to/foo.tar /path/to/foo/
# To extract an uncompressed archive:
tar -xvf /path/to/foo.tar
cat my_tar
# To extract an archive.# Tag: archive, extract
tar xf ${ARCHIVE_1}# To extract an archive, verbose output.# Tag: archive, extract
tar xvf ${ARCHIVE_2}
Example of search command
Set variable for shell variable interpolation ARCHIVE_1='myfile.tar'
so, calls cheat program: cheat -n -x tar extract
Expected output:
# To extract an uncompressed archive:# ID: 143
tar -xvf /path/to/foo.tar
# Extracts an archive.# Tag: archive, extract# ID: 151
tar xf myfile.tar
# Extracts an archive, verbose output.# Tag: archive, extract# ID: 152
tar xvf ${ARCHIVE_2}
Note:
Dynamic ID appears in the output. The ID doesn't change if the search context (tag and loading path) remains the same;
Shell variable interpolarion is performed using variable defined previously.
Example of run command
To recall and execute a cheat: cheat -r 151
Workaround
I wrote a small Python3 script to accomplish the described operations (Features 1 and 2), but it's dirty, without color, etc... It would be better if integrated into official Python and GO projects following the business logic of official projects.
I propose to extend the behavior of the program in the following ways:
Example of dotfiles.
cat tar
cat my_tar
Example of search command
Set variable for shell variable interpolation
ARCHIVE_1='myfile.tar'
so, calls cheat program:
cheat -n -x tar extract
Expected output:
Note:
Example of run command
To recall and execute a cheat:
cheat -r 151
Workaround
I wrote a small Python3 script to accomplish the described operations (Features 1 and 2), but it's dirty, without color, etc... It would be better if integrated into official Python and GO projects following the business logic of official projects.
cat cs.py
The text was updated successfully, but these errors were encountered: