Skip to content

Commit 337c583

Browse files
committed
fix --list with globbing
1 parent b406adf commit 337c583

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

fpm/src/fpm.f90

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ subroutine cmd_run(settings,test)
318318
endif
319319
endif
320320

321-
call compact_list()
321+
call compact_list_all()
322322

323323
if(line.eq.'.' .or. line.eq.' ')then ! do not report these special strings
324324
stop
@@ -348,7 +348,7 @@ subroutine cmd_run(settings,test)
348348
end do
349349
endif
350350
contains
351-
subroutine compact_list()
351+
subroutine compact_list_all()
352352
integer, parameter :: LINE_WIDTH = 80
353353
integer :: i, j, nCol
354354
j = 1
@@ -373,6 +373,20 @@ subroutine compact_list()
373373
end if
374374
end do
375375
write(stderr,*)
376+
end subroutine compact_list_all
377+
378+
subroutine compact_list()
379+
integer, parameter :: LINE_WIDTH = 80
380+
integer :: i, j, nCol
381+
j = 1
382+
nCol = LINE_WIDTH/col_width
383+
write(stderr,*) 'Matched names:'
384+
do i=1,size(executables)
385+
write(stderr,'(A)',advance=(merge("yes","no ",modulo(j,nCol)==0))) &
386+
& [character(len=col_width) :: basename(executables(i)%s)]
387+
j = j + 1
388+
enddo
389+
write(stderr,*)
376390
end subroutine compact_list
377391

378392
end subroutine cmd_run

0 commit comments

Comments
 (0)