Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive flag does not work when input is a single file #139

Open
justsz opened this issue Sep 29, 2022 · 2 comments
Open

Recursive flag does not work when input is a single file #139

justsz opened this issue Sep 29, 2022 · 2 comments

Comments

@justsz
Copy link

justsz commented Sep 29, 2022

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

@nbehrnd
Copy link

nbehrnd commented Sep 29, 2022

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)

@justsz
Copy link
Author

justsz commented Sep 30, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants