fprettify icon indicating copy to clipboard operation
fprettify copied to clipboard

Recursive flag does not work when input is a single file

Open justsz opened this issue 3 years ago • 2 comments
trafficstars

fprettify -r $X works if X is a directory but not if X is a file.

justsz avatar Sep 29 '22 13:09 justsz

How do you define a recursion on a file, compared to a recursion in a folder with sub folders? Say you have a folder example on your desktop, organized with a sub folder as in

~/Desktop$ tree ./example/
./example/
├── a.f90
├── b.f90
└── sub
    └── c.f90

1 directory, 3 files

Then, either a) run

~/Desktop$ fprettify ./example/*.f90

to work only in folder example excluding sub folders and their files like c.f90. Or b) use

~/Desktop$ fprettify -r ./example

which equally considers sub folders of folder example and processes their contents (i.e. including file c.f90)

nbehrnd avatar Sep 29 '22 14:09 nbehrnd

I would say that "recursion on a file" just returns that one file. That's how, e.g. find example/a.f90 -name "*.f90" behaves.

justsz avatar Sep 30 '22 10:09 justsz