Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag to automatically open at file #2510

Open
JulianoCaldo opened this issue Feb 7, 2025 · 5 comments
Open

Flag to automatically open at file #2510

JulianoCaldo opened this issue Feb 7, 2025 · 5 comments

Comments

@JulianoCaldo
Copy link

JulianoCaldo commented Feb 7, 2025

Is your feature request related to a problem? Please describe.
I like to use gitui integrated on my neovim environment, so it makes easier to manage stuff. Even tough neovim has others plugin to manage file chnge history, gitui is simply better. However, navigating until the file to check for the history every time gitui is opened is kinda annoying, if there was an automatic way to invoke it everything would be a lot better.

Describe the solution you'd like
Add a flag "--file [path]" and gitui will be automatically invoked on the File Tab focusing the filepath.

@extrawurst
Copy link
Collaborator

Do you want it to just go to the file-tab or even open up that files history directly?

@JulianoCaldo
Copy link
Author

When writing I was thinking mostly about the file-tab, cuz over there is always massive at my work.

@miikalaaksonen
Copy link

File list and history view was the main reason for me to move to gitui! So replacement for gitk filename.ext would be really nice.

@naseschwarz
Copy link
Contributor

naseschwarz commented Mar 20, 2025

File list and history view was the main reason for me to move to gitui! So replacement for gitk filename.ext would be really nice.

This would be similar behavior as git log filename.txt, right? man gitk says:

       <path>...
           Limit commits to the ones touching files in the given paths. Note, to
           avoid ambiguity with respect to revision names use "--" to separate the
           paths from any preceding options.

man git log says:

      [--] <path>...
           Show only commits that are enough to explain how the files that match
           the specified paths came to be. See History Simplification below for
           details and other simplification modes.

           Paths may need to be prefixed with -- to separate them from options or
           the revision range, when confusion arises.

@miikalaaksonen
Copy link

This would be similar behavior as git log filename.txt, right? man gitk says:

Yes and no. The whole point of using gitk is that you can scroll through history and see diffs while you press up and down like in gitui history view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants