butzel
b377984b59
suggestion for socat
...
butzel's suggestions for a socat cheatsheet
2019-01-25 12:46:01 +01:00
Chris Lane
e319332138
Issue #414 - snap package compatibility
...
PR #391 changed the locaton into which system-wide cheatsheets are
installed to `/usr/share/cheat`, in order to comply with FHS. However,
this is causing conflicts with the `snap` packaging process.
This commit removes hard-coded references to `/usr/share/cheat` (outside
of `config/cheat`), and instead reads the cheat path via the
`CHEAT_PATH` config value (which may be set either in `cheat/config`, or
exported as an environment variable).
Lastly, this commit makes `setup.py` "aware of" the `CHEAT_PATH` env
var, allowing us to specify to where sytem-wide cheatsheets should be
installed during the `snap` build.
2019-01-21 12:58:03 -05:00
Chris Lane
13c0ea7525
Addressing issue #372
...
Previous pull-requests #406 and #413 attempted to resolve #372 . They
were, however, never merged in.
Given that #391 was just merged (which rewrites a significant amount of
prior code), I here took what we learned from #406 and #413 and
re-implemented it. This approach will be less error-prone than
attempting to rebase either of the former on the changes introduced in
#391 .
2019-01-18 14:50:00 -05:00
Tomas Korbar
80b8cfc06b
Add new env variables but hold compatibility with old ones
...
Legacy environmental variables like CHEATCOLORS are now higher in
configuration hiearchy than new environmental variables in
configuration files
2019-01-18 18:03:15 +01:00
Tomas Korbar
8a8f30679d
Fix problems with CHEATCOLORS behaviour
2019-01-17 17:10:01 +01:00
Tomas Korbar
4d19505b79
Conform code to pep8
2019-01-15 19:38:24 +01:00
Tomas Korbar
a2e028fd19
Move validation of CHEAT_HIGHLIGHT value to Configuration class
...
Method _check_configuration should be used for validating all bad
values from now on
2019-01-15 19:21:33 +01:00
Tomas Korbar
5eec6bf040
Improve handling of settings
...
Constructors of classes which need direct access to configuration
now take Config class instance as parameter which will give them
better maintainability in the future
CHEAT_HIGHLIGHT has been added to Configuration class
2019-01-15 19:13:30 +01:00
Tomas Korbar
879a58b721
Read env vars for global and local config path
...
- allows to change these paths for testing purposes and also
gives user option to change his config paths
2019-01-15 17:09:39 +01:00
Tomas Korbar
7814de96d2
Add classes for better readability
2019-01-15 17:09:39 +01:00
Tomas Korbar
a651426075
Add reading settings from configuration file
2019-01-15 17:09:35 +01:00
Tomas Korbar
c4c935a6a5
Change default location of cheatsheets
2019-01-15 16:48:07 +01:00
Chris Lane
60b05c8781
Created a `snap` cheatsheet
2019-01-11 17:18:02 -05:00
Chris Lane
22b64d2d08
Merge branch 'master' of https://github.com/liuyang1/cheat into liuyang1-master
...
Resolving merge-conflicts.
2019-01-11 17:00:39 -05:00
Chris Lane
730c488854
Introduced CHEAT_HIGHLIGHT
...
Introduced CHEAT_HIGHLIGHT environment variable to de-couple search-term
highlighting from syntax highlighting.
2019-01-11 16:13:38 -05:00
Chris Lane
ba9051e3cd
`highlight` bug-fix
...
Fixed a bug in `cheat/utils.py` that would cause `highlight` to return
the wrong value when `CHEATCOLORS` was not set.
2019-01-11 15:58:21 -05:00
Chris Lane
7c7278ac8b
Util logic simplification
...
- Simplified the logic regarding checking the state of `CHEATCOLORS` in
`cheat/utils.py`
- Improved the commenting within the same
2019-01-11 15:54:20 -05:00
Chris Lane
e1fdca231e
Merged #353 with changes
...
PR #353 implemented highlighting on search terms within search results.
This PR:
- Merges the above
- Makes a few modifications upon the implementation
Specifically, the new implementation no longer relies on hard-coded
escape-sequences. Instead, a new `highlight` function has been created,
which in turn attempts to defer to the `termcolors` library to colorize
the necessary text.
2019-01-11 15:46:54 -05:00
Chris Allen Lane
2b58300d84
Merge pull request #404 from gorshkov/master
...
Fix url in curl cheatsheet
2019-01-11 14:20:18 -05:00
Chris Allen Lane
bf1be86fb9
Merge pull request #402 from FlorianKempenich/master
...
Add cheatsheet for `scd`
2019-01-11 14:19:22 -05:00
Chris Allen Lane
35c4a8d639
Merge pull request #403 from sundar-raman/master
...
Disable colorized output when CHEATCOLORS is not "true", or not set
2019-01-11 14:13:21 -05:00
Chris Allen Lane
ea7e71b002
Merge pull request #407 from idarlund/patch-2
...
Update ssh
2019-01-11 14:04:11 -05:00
Chris Allen Lane
d576eef13b
Merge pull request #408 from idarlund/patch-3
...
Update scp
2019-01-11 14:03:31 -05:00
Martin Darmüntzel
f0b3f8037b
Fixed a typo.
2019-01-09 15:47:49 +01:00
Idar Lund
3938032595
Update scp
...
scp over socks
2019-01-08 08:24:16 +01:00
Idar Lund
f35cfa084e
Update ssh
...
added ssh over socks tunnel
2019-01-08 08:19:09 +01:00
Evgeny
cdb22f310d
Fix url in curl cheatsheet
2018-12-19 21:11:54 +07:00
Sundar Raman
6d1eff16a1
Disable colorized output when CHEATCOLORS is not "true", or not set
2018-11-11 13:04:51 +08:00
Florian Kempenich
9241de04d6
Update formatting to adhere to the guideline.
2018-10-25 11:37:39 +01:00
Florian Kempenich
8ac1851a69
Add cheatsheet for `scd`
...
`scd` is a fantastic `oh-my-zsh` plugin to quickly jump between directories.
See here: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/scd
2018-10-25 11:34:25 +01:00
Chris Allen Lane
15f70c2cc3
Merge pull request #401 from tculp/case-insensitive-search
...
Added a .lower() call to line when searching
2018-10-16 10:43:30 -04:00
tculp
cebe3de389
Update sheets.py
...
Added a missing .lower() to the line
2018-10-15 12:21:52 -04:00
Chris Allen Lane
500dbbbd4a
Merge pull request #399 from tculp/case-insensitive-search
...
Changed search behavior to lower the search term and the lines being …
2018-10-15 10:44:57 -04:00
Chris Allen Lane
66ebae4ed5
Merge pull request #398 from ticky/patch-1
...
Add `tee /dev/tty` mid-pipeline example to tee
2018-10-09 11:22:43 -04:00
Shadab Zafar
62a2bf3c2d
Update pacman
2018-10-01 12:34:46 +05:30
Tyler Culp
4b6dc22c0a
Changed search behavior to lower the search term and the lines being searched, thus providing case-insensitive search
2018-09-20 13:53:22 -04:00
Jessica Stokes
cd46559250
Add `tee /dev/tty` mid-pipeline example to tee
2018-09-19 17:53:19 -07:00
Chris Allen Lane
03fb44159a
Merge pull request #394 from davidrea/patch-1
...
Add strikethrough to formatting
2018-09-17 09:33:35 -04:00
Chris Allen Lane
f0bd3ba4e6
Merge pull request #393 from mirekfranc/for-loop-extended
...
for: add few more for examples, the last two are probably bash specific
2018-09-17 09:32:48 -04:00
Erik Terpstra
2fcc808e63
Added insert/add line examples
...
Added insert/add line examples.
2018-09-11 09:22:21 +02:00
Dave Rea
4aef22f457
Add strikethrough to formatting
...
(this is the one I always forget!)
2018-09-04 10:13:55 -04:00
Miroslav Franc
146b671412
add few more for examples, the last two are probably bash specific
2018-09-03 15:54:56 +02:00
Chris Allen Lane
feab7a9706
Merge pull request #387 from idarlund/patch-1
...
Update rsync
2018-08-20 12:40:36 -04:00
Chris Allen Lane
a5b0132b08
Merge pull request #385 from dsalaj/master
...
Add cheatsheet slurm
2018-08-20 12:21:10 -04:00
Chris Allen Lane
ce1f4a099c
Merge pull request #386 from navarroaxel/lsblk
...
Add cheatsheet for lsblk
2018-08-20 12:16:34 -04:00
Chris Allen Lane
0e84cae79e
Merge pull request #374 from bu6hunt3r/devel
...
Added sheet for r2 disassembler/debugger/hex editor
2018-08-20 12:14:16 -04:00
Chris Allen Lane
93180c3852
Merge pull request #375 from shigemk2/zip
...
Added one more zip cheat
2018-08-20 11:50:27 -04:00
Chris Lane
795bcaffcb
Merge branch 'master' of https://github.com/gigovich/cheat into gigovich-master
2018-08-20 11:40:34 -04:00
Chris Allen Lane
d6f12c4397
Merge pull request #373 from kevinawoo/patch-1
...
new cheat for mv: moving many files into a dir
2018-08-20 11:37:14 -04:00
Chris Allen Lane
8ccc8bd546
Merge pull request #388 from pondrejk/patch-1
...
minor typo in nmcli command name
2018-08-20 10:48:43 -04:00
Chris Allen Lane
c29a3dfdc1
Merge pull request #368 from cedric-dufour/master
...
New Sheet Added: ZFS (on Linux)
2018-08-20 10:45:46 -04:00
bu6hunt3r
7e94f1e0ba
Changed mutt cheatsheet
2018-08-16 09:50:47 +02:00
Peter Ondrejka
ff1227bca8
minor typo in command name
2018-07-24 10:05:25 +02:00
Axel Navarro
b0aa272b49
Add cheatsheet for lsblk
2018-07-12 07:03:34 -03:00
idarlund
130cf1d830
Update rsync
...
added rsync over ssh cheat
2018-07-11 14:56:55 +02:00
Darjan Salaj
f93ca8f7ce
Add cheatsheet slurm
2018-07-04 23:04:18 +02:00
liuyang1
c0fe871b33
fix except case
...
- when redirect stdout to pipe but not tty, it throw exception.
- when have no content, it throw exception.
- remove reductant newline at end of file
2018-06-13 18:58:37 +08:00
bu6hunt3r
b210fbca5f
Changed r2 cheatsheet
2018-06-05 16:25:39 +02:00
bu6hunt3r
45c0dad364
Changed r2 cheatsheet
2018-05-22 09:37:17 +02:00
Givi Khojanashvili
544d11aebc
Add nmcli import example. Fix typos in `nmcli add` command.
2018-03-12 13:17:22 +03:00
bu6hunt3r
51f7a42ece
Started mutt mail client ch-sh
2018-03-09 18:26:10 +01:00
Michihito Shigemura
cd6826d5d4
Added one more zip cheat
2018-03-08 20:39:41 +09:00
bu6hunt3r
c09f0b0c6c
Added sheet for r2 disassembler/debugger/hex editor
2018-03-04 20:30:27 +01:00
Kevin Woo
3fe72a03cc
new cheat for mv: moving many files into a dir
2018-02-04 18:57:25 -08:00
Cédric DUFOUR
0c0d924df6
New Sheet Added: ZFS (on Linux)
2017-12-24 16:33:37 +01:00
Chris Allen Lane
d09353bfca
Merge pull request #363 from shigemk2/shigemk2-patch-1
...
Add cheatsheet perl
2017-12-19 12:38:25 -05:00
Chris Allen Lane
81e80c87a1
Merge pull request #358 from byxor/emacs
...
Add cheat for running emacs in terminal
2017-12-19 12:37:04 -05:00
Chris Allen Lane
3d498d5ce7
Merge pull request #354 from rognan/add-cheat-for-youtube-dl-extract-audio
...
Add cheat for downloading audio with youtube-dl
2017-12-19 12:35:11 -05:00
Chris Allen Lane
d90d509702
Merge pull request #365 from shigemk2/check_function_mysql
...
Add cheatsheet for mysql
2017-12-19 12:34:05 -05:00
Chris Allen Lane
b46f5b2c34
Merge pull request #359 from Dgc2002/master
...
Adds cheatsheet for rcs
2017-12-19 12:33:01 -05:00
Chris Lane
e2d63e7603
Minor edits to #357
2017-12-19 12:29:52 -05:00
Chris Lane
67f52f8317
Merge branch 'patch-1' of https://github.com/zrongh90/cheat into zrongh90-patch-1
2017-12-19 12:29:26 -05:00
Chris Allen Lane
67134b9240
Merge pull request #360 from nitsnatsnok/patch-1
...
sizes and typo corrected
2017-12-19 12:27:29 -05:00
Chris Lane
c67adb1422
Minor edits to #367 .
2017-12-19 12:25:40 -05:00
Chris Lane
c2aa5e0148
Merge branch 'master' of https://github.com/Sim4n6/cheat into Sim4n6-master
2017-12-19 12:24:19 -05:00
iamatacos
b303bc0028
added support for Got-Your-Back for backup from Gmail
2017-12-14 15:38:08 +00:00
Astaroth
9c53e2ba10
improved command to export query result to csv file
2017-12-05 15:44:49 -03:00
Michihito Shigemura
71680c6586
Add cheatsheet for mysql
...
check stored procedure or stored function in mysql
2017-11-28 22:12:20 +09:00
Navjot Singh
cde64e3ea4
Cheatsheet for cd
2017-11-27 11:52:05 +05:30
Michihito Shigemura
0b0bc441c6
Add cheatsheet perl
2017-11-20 21:20:22 +09:00
Chris Allen Lane
2aa37432cb
Merge pull request #356 from shigemk2/xargs-no-run-if-empty
...
Add cheatsheet for xargs --no-run-if-empty
2017-11-19 08:13:07 -05:00
Chris Allen Lane
89de3705b0
Merge pull request #355 from shigemk2/curl-only-status-code
...
Add cheatsheet for cp backup file with date
2017-11-19 08:11:35 -05:00
Chris Lane
d12718b8c4
`cp` edit
...
Appended missing newline to end of `cp` cheatsheet.
2017-11-19 08:09:37 -05:00
nitsnatsnok
837e0b5b71
sizes and typo corrected
...
`-size +20000k` actually matches files bigger than 20,000*1,024=20,480,000 Bytes, not 20,000,000 Bytes as in “2 Megabytes”.
2017-11-12 00:50:30 +01:00
Dave Clarke
30d2a77a6c
Adds cheatsheet for rcs
2017-11-02 11:53:08 -05:00
byxor
1a8cdf84f4
Add instructions for running emacs in terminal
2017-11-01 16:16:49 +00:00
zrongh90
181403e7ac
create iconv
...
add new iconv for code convert
2017-10-31 16:00:16 +08:00
Michihito Shigemura
2c10955690
Add cheatsheet for xargs --no-run-if-empty
2017-10-27 00:12:36 +09:00
Michihito Shigemura
4319b8e699
Add curl cheatsheet: Get only the HTTP status code
...
curl -o /dev/null -w '%{http_code}\n' -s -I URL
2017-10-24 22:23:36 +09:00
Thor Andreas Rognan
57dff86a44
Add cheat for downloading audio with youtube-dl
2017-10-13 14:37:07 +02:00
sunyakun
761bf2eb2f
hightlight the search keywords
2017-10-12 09:25:20 +08:00
Michihito Shigemura
aa4f6daf77
Add cheatsheet for cp backup file with date
2017-10-04 23:47:33 +09:00
Chris Allen Lane
cdf573a725
Merge pull request #318 from shanahanjrs/new-misc-cheatsheets
...
Created cheatsheets for alias, cat, cp, export, kill, mv, pwd, and wc
2017-09-16 23:01:08 -04:00
ALJI Mohamed
f8d2ce516e
Update dd
...
There is a small error in this sample :
**bs=BYTES** --> read and write up to BYTES bytes at a time
**count=N** --> copy only N input blocks
just inverse please
2017-09-16 22:04:10 +01:00
shanahanjrs
e5bf9146fe
Fixed cheat sheets to conform to the standard style more closely
2017-09-12 23:11:38 -04:00
Chris Lane
866eb68d64
emacs cheatsheet
...
Minor whitespace edits on the emacs cheatsheet.
2017-09-05 13:26:23 -04:00
Chris Lane
ed2ef113f0
Merge branch 'emacs' of git://github.com/ndebuhr/cheat into ndebuhr-emacs
2017-09-05 13:19:19 -04:00
Chris Allen Lane
432379d1e6
Merge pull request #336 from yafp/master
...
Adding a first version of a pkill cheatsheet
2017-09-04 20:06:23 -04:00
Chris Allen Lane
7089bef7cc
Merge pull request #337 from VHarisop/pip_latest
...
Updated pip sheet with upgrade for newer versions
2017-09-04 20:04:25 -04:00
Chris Lane
aa57371819
Trivial whitespace changes to `pgrep` cheatsheet.
2017-09-04 20:01:25 -04:00