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

buildtin: Add first version of bind #349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrshu
Copy link
Contributor

@mrshu mrshu commented Jun 19, 2019

  • Add a simple, introductory version of the buildtin bind command that
    just passes configuration options to readline.

  • Fixes Implement bind builtin #339.

Signed-off-by: mr.Shu [email protected]

* Add a simple, introductory version of the buildtin `bind` command that
  just passes configuration options to `readline`.

* Fixes oils-for-unix#339.

Signed-off-by: mr.Shu <[email protected]>
@mrshu mrshu mentioned this pull request Jun 19, 2019
raise args.UsageError('bind keyseq:function-name')

status = 0
for i in xrange(1, len(arg_vec.strs)):
Copy link
Contributor

Choose a reason for hiding this comment

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

Does bash process all positional arguments?

When I do help bind, it doesn't have the customary ... syntax for the last arg:

[keyseq:readline-function or readline-command]

I've never used bind honestly. Can you maybe write some manual test cases in the comments?

Ideally tests should be automatic, but interactive readline stuff is hard to test of course... I maintain some manual test cases here, and those would be useful for bind

https://github.com/oilshell/oil/wiki/Testing-the-Interactive-Shell

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.

Implement bind builtin
2 participants