Skip to content

Also check .lessignore for absolute file names, resolved with realpath#207

Open
g-v-egidy wants to merge 1 commit into
wofr06:lesspipefrom
g-v-egidy:lessignore-realpath
Open

Also check .lessignore for absolute file names, resolved with realpath#207
g-v-egidy wants to merge 1 commit into
wofr06:lesspipefrom
g-v-egidy:lessignore-realpath

Conversation

@g-v-egidy

Copy link
Copy Markdown

Before this patch the entries in .lessignore were compared against a file parameter given to less on the commandline, globbing applied.

But what was not done is checking the absolute path of the resulting file. So consider you had /var/log/messages in your .lessignore file, your current working directory is /var/log and you now call less messages. Before this patch, the file would be passed through colorization and so on, losing the ability to use the follow (F) mode.

With this patch the relative filename as given on the commandline is compared as before. Additionally the absolute path is resolved and also compared, with globbing applied too.

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.

1 participant