Coder Social home page Coder Social logo

Comments (8)

genehack avatar genehack commented on June 28, 2024

Sorry for letting this languish, I think I missed the original notification message from Github.

I have thought about adding a configuration section to the .gitgot file. That would require versioning the config file format (or doing something really ugly) and so I keep pushing it off.

That said, there really isn't any "default command" -- all the tool is doing is cd $repo->dir && system 'tmux new-window -- so even if there was a place to put it in the config, I'm not sure what the invocation would look like.

from app-gitgot.

gnustavo avatar gnustavo commented on June 28, 2024

The tmux new-window by default invokes your login shell. But you may supply it with another command to invoke as a single argument. For example tmux new-window 'bash --rcfile /home/user/.bashrc.git'.

from app-gitgot.

genehack avatar genehack commented on June 28, 2024

@gnustavo - again, my apologies for the delay here. I've added a patch in d1ddc4b that adds an '-e' option to 'got mux'. Could you take a look and see if that does what you were looking for? My limited testing looks good but i worry about quoting and stuff like that.

@yanick - if you have a few minutes to look at this as well, I would appreciate it, as you wrote this code originally. 8^)

from app-gitgot.

yanick avatar yanick commented on June 28, 2024

@genehack Looks good. 👍

And if you want to see the config file grow and be somewhat versioned, create a ticket and ear-burn me. I shouldn't be able to resist the urge to play with it. ;-)

from app-gitgot.

genehack avatar genehack commented on June 28, 2024

Thanks @yanick! @gnustavo -- any opinions? Would this work?

(Oh, and @yanick, I think I am going to do the versioning config thing but I may selfishly hog it for myself, we'll see. ^.^)

from app-gitgot.

yanick avatar yanick commented on June 28, 2024

@genehack ==b ^.^ d==

from app-gitgot.

gnustavo avatar gnustavo commented on June 28, 2024

@genehack I'm sorry for the delay in responding to you.

It didn't work at first when I tried this:

got mux 1 -e "/bin/bash --rcfile $HOME/.bashrc.git"

The problem is the following line in mux.pm:

push( @args ,( sprintf "'%s'" , $self->opt->exec ))

It encloses the command in single-quotes. I changed it to this:

push( @args , $self->opt->exec )

And it worked.

It's weird because the following command works both ways:

got mux 1 -e bash

It seems to be a tmux thing, because the following commands work the same:

tmux new-window "bash"
tmux new-window "'bash'"

But of the next two only the first works:

tmux new-window "bash --rcfile $HOME/.bashrc.git"
tmux new-window "'bash --rcfile $HOME/.bashrc.git'"

So, I think you could simplify that push command. Unless you had some other reason (that I don't follow) to enclose the command in single-quotes.

Thank you!

from app-gitgot.

genehack avatar genehack commented on June 28, 2024

I wasn't sure how the quoting was going to work out, honestly; the sprintf was a shot in the dark. 8^p

I've removed that and I'm going to drop a dev release tonight. Assuming it does okay on CPAN Testers, I'll do a real release later next week.

Thanks for yous help with this, @gnustavo (and you too @yanick)!

from app-gitgot.

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.