Comments (8)
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.
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.
@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.
@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.
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.
@genehack ==b ^.^ d==
from app-gitgot.
@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.
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)
- Migrate to App::Cmd HOT 1
- Show branch name when using status command HOT 2
- Add bash completion support
- MouseX::App via mousex-getopt-0.35.tar.gz and Getopt::Long::Descriptive V 0.099 HOT 3
- Failure with 'got fork <repo>' command, v 1.22 HOT 7
- got versioning issues HOT 3
- Convert tests to this form
- 'got mux' with no repos selected opens *ERRYTHING* HOT 3
- Make 'got fork' more verbose
- Make 'got fork' set 'upstream' remote to the repo being forked HOT 1
- test failures due to croak error message change in File::chdir HOT 3
- Steal stuff from MJD
- got help tag text is a little confusing due to duplicate -a options
- Failing tests HOT 4
- Bash completion broken HOT 1
- got has a config file? HOT 1
- got should check if a repo exists before becoming interactive HOT 1
- Support `git clone --recursive` HOT 4
- Renaming `master` to `main` broke a test HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-gitgot.