Skip to content

Add interactive shell mode, reuses the existing commands and handlers - #9

Open
shubham-dce wants to merge 1 commit into
cli-08-importfrom
cli-09-shell
Open

Add interactive shell mode, reuses the existing commands and handlers#9
shubham-dce wants to merge 1 commit into
cli-08-importfrom
cli-09-shell

Conversation

@shubham-dce

Copy link
Copy Markdown
Owner

Summary

Adds shell - interactive mode to work with commands. Reuses the existing functionalities.

Changes

  • Refactored the inline commands dict out of main() method, so that it can be used by the shell functionalities.

Notes

  • Uses shlex instead of normal split() method, to prevent the split of tokens like "hello world". Quoted string should be considered as a single token.
  • Opens a single Cache instance for the whole shell session.
  • Catches EOFError/KeyboardInterrupt for a clean exit out of shell.

Testing

  • Adds 4 new tests, passes successfully with pre-existing ones.

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