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

Initial support for exclamation in command line #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arunsl
Copy link
Contributor

@arunsl arunsl commented Oct 12, 2016

Need to write logic within individual commands and update tests.
Had to move one test to future-fact as the same I was not sure of the behaviour.

:else
(assoc :message [:white :red (str ":" command-line " is not a thing")]))))
[editor command-line-raw]
(let [force? (have-exclamation? command-line-raw)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you know that Clojure symbols can have ! in them?

I would just define w! and wq! and so forth as separate commands in avi.commands.

@@ -29,7 +29,7 @@
(editor :after ":q") => unfinished?)
(fact "`:q<Enter>` exits Avi"
(editor :after ":q<Enter>") => finished?)
(fact "`:q!<Enter>` does not exit Avi"
(future-fact "`:q!<Enter>` does not exit Avi"
Copy link
Member

@eraserhd eraserhd Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, if you see a test like this, it's calling out that the behavior is intentional. In this case, though, we were trying to come up with a different model for saving, but never succeeded. So I would just change this to a

(fact "`:q!<Enter>` exits Avi"
  ...

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