aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvg <vgm+dev@devys.org>2024-04-04 17:28:37 +0200
committervg <vgm+dev@devys.org>2024-04-04 17:28:37 +0200
commitaa255fd04883c009948e47508b4121ff1fb3e6f5 (patch)
tree728b6f355e77d4875d99be3c18a695a314c643e0
parentb0234b0947e0bc0a6b46721631df0e2f83043df9 (diff)
downloadscripts-aa255fd04883c009948e47508b4121ff1fb3e6f5.tar.gz
scripts-aa255fd04883c009948e47508b4121ff1fb3e6f5.tar.bz2
scripts-aa255fd04883c009948e47508b4121ff1fb3e6f5.zip
modify fancy-sleep target display
-rwxr-xr-xscripts/fancy_sleep.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/fancy_sleep.py b/scripts/fancy_sleep.py
index 5839a32..a87b33c 100755
--- a/scripts/fancy_sleep.py
+++ b/scripts/fancy_sleep.py
@@ -20,6 +20,7 @@ Usage: fancy-sleep [options] TIME [--] [COMMAND...]
Options:
-h, --help Display this help message
+ --target Enable the display of the target time
'''
@@ -227,8 +228,9 @@ def main():
print('ERROR: TIME is unparsable or equals to 0', file=sys.stderr)
sys.exit(1)
- print('Launched at:', curtime.strftime('%F %T'))
- print('Run until:', target_time.strftime('%F %T'))
+ #print('Launched at:', curtime.strftime('%F %T'))
+ if args['--target']:
+ print('Run until:', target_time.strftime('%F %T'))
sys.stdout.flush()
try: