Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
b602e0a0
Unverified
Commit
b602e0a0
authored
Feb 27, 2023
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(aliases): fix regression in filter argument
parent
f42c965d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cheatsheet.py
plugins/aliases/cheatsheet.py
+3
-3
No files found.
plugins/aliases/cheatsheet.py
View file @
b602e0a0
...
@@ -51,9 +51,9 @@ def pretty_print(cheatsheet, wfilter, group_list=None, groups_only=False):
...
@@ -51,9 +51,9 @@ def pretty_print(cheatsheet, wfilter, group_list=None, groups_only=False):
continue
continue
aliases
=
cheatsheet
.
get
(
key
)
aliases
=
cheatsheet
.
get
(
key
)
if
not
wfilter
:
if
not
wfilter
:
pretty_print_group
(
key
,
aliases
,
only_groupname
=
groups_only
)
pretty_print_group
(
key
,
aliases
,
wfilter
,
groups_only
)
else
:
else
:
pretty_print_group
(
key
,
[
alias
for
alias
in
aliases
if
wfilter
in
alias
[
0
]
or
wfilter
in
alias
[
1
]
],
wfilter
)
pretty_print_group
(
key
,
[
alias
for
alias
in
aliases
if
alias
[
0
]
.
find
(
wfilter
)
>-
1
or
alias
[
1
]
.
find
(
wfilter
)
>-
1
],
wfilter
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
(
description
=
"Pretty print aliases."
,
prog
=
"acs"
)
parser
=
argparse
.
ArgumentParser
(
description
=
"Pretty print aliases."
,
prog
=
"acs"
)
...
@@ -64,5 +64,5 @@ if __name__ == '__main__':
...
@@ -64,5 +64,5 @@ if __name__ == '__main__':
lines
=
sys
.
stdin
.
readlines
()
lines
=
sys
.
stdin
.
readlines
()
group_list
=
args
.
group_list
or
None
group_list
=
args
.
group_list
or
None
wfilter
=
" "
.
join
(
args
.
filter
[
1
:])
if
args
.
filter
else
None
wfilter
=
" "
.
join
(
args
.
filter
)
or
None
pretty_print
(
cheatsheet
(
lines
),
wfilter
,
group_list
,
args
.
groups_only
)
pretty_print
(
cheatsheet
(
lines
),
wfilter
,
group_list
,
args
.
groups_only
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment