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

Added and option to hide the executed command in notifications #135

Merged
merged 1 commit into from Jan 26, 2017

Conversation

AndrewGuenther
Copy link
Contributor

Fixes #134

@AndrewGuenther
Copy link
Contributor Author

Since the documentation seems a bit spread through the README and some of the options look like they aren't documented I figured I would wait and defer to @dschep for what to do there

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 87.413% when pulling 8765fc5 on AndrewGuenther:hide-command into 8f4aa87 on dschep:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 87.413% when pulling 8765fc5 on AndrewGuenther:hide-command into 8f4aa87 on dschep:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 87.413% when pulling 8765fc5 on AndrewGuenther:hide-command into 8f4aa87 on dschep:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 87.413% when pulling 8765fc5 on AndrewGuenther:hide-command into 8f4aa87 on dschep:master.

@dschep
Copy link
Owner

dschep commented Jan 26, 2017

Looks great. yeah.. i generally need to improve the docs.

@AndrewGuenther
Copy link
Contributor Author

Cool, is there anything you want me to do on my end or are we good to merge?

@dschep
Copy link
Owner

dschep commented Jan 26, 2017

Nope 👍

@dschep dschep merged commit 18fa9f9 into dschep:master Jan 26, 2017
@AndrewGuenther AndrewGuenther deleted the hide-command branch January 26, 2017 17:43
@jungle-boogie
Copy link
Contributor

It looks like this is merged but I don't see any new help tags on how to use it:

 ntfy
usage: ntfy [-h] [-c CONFIG] [-b BACKEND] [-o key value]
            [-l {CRITICAL,ERROR,WARNING,INFO,DEBUG}] [-v] [-q] [--version]
            [-t TITLE]
            {send,done,shell-integration} ...

Send push notification when command finishes

positional arguments:
  {send,done,shell-integration}
    send                send a notification
    done                run a command and send a notification when done
    shell-integration   automatically get notifications when long running
                        commands finish

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        config file to use (default:
                        /home/sean/.config/ntfy/ntfy.yml)
  -b BACKEND, --backend BACKEND
                        override backend specified in config
  -o key value, --option key value
                        backend specific options
  -l {CRITICAL,ERROR,WARNING,INFO,DEBUG}, --log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG}
                        Specify the how verbose CLI output is (default:
                        WARNING)
  -v, --verbose         a shortcut for --log-level=DEBUG
  -q, --quiet           a shortcut for --log-level=CRITICAL
  --version             show program's version number and exit
  -t TITLE, --title TITLE
% ntfy --version
2.4.2

is the flag hidden?

@dschep
Copy link
Owner

dschep commented Jan 31, 2017

@jungle-boogie, it's a flag of ntfy done:

$ ntfy done -h
usage: ntfy done [-h] [-L N] [-b] [--formatter command retcode duration] [-o]
                 [-e] [-H]
                 ...

positional arguments:
  command               command to run

optional arguments:
  -h, --help            show this help message and exit
  -L N, --longer-than N
                        Only notify if the command runs longer than N seconds
  -b, --background-only
                        Only notify if shell isn't in the foreground
  --formatter command retcode duration
                        Format and send cmd, retcode & duration instead of
                        running command. Used internally by shell-integration
  -o, --stdout          Capture and send standard output
  -e, --stderr          Capture and send standard error
  -H, --hide-command    Do not display the executed command in any
                        notifications

Also, it's only in master, not released yet (tho I think you run off master iirc)

@jungle-boogie
Copy link
Contributor

jungle-boogie commented Feb 1, 2017

could you please remind me how I can get trunk?
I did this:
cloned repo
sudo pip3 install -U .

and

cloned repo
sudo python3 setup.py install

Thanks!

@AndrewGuenther
Copy link
Contributor Author

I installed via:

sudo pip install git+https://github.com/dschep/ntfy.git@18fa9f92842417ad8e35aae7cb6f780e03646925

Which is the SHA at tip of master right now. Works fine for me and the option properly shows up in the help.

@dschep
Copy link
Owner

dschep commented Feb 1, 2017

All three of those options should work :)

@jungle-boogie
Copy link
Contributor

thanks for the help. I've got it now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants