4 ms·
Oops -- I should have included my "refgrep.sh" bash script: #!/bin/bash # https://stackoverflow.com/questions/7131670/make-bash-alias-that-takes-parameter htt
by vstuart 10y ago
Oops -- I should have included my "refgrep.sh" bash script:
#!/bin/bash
# https://stackoverflow.com/questions/7131670/make-bash-alias-that-takes-parameter https://stackoverflow.com/questions/7131670/make-bash-alias-...
grep -i -A10 --color=always $1 /home/victoria/projects/shortcuts/reference | more
===========================
I should also have mentioned that with either script/alias {ref | refgrep}, partial strings are automatically searched. [I created/use the latter script because sometimes I cannot remember all of my __<entries>.]
For example, if you have two or more placemarkers that are similar (__python | __pythonpath), "ref py" will find the first one; "ref pythonp" will find the the second one ... just extend the string to be more specific, as needed ...
"refgrep <string>" will find (the first occurrence) of that string, anywhere in the "reference" file.
I use that "reference" file for everything that I might want to quickly find (literally, seconds): programming; birthdays; phone numbers; prescriptions, doctors, you-name-it.
Just pop open a terminal; search (ref <string>); read; quit terminal. :-D