Skip to content

Commit

Permalink
Fixing a bug in the describe command I found while doing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pfuntner committed May 20, 2024
1 parent d55fbf7 commit bee075c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/json-shell
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ class CmdProcessor(cmd.Cmd):
description += ' is a '
target = curr_node() if key is None else curr_node()[key]
description += target.__class__.__name__
description += f' with {len(target)} elements'
if is_list_or_dict(target):
description += f' with {len(target)} elements'
print(description)

def complete_describe(self, text, line, start_index, end_index):
Expand Down
35 changes: 35 additions & 0 deletions doc/json-shell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# `template`

## Purpose
This is a template. Please fill in the details and rock on.

## Syntax
```
Syntax: template [--verbose] arg ...
```
### Positional arguments
| Argument | Description | Default |
| ------ | ----------- | ------- |
| `arg1` | Description | Default |


### Options
| Option | Description | Default |
| ------ | ----------- | ------- |
| `-v` | Enable verbose debugging | Debugging is not enabled |

## Example

<img alt="Under Construction" height="133" src="images/under-construction.jpg" title="Coming Soon" width="200"/>
<br><a href="https://www.freepik.com/free-vector/coming-soon-construction-yellow-background-design_8562867.htm#query=work%20in%20progress&position=49&from_view=keyword&track=ais">Image by starline</a> on Freepik

```
$ template
This is a template. Please fill in the details and rock on.
$
```

## Notes

- This is a template. Please fill in the details and rock on.
- This is a template. Please fill in the details and rock on.

0 comments on commit bee075c

Please sign in to comment.