Skip to content

Commit

Permalink
Merge pull request #27 from elkinaguas/add-executed-commands-to-syste…
Browse files Browse the repository at this point in the history
…ms-history

Add executed commands to systems history
  • Loading branch information
elkinaguas authored May 9, 2024
2 parents 1023206 + c3aab0f commit f909799
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion clir/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def run_command(self):
command = _replace_arguments(command)
if uid and command:
print(f'[bold green]Running command:[/bold green] {command}')
os.system(command)
subprocess.Popen(['bash', '-ic', 'set -o history; history -s "$1"', '_', command])

def copy_command(self):
current_commands = self.commands
Expand Down
39 changes: 20 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "clir"
version = "0.5.0"
version = "0.5.1"
description = "A clear and fast way to store and recover your commands"
authors = ["Elkin Aguas <[email protected]>"]
license = "MIT License"
Expand Down

0 comments on commit f909799

Please sign in to comment.