mirror of
https://github.com/cheat/cheat.git
synced 2025-09-04 19:18:29 +02:00
Merge branch 'zsh_completions' of https://github.com/a-sk/cheat into a-sk-zsh_completions
* 'zsh_completions' of https://github.com/a-sk/cheat: Install zsh completions Add zsh cheats completions Add -d/--cheat_directories option to list directories containing cheatsheets
This commit is contained in:
6
cheat
6
cheat
@ -122,7 +122,11 @@ def main():
|
||||
|
||||
# create/edit option
|
||||
option = sys.argv[1].lower()
|
||||
if option in ['-e', '--edit', '-c', '--create']:
|
||||
if option in ['-e', '--edit', '-c', '--create', '-d', '--cheat_directories']:
|
||||
# list cheat directories and exit
|
||||
if option in ['-d', '--cheat_directories']:
|
||||
print(' '.join(cheat_directories()))
|
||||
exit()
|
||||
# make sure EDITOR environment variable is set and that at least 3 arguments
|
||||
# are given
|
||||
if 'EDITOR' not in os.environ:
|
||||
|
Reference in New Issue
Block a user