Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit flag to read from standard input #242

Merged
merged 7 commits into from
Jul 13, 2022

Commits on Jul 11, 2022

  1. Add explicit flag to read from standard input

    Fixes bug introduced in zk-org#240 where interactive use of `zk new` results
    in the command sitting indefinitely for user to supply user input.
    
    This change introduces an explicit flag to `new` to indicate standard
    input should be read for the content of the note.  The flag is called
    `-i` on `--input`.
    
    The flag name is somewhat confusing as there is a `--no-input` flag at
    the global level.  I propose that we change that flag name to
    `--no-prompt` as it more accurately describes the option.  To maintain
    backwards compatibility, we define `--no-input` as an alias.
    pkazmier committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    c4ed7c0 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2022

  1. Remove alias for no-input

    Apparently, kong `aliases` are only for commands. It did not work as I
    had expected. At this point, `--no-input` has been removed. If we want
    to keep it for backwards compatibility, I suppose we could add a new
    hidden command line arg called `--no-input`. I defer to you for your
    thoughts.
    pkazmier committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    e2b9225 View commit details
    Browse the repository at this point in the history
  2. Revert "Remove alias for no-input"

    This reverts commit e2b9225.
    pkazmier committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    3eb9353 View commit details
    Browse the repository at this point in the history
  3. Revert "Add explicit flag to read from standard input"

    This reverts commit c4ed7c0.
    pkazmier committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    781fd29 View commit details
    Browse the repository at this point in the history
  4. Add --interactive flag to zk new

    This option instructs the `new` command to read the initial contents of
    the note from standard input.  This allows the use to pipe or use shell
    redirection with note creation:
    
    ```sh
    $ zk new --interactive < file.txt
    $ echo "Initial content" | zk new --interactive
    ```
    pkazmier committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    a3b04da View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. Configuration menu
    Copy the full SHA
    78c7044 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG

    mickael-menu committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    ff70097 View commit details
    Browse the repository at this point in the history