Giter Site home page Giter Site logo

Comments (5)

alistaircarscadden avatar alistaircarscadden commented on May 1, 2024 1

@MCord I tried it and it works. Good idea.

from gitui.

extrawurst avatar extrawurst commented on May 1, 2024 1

wow you windows people, that is cool stuff!
@alistaircarscadden thanks for taking the time to put this together.

from gitui.

extrawurst avatar extrawurst commented on May 1, 2024

hm couldn't that be done using a *.bat that does the cd $1 && gitui ? (sorry I a, no good in windows batch)

from gitui.

alistaircarscadden avatar alistaircarscadden commented on May 1, 2024

To create the 'open w/ gitui' option in the context menu in Windows you create an entry in the Registry Editor. There are different registry keys for what appears in the context menu when you click inside a folder vs. when you click on a folder.

When you click inside of a folder, the gitui can be opened with no extra options, as the directory is already correct. See:

image

However, when you right click on a folder, the system opens the executable given from the current directory and provides the item you clicked on as %1. You can see how git-bash does it here:

image

So you gave me a good idea with the batch script. One limitation is that the value in regedit isn't run with a shell, rather just executed as a process, so putting something like pushd %1 && gitui.exe isn't possible. But, I created a gitui-in.bat that contains...

pushd %1
gitui.exe

and by setting the registry to...

image

I'm able to get it to work. Anyways, the --cd behaviour is supported by git bash as --cd and by PowerShell as -command Set-Location -literalPath, so I think it would feel a lot less hacky to do it with this tool as well.

from gitui.

MCord avatar MCord commented on May 1, 2024

another trick that might be useful is to run cmd directly like:

cmd /c "cd /d %1 && gitui"

this way you don't need a batch file.

from gitui.

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.