[dpaste] Fix hour, week, month expired snippets

This commit is contained in:
Roman Inflianskas 2014-06-11 23:51:39 +04:00 committed by Bruno Pinto
parent 668849a9c3
commit e5b7c01934

View File

@ -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