1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

add / to the section names in :list (fixes #73, fixes #77)

This commit is contained in:
Igor Chubin
2018-07-19 08:57:39 +00:00
parent 0bc55dfe99
commit e0fd79de4d
+1 -1
View File
@@ -95,7 +95,7 @@ def _isdir(topic):
return os.path.isdir(topic)
def _get_answers_and_dirs():
topics = glob.glob(PATH_CHEAT_SHEETS + "*")
answer_dirs = [_remove_initial_underscore(os.path.split(topic)[1])
answer_dirs = [_remove_initial_underscore(os.path.split(topic)[1]).rstrip('/')+'/'
for topic in topics if _isdir(topic)]
answers = [os.path.split(topic)[1] for topic in topics if not _isdir(topic)]
return answer_dirs, answers