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

Fix recursive preview (show file path) #126

Merged
merged 1 commit into from May 8, 2021
Merged

Fix recursive preview (show file path) #126

merged 1 commit into from May 8, 2021

Conversation

Linus789
Copy link
Contributor

@Linus789 Linus789 commented May 7, 2021

Unfortunately, I introduced with my last commit 7d73f9f some unwanted behaviour (sorry). If you wanted to see the preview for multiple files (e. g. recursive mode), it only printed the contents and you could not differentiate between the files.

With this commit, the file path is printed when you use the preview for more than one file. Also, a new line is now printed at the end of the file contents (only for the preview), so that something like this won’t happen: content_of_file_before----- FILE ./some_path.txt -----

Some examples of the current behaviour:
Contents of the files e.txt and f.txt are both:

ffffff
$ sd -p  "f" "a" f.txt 
aaaaaa
$
$ sd -p  "f" "a" e.txt f.txt 
----- FILE e.txt -----
aaaaaa
----- FILE f.txt -----
aaaaaa
$

@chmln chmln merged commit 4ccc522 into chmln:master May 8, 2021
@Linus789 Linus789 deleted the fix_recursive_preview branch May 8, 2021 22:54
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

Successfully merging this pull request may close these issues.

None yet

2 participants