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

Can't get command arguments #6

Closed
amitlevy21 opened this issue Jul 8, 2019 · 2 comments · Fixed by #7
Closed

Can't get command arguments #6

amitlevy21 opened this issue Jul 8, 2019 · 2 comments · Fixed by #7

Comments

@amitlevy21
Copy link

amitlevy21 commented Jul 8, 2019

Hi! Thank you so much for sharing vue-terminal-ui!

I am using the onCliCommand (data, resolve, reject) method to get the typed command and execute accordingly however it does not contain the whole command in the data var.

For example, if i type into the terminal echo -e hello then i get the following:
image

How can i get the entire command including the options (-e) and arguments (hello) ?

Here is my code:

<template>
  <div>
    <h1>Terminal</h1>
    <app-terminal
      intro="intro"
      console-sign="$"
      allow-arbitrary
      height="500px"
      @command="onCliCommand"
    />
  </div>
</template>

<script>
import VueTerminal from "vue-terminal-ui";

export default {
  components: {
    'app-terminal': VueTerminal
  },
  methods: {
      onCliCommand (data, resolve, reject) {
        console.log(data)
        resolve('')
      }
  }
};
</script>

<style>
</style>
@shershen08
Copy link
Owner

Thanks for reporting this, @amitlevy21 indeed I see the problem
I'll update a version asap

@shershen08
Copy link
Owner

please try newer version vue-terminal-ui@0.1.6

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 a pull request may close this issue.

2 participants