Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 14 08:16
    jcubic commented #738
  • Jan 14 08:15
    jcubic commented #738
  • Jan 13 23:59
    Kingsy edited #738
  • Jan 13 23:57
    Kingsy edited #738
  • Jan 13 23:54
    Kingsy opened #738
  • Jan 13 18:18
    jcubic edited #737
  • Jan 13 18:18
    jcubic labeled #737
  • Jan 13 18:18
    jcubic opened #737
  • Jan 12 13:19
    jcubic labeled #736
  • Jan 12 13:19
    jcubic opened #736
  • Jan 12 13:13
    jcubic edited #735
  • Jan 12 13:12
    jcubic labeled #735
  • Jan 12 13:12
    jcubic opened #735
  • Jan 11 16:13
    jcubic edited #734
  • Jan 11 14:18
    jcubic commented #734
  • Jan 11 14:18
    jcubic commented #734
  • Jan 11 14:01
    jcubic labeled #734
  • Jan 11 14:01
    jcubic opened #734
  • Jan 09 19:00
    jcubic commented #733
Ice Badger
@TheIceBadger_twitter
I would love an example! I will play around with it a bit and see if I can figure it out, thanks a lot!
Ice Badger
@TheIceBadger_twitter

I think I figured it out!

var termTrace = $('#trace').terminal(function(command, term) {
        var cmd = $.terminal.parse_command(command);
        switch (cmd.name) {
            case 'echo':
                termMem.echo('Hello World');
                break;
        }
}, {
    greetings: null,
    name: 'trace',
    height: 90,
    width: 810,

});    

var termMem = $('#memory').terminal(function(command, term) {
        var cmd = $.terminal.parse_command(command);
        switch (cmd.name) {
            case 'echo':
                termTrace.echo('Hello World');
                break;
        }
    }, {
        greetings: null,
        name: 'memory',
        height: 960,
        width: 240,
    });    

This will let my type "echo" in one terminal and "Hello World" shows up in the other :D
Let me know if that's how it should be done ^^

Jakub T. Jankiewicz
@jcubic
yes exactly like this, also you can use termTrace.exec(`echo "something"`); since you have echo command on trace terminal.
Ice Badger
@TheIceBadger_twitter
Thank you so much for pointing me in the right direction, I have been stuck trying to figure it out for days!
Jakub T. Jankiewicz
@jcubic
but also with code like this if you call exec(echo) you will get infinite loop probably the browser will freeze. I'm not sure if you will get stack Overflow error.
Ice Badger
@TheIceBadger_twitter
Right now one of them just has nothing in it and I just echo things to that from another terminal, so one handles everything the other just sits there and shows stuff :D
sysc4ll
@sysc4ll_gitlab
hello, how to clear the screen with clear() command, but display the greetings message like the start
please
Jakub T. Jankiewicz
@jcubic
You need to use onClear: function() { } option
best is to put the greetings into variable and echo it in onClear.
sysc4ll
@sysc4ll_gitlab
when i use clear command in my term, there is a bug. Look here : https://pixshare.de/image/screenshot-2021-11-07-15-39-29.vfI7W
the prompt cursor is under the prompt
Jakub T. Jankiewicz
@jcubic
Do you have a demo online? It's hard ot say without seeing the code
sysc4ll
@sysc4ll_gitlab
no :( i have not. Sorry. But i can paste my code on pastebin
sysc4ll
@sysc4ll_gitlab
i understand, sorry to have disturb you, I'll be back later with a little line of code. But it seems to be a little bug. Good evening
Jakub T. Jankiewicz
@jcubic
You need to give me a way to reproduce the issue, either by creating demo online. you can use git to put your code (or gitlab looking at your username)
sysc4ll
@sysc4ll_gitlab
thanks
Jakub T. Jankiewicz
@jcubic
I also need to know what browser and system your using and which version of the library
sysc4ll
@sysc4ll_gitlab
I'll be back later with all of that, thanks again
sysc4ll
@sysc4ll_gitlab
hi! firefox: 94.0.1 your lib: 2.29.4 (npm version)
I'm on 4G in a hospital, i can't route port to my laptop from my smartphone
but i can upload my code in a tar.gz or zip
in private please
Jakub T. Jankiewicz
@jcubic
@sysc4ll_gitlab you can send it my email jcubic@onet.pl
sysc4ll
@sysc4ll_gitlab
thank you :)
sysc4ll
@sysc4ll_gitlab
it's send
Jakub T. Jankiewicz
@jcubic
Do you have any instruction how to run or build your app?
main package.json file is empty, just {}
sysc4ll
@sysc4ll_gitlab
for dependencies : in theme/sysc4ll : npm install
for run hugo (with sass version) in the root folder: hugo server --theme sysc4ll --disableFastRender
Jakub T. Jankiewicz
@jcubic
if you create a project for someone you should at least write README on how to run it. I don't have a crystal ball.
sysc4ll
@sysc4ll_gitlab
yes, ok, sorry and thanks
it's just for me, but i take your help
Jakub T. Jankiewicz
@jcubic
and do I need to install hugo globally? What is the name of the package? hugo?
sysc4ll
@sysc4ll_gitlab
on ubuntu and i suppose on debian : sudo apt install hugo
Jakub T. Jankiewicz
@jcubic
It is a bug, I'm not sure why it's happening will need to investiage
Jakub T. Jankiewicz
@jcubic
it may be a bug in the browser, that is caused by your display: flex !important on terminal object.
sysc4ll
@sysc4ll_gitlab
ok :) thank you very much.
in chrome it's the same
sysc4ll
@sysc4ll_gitlab
yes. display: block !important and it's good :)
thank you very much again, good luck, and good day, bye
Kira
@Kira272921
hi how can i change the prompt's color ?
as well as it's style ?
@jcubic :sweat_smile:
Jakub T. Jankiewicz
@jcubic
@Kira272921 You can use Terminal formatting, or if you prefer XML syntax you can use xml_formatting file. Changinng prompt style works the same as for echo
Maybe I should add specific example for prompt into a wiki, because it may be not obvious that you can use the same things as for echo
Kira
@Kira272921

@Kira272921 You can use Terminal formatting, or if you prefer XML syntax you can use xml_formatting file. Changinng prompt style works the same as for echo

Thanks!!

Maybe I should add specific example for prompt into a wiki, because it may be not obvious that you can use the same things as for echo

It would it really helpful, if you add an example how to change the style and color for prompt in the wiki :heart:

Kira
@Kira272921
image.png