From e5b7c01934e94d7512fc659cfa6b8a86fb4aa63b Mon Sep 17 00:00:00 2001 From: Roman Inflianskas Date: Wed, 11 Jun 2014 23:51:39 +0400 Subject: [PATCH] [dpaste] Fix hour, week, month expired snippets --- plugins/dpaste/dpaste.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/dpaste/dpaste.fish b/plugins/dpaste/dpaste.fish index a19c609..8eeed14 100644 --- a/plugins/dpaste/dpaste.fish +++ b/plugins/dpaste/dpaste.fish @@ -35,8 +35,9 @@ end function __dpaste_parse_expires set expires_spec "-t $__dpaste_expires_choises" - set expires (echo $argv | __sed "s/.*$expires_spec.*/\1/" | sed 's/hour/3600/' | sed 's/week/604800/' | sed 's/month/2592000/') + set expires (echo $argv | __sed "s/.*$expires_spec.*/\1/") if [ -z (echo $expires | __sed "s/$__dpaste_expires_choises//") ] + set expires (echo $expires | sed 's/hour/3600/' | sed 's/week/604800/' | sed 's/month/2592000/') set __dpaste_send_url "$__dpaste_send_url&expires=$expires" end echo $argv | __sed "s/$expires_spec//" | xargs