-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from kellyjonbrazil/dev
v1.6.0
- Loading branch information
Showing
7 changed files
with
146 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
_jtbl() | ||
{ | ||
OPTIONS=(--cols -c --csv -d --dokuwiki -f --fancy -h --help -H --html -m --markdown -n --no-wrap -q --quiet -r --rotate -t --truncate -v --version) | ||
MOD_OPTIONS=(--cols -n --no-wrap -q --quiet -t --truncate) | ||
|
||
COMPREPLY=() | ||
_get_comp_words_by_ref cur prev words cword | ||
|
||
if [ "${#words[@]}" != "2" ]; then | ||
COMPREPLY=($(compgen -W "${MOD_OPTIONS[*]}" -- "${cur}")) | ||
return 0 | ||
else | ||
COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "${cur}")) | ||
return 0 | ||
fi | ||
} && | ||
complete -F _jtbl jtbl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#compdef jtbl | ||
|
||
_jtbl() { | ||
jtbl_options_describe=( | ||
'--cols:manually configure the terminal width' | ||
'-c:CSV table output' | ||
'--csv:CSV table output' | ||
'-d:DokuWiki table output' | ||
'--dokuwiki:DokuWiki table output' | ||
'-f:fancy table output' | ||
'--fancy:fancy table output' | ||
'-h:help' | ||
'--help:help' | ||
'-H:HTML table output' | ||
'--html:HTML table output' | ||
'-m:markdown table output' | ||
'--markdown:markdown table output' | ||
'-n:do not try to wrap if too wide for the terminal' | ||
'--no-wrap:do not try to wrap if too wide for the terminal' | ||
"-q:quiet - don't print error messages" | ||
"--quiet:quiet - don't print error messages" | ||
'-r:rotate table output' | ||
'--rotate:rotate table output' | ||
'-t:truncate data if too wide for the terminal' | ||
'--truncate:truncate data if too wide for the terminal' | ||
'-v:version info' | ||
'--version:version info' | ||
) | ||
|
||
_describe 'commands' jtbl_options_describe | ||
return 0 | ||
} | ||
|
||
_jtbl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name='jtbl', | ||
version='1.5.3', | ||
version='1.6.0', | ||
author='Kelly Brazil', | ||
author_email='[email protected]', | ||
description='A simple cli tool to print JSON and JSON Lines data as a table in the terminal.', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters