git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Re: [PATCH v3 1/1] git-gui: allow opening currently selected file in default app

From
Zoli Szabó <zoli.szabo@gmail.com>
Date
Dec 30, 2019, 20:31 UTC
Message-ID
<2fac0090-8db7-885a-9b1b-0017db7ce91b@gmail.com>
In-Reply-To
<20191230194129.kjmp6r5xuwmq4wum@yadavpratyush.com>
On 2019.12.30 21:41, Pratyush Yadav wrote:
Show 15 quoted lines
> Hi Zoli,
> 
> On 30/12/19 03:56PM, Zoli Szabó via GitGitGadget wrote:
>> From: =?UTF-8?q?Zoli=20Szab=C3=B3?= <zoli.szabo@gmail.com>
>>
>> Many times there's the need to quickly open a source file (the one you're
>> looking at in Git GUI) in the predefined text editor / IDE. Of course,
>> the file can be searched for in your preferred file manager or directly
>> in the text editor, but having the option to directly open the current
>> file from Git GUI would be just faster. This change enables just that by:
>>   - clicking the diff header path (which is now highlighted as a hyperlink)
>>   - or diff header path context menu -> Open;
> 
> Semi-colon left in by mistake?
> 

Yes, that should have been a simple period (.), signaling the end of the sentence.

Show 9 quoted lines
>> +	eval exec $explorer [list [file nativename $full_file_path]] &
> 
> IIUC, this line can be simplified to:
> 
>    exec $explorer [file nativename $full_file_path] &
> 
> It works fine for me including on files with spaces in their names, but
> a test on Windows would be appreciated just to rule out any hidden
> surprises.

You're right. It can be simplified like you have proposed. Tested it and works correctly also on Windows. (Since I have copied that line from the existing `do_explore` proc, the same simplification can be done there too. (I did not realize this myself, since I am just learning some TCL in order to have this feature in Git GUI...))

Show 7 quoted lines
> 
> No need to send a re-roll just for these two small things. I have
> updated the commit locally before pushing the new version out [0]. The
> rest of the patch looks good. Will merge. Thanks.
>  
> [0] https://github.com/prati0100/git-gui/tree/zs/open-current-file
> 
Thank you very much for your support!

All the best, Zoli

Previous: Pratyush Yadav
Message 14 of 14 in “git-gui: add possibility to open currently selected file”
  1. 0/1 git-gui: add possibility to open currently selected fileZoli Szabó via GitGitGadget, Dec 26, 2019
  2. 1/1 git-gui: add possibility to open currently selected fileZoli Szabó via GitGitGadget, Dec 26, 2019
  3. Pratyush YadavDec 27, 2019
  4. Junio C HamanoDec 27, 2019
  5. Zoli SzabóDec 29, 2019
  6. Junio C HamanoDec 29, 2019
  7. Zoli SzabóDec 30, 2019
  8. Zoli SzabóDec 29, 2019
  9. 0/1 git-gui: allow opening currently selected fileZoli Szabó via GitGitGadget, Dec 29, 2019
  10. 1/1 git-gui: allow opening currently selected fileZoli Szabó via GitGitGadget, Dec 29, 2019
  11. 0/1 git-gui: allow opening currently selected fileZoli Szabó via GitGitGadget, Dec 30, 2019
  12. 1/1 git-gui: allow opening currently selected file in default appZoli Szabó via GitGitGadget, Dec 30, 2019
  13. Pratyush YadavDec 30, 2019
  14. Zoli SzabóDec 30, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.