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

Store history 1 without sed #14

Closed
wants to merge 1 commit into from
Closed

Store history 1 without sed #14

wants to merge 1 commit into from

Conversation

d630
Copy link
Contributor

@d630 d630 commented Oct 24, 2015

Tested with:

% bash --version
GNU bash, version 4.3.42(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@d630
Copy link
Contributor Author

d630 commented Oct 24, 2015

I see. Travis doesn't like it. How about:

this_command=$( HISTTIMEFORMAT= history 1 | { read -r _ this_command ; echo "$this_command" ; } )

rcaloras added a commit that referenced this pull request Nov 1, 2015
@rcaloras
Copy link
Owner

rcaloras commented Nov 1, 2015

Resubmitted as #18. Closing this thread.

@rcaloras rcaloras closed this Nov 1, 2015
jimwins added a commit to jimwins/bash-preexec that referenced this pull request Jan 23, 2024
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.

2 participants