(for-each (curry interpret-input skipped-file-list modified-file-list) (parse-input input))
#f))
-(define (interactive-prompt skipped-file-list modified-file-list)
+(define (display-files skipped-file-list modified-file-list)
(displayln "Skipped Files:")
(for-each displayln (format-numbered-list skipped-file-list))
(displayln "Modified Files:")
- (for-each displayln (format-numbered-list modified-file-list))
+ (for-each displayln (format-numbered-list modified-file-list)))
+
+(define (interactive-prompt skipped-file-list modified-file-list)
+ (display-files skipped-file-list modified-file-list)
(displayln "Enter 's' or 'n' followed by a file number to skip or unskip a file respectively.")
(displayln "e.g. 's3 n12' skips the third file under Modified Files then unskips the twelfth file under Skipped Files.")
(displayln "Enter a blank line to quit.")
#f))
#| Programs |#
-(define (program-display-skipped-files)
- (displayln "Skipped Files:")
- (for-each displayln (skipped-files)))
+(define (program-display-file-status) (display-files (skipped-files) (modified-files)))
(define (program-skip-file file)
(displayln (format "Skipping file: '~a'" file))
(skip-file file)
- (program-display-skipped-files))
+ (program-display-file-status))
(define (program-no-skip-file file)
(displayln (format "Unskipping file: '~a'" file))
(no-skip-file file)
- (program-display-skipped-files))
+ (program-display-file-status))
(define (program-no-skip-all)
(displayln "Unskipping every file")
(no-skip-all)
- (program-display-skipped-files))
+ (program-display-file-status))
(define (program-skip-modified)
(displayln "Skipping every modified file")
(skip-modified)
- (program-display-skipped-files))
+ (program-display-file-status))
(define (program-interactive)
(displayln "Interactive mode")
(command-line
#:once-any
(("-i" "--interactive") "Interactive mode" (program-interactive))
- (("-l" "--list") "View skipped files" (program-display-skipped-files))
+ (("-l" "--list") "View skipped and modified file status" (program-display-file-status))
(("-s" "--skip") file "Skip single file" (program-skip-file file))
(("-n" "--no-skip") file "Unskip single file" (program-no-skip-file file))
(("-p" "--no-skip-all") "Unskip every file" (program-no-skip-all))