git-gui: allow Ctrl+T to toggle multiple paths
[git/git.git] / windows / git-gui.sh
CommitLineData
99fe594d
SP
1#!/bin/sh
2# Tcl ignores the next line -*- tcl -*- \
3exec wish "$0" -- "$@"
4
5if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
b01d4326
MH
6 set workdir [lindex $argv 1]
7 cd $workdir
8 if {[lindex [file split $workdir] end] eq {.git}} {
9 # Workaround for Explorer right click "Git GUI Here" on .git/
10 cd ..
11 }
99fe594d
SP
12 set argv [lrange $argv 2 end]
13 incr argc -2
14}
15
4c79adc5 16set basedir [file dirname \
5fc6edab
SP
17 [file dirname \
18 [file dirname [info script]]]]
4c79adc5
HV
19set bindir [file join $basedir bin]
20set bindir "$bindir;[file join $basedir mingw bin]"
5fc6edab
SP
21regsub -all ";" $bindir "\\;" bindir
22set env(PATH) "$bindir;$env(PATH)"
23unset bindir
99fe594d
SP
24
25source [file join [file dirname [info script]] git-gui.tcl]