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

New command: blackbox_view: Like blackbox_cat but pipes to less or $PAGER #263

Merged
merged 3 commits into from Jul 26, 2018

Conversation

winter0mute
Copy link
Contributor

Hi!

I have added blackbox_less to the toolset, basically it is the same as blackbox_cat, but it uses less instead of cat. This way you can view and search in long encrypted files without the need of piping blackbox_cat to less and without the possibility to modify it accidentally.

"${BLACKBOX_HOME}/blackbox_edit_start" "$param"
shreddable=1
fi
less "$unencrypted_file"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than less, use:

${PAGER:-less}

That way people can use any pager they want. If $PAGER is not set, less will be used.

@winter0mute
Copy link
Contributor Author

Hi!

Good idea!
I have also renamed it blackbox_view.
The README entry is maybe not the best but I don't know how to phrase it more understandable but keep it brief.

@TomOnTime
Copy link
Collaborator

Dumb question but... how this this different than someone doing:

blackbox_cat file.txt | less

@winter0mute
Copy link
Contributor Author

Nothing, i'm just lazy and don't like to type much. :)
I had a bash alias similar the one you wrote before I made the pull request, thinking that maybe this would be nice for others too.

@tlimoncelli
Copy link
Contributor

Could you change the description of the command to something shorter, thus making the README.md diff not so big?

How about:

Like blackbox_cat but pipes to `less` or $PAGER

@winter0mute
Copy link
Contributor Author

Thanks for the feedback, I have updated the README with this.

@tlimoncelli
Copy link
Contributor

Awesome! Thanks for the PR!

@tlimoncelli tlimoncelli changed the title Add blackbox_less. New command: blackbox_view (uses "less" or $PAGER) Jul 26, 2018
@tlimoncelli tlimoncelli changed the title New command: blackbox_view (uses "less" or $PAGER) New command: blackbox_view: Like blackbox_cat but pipes to less or $PAGER Jul 26, 2018
@tlimoncelli tlimoncelli merged commit 74de17a into StackExchange:master Jul 26, 2018
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

3 participants