X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=click%2Futil.scm;h=8a4f771676e14e985772e1d08c8af37cc3c95e62;hb=27b4e1f5bfac39323bdff089aac094b8e98b0258;hp=4fc80bad05526d47a2a0f8ed22dc02e7ef3d27fe;hpb=a2c12dede99c0d296194699e025a2e541c8a98a0;p=guile-click.git diff --git a/click/util.scm b/click/util.scm index 4fc80ba..8a4f771 100644 --- a/click/util.scm +++ b/click/util.scm @@ -18,14 +18,15 @@ (define-module (click util) + #:use-module (ice-9 getopt-long) #:use-module (ice-9 readline) #:use-module (click constant) #:export (getopt-long-option-spec - option-default-value option-property program-name %program-name)) + (define %program-name (make-fluid "guile")) (define (program-name) (fluid-ref %program-name)) @@ -44,13 +45,3 @@ (if property (cadr property) default))) - -(define* (option-default-value option #:optional (no-prompt #f)) - "Get default value for option, asking user if prompt property is set" - (let ((default (option-property option 'default))) - (if (not default) - (let ((prompt (option-property option 'prompt))) - (if prompt - (readline (format #f "~a: " prompt)) - default)) - default)))