Show More
@@ -89,6 +89,11 b' class HistoryMagics(Magics):' | |||
|
89 | 89 | get the last n lines from all sessions. Specify n as a single |
|
90 | 90 | arg, or the default is the last 10 lines. |
|
91 | 91 | """) |
|
92 | @argument( | |
|
93 | '-u', dest='unique', action='store_true', | |
|
94 | help=""" | |
|
95 | when searching history using `-g`, show only unique history. | |
|
96 | """) | |
|
92 | 97 | @argument('range', nargs='*') |
|
93 | 98 | @skip_doctest |
|
94 | 99 | @line_magic |
@@ -165,7 +170,7 b' class HistoryMagics(Magics):' | |||
|
165 | 170 | else: |
|
166 | 171 | pattern = "*" |
|
167 | 172 | hist = history_manager.search(pattern, raw=raw, output=get_output, |
|
168 | n=limit) | |
|
173 | n=limit, unique=args.unique) | |
|
169 | 174 | print_nums = True |
|
170 | 175 | elif args.limit is not _unspecified: |
|
171 | 176 | n = 10 if limit is None else limit |
General Comments 0
You need to be logged in to leave comments.
Login now