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

Additional definition modification keywords #2

Open
kosch opened this issue Oct 31, 2013 · 1 comment
Open

Additional definition modification keywords #2

kosch opened this issue Oct 31, 2013 · 1 comment

Comments

@kosch
Copy link

kosch commented Oct 31, 2013

As user I want to create new defines or append facts in one single row w/op c&p the previous content.

e.g.
.define foobar is also xyz

should create fact foobar with content xyz if not exists. If fact foobar already exists, the new fact should be added using a delimiter, maybe |.

example:
.define foobar
=> sorry, no definition found...
.define foobar is also xyz
=> definition of "foobar" created
.define foobar is also abc
=> definition of "foobar" updated
.define foobar
=> foobar: xyz | abc

Optional an keyword like "forget" can remove additional facts if the string between limiters matches:

example:
.define foobar forget abc
=> definition of "foobar" updated
.define foobar
=> foobar: xyz
.define foobar forget zzz
=> error no such fact on "foobar"

@XenGi
Copy link

XenGi commented Oct 31, 2013

.define foo bar | baz

Maybe the removal can be triggered by the Nth entry. So instead of using:

.define foo forget bar

You could write:

.define foo forget 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants