Compare commits

...

21 Commits

Author SHA1 Message Date
Chris Lane
7209f2c929 docopt
Made revisions to the content of the docopt template.
2017-02-27 23:09:51 -05:00
Chris Lane
068d117bef patch version bump. 2017-02-27 23:02:23 -05:00
Chris Lane
9ead66461d Resolving merge conflict. 2017-02-27 23:01:30 -05:00
Chris Allen Lane
d00bd87dd1 Merge pull request #312 from shanahanjrs/feature-cheat-cheat
Added a cheatsheet for cheat itself
2017-02-27 19:36:45 -05:00
Chris Allen Lane
dd8b20a17a Merge pull request #317 from shanahanjrs/fix-7z-typo
Fixed typo in 7z cheatsheet
2017-02-27 19:29:58 -05:00
Chris Allen Lane
84e42e7f2f Merge pull request #314 from shanahanjrs/pushd-popd
Added cheatsheets for pushd and popd commands
2017-02-27 19:29:12 -05:00
Chris Allen Lane
a59e91ead7 Merge pull request #320 from tupaschoal/master
Add cheatsheet for hg, shutdown, su
2017-02-27 19:26:58 -05:00
Tulio Leao
f495a4dfd9 Add cheatsheet for su
Useful for running commands as another user.
2017-02-16 01:25:24 -02:00
Tulio Leao
10dd0e9a8b Add cheatsheet for shutdown
Adding help for shutdown, useful for rebooting the system,
2017-02-16 01:22:45 -02:00
Tulio Leao
d06e5bab6f Add cheatsheet for hg
Mercurial is extensively used as a version control system, as an option to Git, so I'm adding its cheatsheet.
2017-02-16 00:04:18 -02:00
shanahanjrs
75b2555710 Fixed typo in 7z cheatsheet 2017-01-25 18:52:25 -05:00
shanahanjrs
632da2024a Added cheatsheets for pushd and popd commands 2017-01-08 17:11:51 -05:00
shanahanjrs
1baa6d39c0 Added a cheatsheet for cheat itself 2017-01-01 22:44:48 -05:00
Shadab Zafar
8f2912e5da Fix grammar of lsof 2016-11-27 08:43:37 -05:00
Shadab Zafar
3139796524 Update lsof sheet 2016-11-27 08:43:37 -05:00
Morgan Courbet
bcd4563bf3 Add npm cheatsheet 2016-11-27 08:43:37 -05:00
rahul
5cd5387a47 Add cheery-pick to git cheat 2016-11-27 08:43:37 -05:00
rahul
c8f0e6295b Add revert in git cheat 2016-11-27 08:43:37 -05:00
rahul
31e442d7f9 Add git stash cheat 2016-11-27 08:43:37 -05:00
Chris Lane
352a760561 README edit
Modified the README with regards to the environment variable changes
made in #294.
2016-10-01 14:08:58 -04:00
Chris Lane
6be87e2d42 cheat now honors CHEAT_EDITOR and VISUAL environment variables in
addition to `EDITOR`.
2016-10-01 13:55:50 -04:00
9 changed files with 70 additions and 15 deletions

View File

@@ -2,6 +2,8 @@
"""cheat
Create and view cheatsheets on the command line.
Usage:
cheat <cheatsheet>
cheat -e <cheatsheet>
@@ -10,24 +12,26 @@ Usage:
cheat -d
cheat -v
cheat allows you to create and view interactive cheatsheets on the
command-line. It was designed to help remind *nix system
administrators of options for commands that they use frequently,
but not frequently enough to remember.
Examples:
To look up 'tar':
cheat tar
To create or edit the cheatsheet for 'foo':
cheat -e foo
Options:
-d --directories List directories on CHEATPATH
-e --edit Edit cheatsheet
-l --list List cheatsheets
-s --search Search cheatsheets for <keyword>
-v --version Print the version number
Examples:
To view the `tar` cheatsheet:
cheat tar
To edit (or create) the `foo` cheatsheet:
cheat -e foo
To list all available cheatsheets:
cheat -l
To search for "ssh" among all cheatsheets:
cheat -s ssh
"""
# require the dependencies
@@ -38,7 +42,7 @@ from docopt import docopt
if __name__ == '__main__':
# parse the command-line options
options = docopt(__doc__, version='cheat 2.1.27')
options = docopt(__doc__, version='cheat 2.1.28')
# list directories
if options['--directories']:

View File

@@ -11,7 +11,7 @@ u update
x extract with full paths
Example:
7z a -t7z -m0-lzma -mx=9 -mfb=64 -md=32m -ms=on archive.7z dir1
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on archive.7z dir1
-t7z 7z archive
-m0=lzma lzma method

14
cheat/cheatsheets/cheat Normal file
View File

@@ -0,0 +1,14 @@
# To see example usage of a program:
cheat <command>
# To edit a cheatsheet
cheat -e <command>
# To list available cheatsheets
cheat -l
# To search available cheatsheets
cheat -s <command>
# To get the current `cheat' version
cheat -v

20
cheat/cheatsheets/hg Normal file
View File

@@ -0,0 +1,20 @@
# Clone a directory
hg clone
# Add files to hg tracker
hg add filename
# Add all files in a folder to hg tracker
hg add folder/
# Create a commit with all tracked changes and a message
hg commit -m "message"
# Push commits to source repository
hg push
# Pull changes from source repository
hg pull
# Rebase local commits to disambiguate with remote repository
hg pull --rebase

2
cheat/cheatsheets/popd Normal file
View File

@@ -0,0 +1,2 @@
# Returns to the directory at the top of the `pushd' stack
popd

5
cheat/cheatsheets/pushd Normal file
View File

@@ -0,0 +1,5 @@
# Pushes your current directory to the top of a stack while changing to the specified directory
pushd <directory>
# To return use popd
popd

View File

@@ -0,0 +1,8 @@
# Reboot the system immediately
shutdown -r now
# Shut system down immediately
shutdown -h now
# Reboot system after 5 minutes
shutdown -r +5

2
cheat/cheatsheets/su Normal file
View File

@@ -0,0 +1,2 @@
# Switch to another user account
su USERNAME

View File

@@ -3,7 +3,7 @@ import os
setup(
name = 'cheat',
version = '2.1.27',
version = '2.1.28',
author = 'Chris Lane',
author_email = 'chris@chris-allen-lane.com',
license = 'GPL3',