Giter Club home page Giter Club logo

Comments (8)

remi avatar remi commented on May 24, 2024

Hi David, I do not know a way of executing commands without echoing them. However, I modified the behavior of Teamocil (b727311) so it merges every commands it has to run for the split (filters, export TEAMOCIL, commands) and join them with && so it reduces the amount of echoed lines. For example, your example is now:

export TEAMOCIL=1 && git status
~/Projects ∴ export TEAMOCIL=1 && git status
# On branch develop
# Changes not staged for commit:
#   (use "git add/rm <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)

That's the best I could do 😄 Let me know if you have other ideas on how we can improve this.

Thanks for the report!

from teamocil.

ph avatar ph commented on May 24, 2024

you could use the clear command before your git status or we could just clear system methods like the export TEAMOCIL=1

export TEAMOCIL=1 && clear && git status

# On branch ability-defined
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   spec/rules/event_rules_spec.rb
#
no changes added to commit (use "git add" and/or "git commit -a")

if you want to hide

from teamocil.

remi avatar remi commented on May 24, 2024

That's a good idea, but I don’t think it’s a good idea to clear out the whole session, since users might have some kind of motd message they want to see in each split.

from teamocil.

ph avatar ph commented on May 24, 2024

this is why is better for the user to just opt-in the feature, they can add the command to their list.

I prefer to see what you are sending to my shell.

from teamocil.

remi avatar remi commented on May 24, 2024

Oh I see, you were suggesting it to @davejacobs — I though you meant it for teamocil’s default behavior :)

from teamocil.

davejacobs avatar davejacobs commented on May 24, 2024

Ah okay, thanks guys. Thanks for the change, I'll add clear to my scripts. I understand you can't prevent the command from showing up as you execute it, but is there a way to prevent it from showing up twice like it does now?

from teamocil.

remi avatar remi commented on May 24, 2024

In fact, the reason the command is showing up twice is that we send it to the split before the prompt is capturing user input. Since the prompt is not ready, it just displays whatever data we send. When the shell is ready, it takes the data, show it in the prompt and execute it, but the command is still showing up one line above. You can reproduce this behavior by adding a line like this in your ~/.bashrc or ~/.zshrc:

sleep 3

Start a new shell and type anything on the keyboard during the three seconds it sleeps. When the shell starts, whatever you type will now be in your prompt and still showing up.

A way to get rid of the commands is to add clear as the first line of your ~/.bashrc or ~/.zshrc so when your shell is ready to start, it will clear everything that was sent before.

from teamocil.

davejacobs avatar davejacobs commented on May 24, 2024

Gotcha, thanks for the clarification.

from teamocil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.