diff --git a/gash/word.scm b/gash/word.scm index 3dbe9fc..8dc30aa 100644 --- a/gash/word.scm +++ b/gash/word.scm @@ -37,6 +37,16 @@ ;;; ;;; Code: +(cond-expand + (mes + ;; We need to sort the results of 'scandir' when globbing, so we + ;; monkey patch Mes' 'scandir' to do so. + (let ((core:scandir scandir)) + (set! scandir + (lambda (name select?) + (sort (core:scandir name select?) string<))))) + (else)) + (define (normalize-word word) "Normalize @var{word} (which may be a word or a qword) so that it is guaranteed to be a list."