Wie kann ich die Befehlszeilenoptionen für git-bash herausfinden?exe-Datei?
Anscheinend ist mein google-fu saugt...
Ich kenne diese aus anderen StackExchange-Posts:
--cd-to-home # Change directory to home
--cd=<path> # Change directory to <path>
-i # ?
-c # Run command, but --command doesn't work/exist
Wo finde ich eine vollständige Liste der Optionen für git-bash.exe (der therminal Emulator)? Ich fand sie für mintty [1], aber sie scheinen nicht die richtigen für Git-Bash zu sein.exe...
Update:
Also scheint git-bash.exe
nur ein einfacher Wrapper zu sein, der zuerst die Optionen --cd...
analysiert und dann
usr\bin\mintty.exe --icon git-bash.exe,0 --exec "/usr/bin/bash" --login -i <other arguments>
Oder ähnlich. Deshalb werden nur --cd..
und bash Optionen korrekt analysiert und nicht mintty.
Wenn Sie andere Optionen von mintty verwenden möchten, sollten Sie einen ähnlichen Befehl verwenden, anstatt dies mit git-bash zu versuchen.exe - . E. g.:
usr\bin\mintty.exe --icon git-bash.exe,0 --window full --exec "/usr/bin/bash" --login -i -c "echo 'Hello World!'; read"
4 answers
Korrekt es gibt keine Liste der Befehlszeilenoptionen Hilfe für git-bash.exe. Ich verbringe einige Zeit damit, selbst nach ihnen zu suchen, und es gibt keine richtige Dokumentation dazu. Es scheint ein Wrapper für bin/sh zu sein.exe. Wenn Sie wirklich mehr tun müssen, empfehle ich Ihnen, sich die Hilfeinformationen anzusehen.exe statt.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2016-08-19 17:13:11
Ich habe dieses Commit von 2015 gefunden, das neue Befehlszeilenoptionen eingeführt hat: https://github.com/git/git/commit/ac6b03cb4197311b055dc5f46ab10bf37c591ae6
Hier ist die Liste aus der Commit-Beschreibung:
--command=<command-line>::
Executes `<command-line>` instead of the embedded string resource
--[no-]minimal-search-path::
Ensures that only `/cmd/` is added to the `PATH` instead of
`/mingw??/bin` and `/usr/bin/`, or not
--[no-]needs-console::
Ensures that there is a Win32 console associated with the spawned
process, or not
--[no-]hide::
Hides the console window, or not
Sie können die vollständigen Informationen in der URL oben lesen.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2017-05-23 14:34:53
Hier ist die Befehlszeile, die Sie beim Starten von git-bash.exe
(unter 2.8.1)
usr\bin\mintty.exe -o AppID=GitForWindows.Bash -o RelaunchCommand="C:\Git\git-bash.exe" -o RelaunchDisplayName="Git Bash" -i /mingw32/share/git/git-for-windows.ico /usr/bin/bash --login -i
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2018-10-30 14:25:09
Geben Sie einfach bash.exe --help
ein und es sollte ein Bildschirm mit allen Optionen angezeigt werden.
Beispiel:
$ bash.exe --help
GNU bash, version 4.4.23(1)-release-(x86_64-pc-msys)
Usage: bash [GNU long option] [option] ...
bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-ilrsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
Type `bash -c "help set"' for more information about shell options.
Type `bash -c help' for more information about shell builtin commands.
Use the `bashbug' command to report bugs.
bash home page: <http://www.gnu.org/software/bash>
General help using GNU software: <http://www.gnu.org/gethelp/>
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/techietown.info/template/agent.layouts/content.php on line 61
2020-11-18 16:40:56