Created
March 22, 2021 10:29
-
-
Save florinel-chis/ca8c324fa1d8ae7a28c31a81062f0ef4 to your computer and use it in GitHub Desktop.
python shell history - one liner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import readline; print('\n'.join([str(readline.get_history_item(i + 1)) for i in range(readline.get_current_history_length())])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment