nncli

NextCloud Notes Command Line Interface
git clone git://git.danielmoch.com/nncli.git
Log | Files | Refs | LICENSE

commit fb4617e397d54130ee7f6bdd1f9a8f30fe3e8803
parent 072acbf2c4c71b09dbf3def86626f7f46e832e01
Author: lifesbest23 <goofy23.2@gmail.com>
Date:   Wed, 13 Nov 2019 12:56:48 +0100

Fixed 'nncli create' to work without any arguments

Diffstat:
Mnncli/cli.py | 2+-
Mnncli/utils.py | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/nncli/cli.py b/nncli/cli.py @@ -194,7 +194,7 @@ def json_import(nncli, from_stdin): @click.command(short_help="Add a new note.") @click.option('-t', '--title', help="Specify the title of note for create.") -@click.argument('from_stdin', metavar='[-]', type=STDIN_FLAG) +@click.argument('from_stdin', metavar='[-]', type=STDIN_FLAG, required=False) @click.pass_obj def create(nncli, title, from_stdin): """ diff --git a/nncli/utils.py b/nncli/utils.py @@ -41,8 +41,9 @@ def exec_cmd_on_note(note, config, gui, logger, cmd=None, raw=False): ) fname = temp.tempfile_name(tfile) + + focus_position = 0 if config.state.do_gui: - focus_position = 0 try: focus_position = gui.gui_body_get().focus_position except IndexError: