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

Compact output for keep run #77

Merged
merged 2 commits into from
Feb 19, 2021
Merged

Conversation

rahuliyer95
Copy link
Collaborator

Compact output for keep run, should fix #39

❯ keep run

 1   ls -larth :: ls
 2   iptables -I INPUT -p ${protocol} -m ${protocol} --dport ${port} -j ACCEPT :: iptables open port

Select a command [1-2] (0 to cancel): 1
Execute
        $ ls -larth :: ls
? [Y/n]: Y
total 80
drwxr-xr-x   8 rahuli  staff   256B Feb 18 18:33 ..
-rw-r--r--   1 rahuli  staff   711B Feb 18 18:33 .gitignore
-rw-r--r--   1 rahuli  staff   168B Feb 18 18:33 .pep8speaks.yml
-rw-r--r--   1 rahuli  staff   1.0K Feb 18 18:33 LICENSE.md
-rw-r--r--   1 rahuli  staff    59B Feb 18 18:33 MANIFEST.in
drwxr-xr-x   4 rahuli  staff   128B Feb 18 18:33 completions
drwxr-xr-x   3 rahuli  staff    96B Feb 18 18:33 data
-rwxr-xr-x   1 rahuli  staff   152B Feb 18 18:33 release.sh
-rw-r--r--   1 rahuli  staff    47B Feb 18 18:33 requirements.txt
-rw-r--r--   1 rahuli  staff   3.8K Feb 18 18:33 README.md
-rw-r--r--   1 rahuli  staff   1.0K Feb 18 18:33 setup.py
-rw-r--r--   1 rahuli  staff   5.5K Feb 18 18:33 tutorial.md
drwxr-xr-x  16 rahuli  staff   512B Feb 18 18:38 .
drwxr-xr-x   3 rahuli  staff    96B Feb 18 18:38 .vscode
drwxr-xr-x  12 rahuli  staff   384B Feb 18 19:25 .git
drwxr-xr-x  10 rahuli  staff   320B Feb 18 19:25 keep

Also redirecting the output from the commands to stderr which enabling piping keep run commands

❯ keep run -n ls | awk '{print $9}'

 1   ls -larth :: ls

..
.gitignore
.pep8speaks.yml
LICENSE.md
MANIFEST.in
completions
data
release.sh
requirements.txt
README.md
setup.py
tutorial.md
.
.vscode
.git
keep

@OrkoHunter
Copy link
Owner

Thank you @rahuliyer95! ⭐

@rahuliyer95 rahuliyer95 merged commit 671679b into OrkoHunter:master Feb 19, 2021
@rahuliyer95 rahuliyer95 deleted the rahuliyer/39 branch February 19, 2021 18:29
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.

Should keep run be more compact?
2 participants