-
-
Save zergmk2/06af1be62e70edd5cf82f1f12f1fd612 to your computer and use it in GitHub Desktop.
Revisions
-
zergmk2 revised this gist
Mar 16, 2023 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,11 +43,17 @@ pacman -Syu To sync the metadata files it's needed to run the commands below. This step takes some minutes to finish. ```sh URL=https://github.com/git-for-windows/git-sdk-64/raw/main cat /etc/package-versions.txt | while read p v; do d=/var/lib/pacman/local/$p-$v mkdir -p $d for f in desc files install mtree; do echo "$URL$d/$f" ..... $d/$f curl -sSL "$URL$d/$f" -o $d/$f done done ``` ## Step 4 -
rafaelpadovezi revised this gist
Jun 12, 2021 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,17 +5,17 @@ To install [fish shell](https://fishshell.com/) on windows the options are: - WSL - MSYS2 Since git bash is based on MSYS2 it seems a good fit to install fish. The problem is that git bash is a lightweight version of MSYS2 which does not include [`pacman`](https://www.msys2.org/docs/package-management/) as a package management, used to install fish. [This OS thread](https://stackoverflow.com/questions/32712133/package-management-in-git-for-windows) has great suggestions on how to solve this problem including using the full MSYS2. But the best solution for me was this [answer](https://stackoverflow.com/a/65204171/4524171) by [Michael Chen](https://stackoverflow.com/users/7902054/michael-chen) which installs `pacman` on git bash. I'll reproduce here his answer with some updates that made it work for me: ## Step 1 Download [pacman](https://packages.msys2.org/package/pacman?repo=msys), [pacman-mirrors](https://packages.msys2.org/package/pacman-mirrors?repo=msys) and [msys2-keyring](https://packages.msys2.org/package/msys2-keyring?repo=msys) from MSYS2's site. Also, for fish to work it is necessary download [gcc-libs](https://packages.msys2.org/package/gcc-libs?repo=msys&variant=x86_64) since uses `msys-stdc++-6.dll`. The files are in the `zst` format. To decompress to `tar` format download the windows version of the [`zstd` tool](https://github.com/facebook/zstd/releases) and execute these commands from cmd: ```sh zstd.exe -d msys2-keyring-1_20210213-2-any.pkg.tar.zst @@ -26,7 +26,7 @@ zstd.exe -d gcc-libs-10.2.0-1-x86_64.pkg.tar.zst ## Step 2 From git bash root unpack the tar files and restore the packages. It can be necessary to open git bash as admin. ```sh cd / @@ -66,4 +66,4 @@ If all is well and working fine edit the file `~/.bashrc` adding these lines to if [ -t 1 ]; then exec fish fi ``` -
rafaelpadovezi revised this gist
Jun 12, 2021 . 1 changed file with 10 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,14 +13,15 @@ I'll reproduce here his answer with some updates that made it work for me: ## Step 1 Download [pacman](https://packages.msys2.org/package/pacman?repo=msys), [pacman-mirrors](https://packages.msys2.org/package/pacman-mirrors?repo=msys) and [msys2-keyring](https://packages.msys2.org/package/msys2-keyring?repo=msys) from MSYS2's site. Also, for fish to work it is necessary download [gcc-libs](https://packages.msys2.org/package/gcc-libs?repo=msys&variant=x86_64) since uses `msys-stdc++-6.dll`. The files are in the `zstd` format. To decompress to `tar` format download the windows version of the [`zstd` tool](https://github.com/facebook/zstd/releases) and execute these commands from cmd: ```sh zstd.exe -d msys2-keyring-1_20210213-2-any.pkg.tar.zst zstd.exe -d pacman-mirrors-20210423-2-any.pkg.tar.zst zstd.exe -d pacman-6.0.0-2-x86_64.pkg.tar.zst zstd.exe -d gcc-libs-10.2.0-1-x86_64.pkg.tar.zst ``` ## Step 2 @@ -32,14 +33,15 @@ cd / tar -xvf ~/Downloads/msys2-keyring-1_20210213-2-any.pkg.tar tar -xvf ~/Downloads/pacman-mirrors-20210423-2-any.pkg.tar tar -xvf ~/Downloads/pacman-6.0.0-2-x86_64.pkg.tar tar -xvf ~/Downloads/gcc-libs-10.2.0-1-x86_64.pkg.tar pacman-key --init pacman-key --populate msys2 pacman -Syu ``` ## Step 3 To sync the metadata files it's needed to run the commands below. This step takes some minutes to finish. ```sh URL=https://github.com/git-for-windows/git-sdk-64/raw/main @@ -50,22 +52,15 @@ cat /etc/package-versions.txt | while read p v; do d=/var/lib/pacman/local/$p-$v ## Step 4 Now that `pacman` is installed on git bash, fish can be installed: ```sh pacman -S fish ``` ## Step 5 If all is well and working fine edit the file `~/.bashrc` adding these lines to make fish as the default shell: ``` if [ -t 1 ]; then -
rafaelpadovezi revised this gist
Jun 12, 2021 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # Using fish shell with git bash on windows To install [fish shell](https://fishshell.com/) on windows the options are: - Cygwin - WSL -
rafaelpadovezi revised this gist
Jun 12, 2021 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,3 +61,12 @@ But when trying to run fish there is still an error: What I did was to download this file from here and add to . ## Step 5 If all is well and working fine ou create or edit the file `~/.bashrc` adding these lines to make fish as the default shell: ``` if [ -t 1 ]; then exec fish fi ``` -
rafaelpadovezi revised this gist
Jun 12, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Since git bash is based on MSYS2 it seems a good fit to install fish. The proble [This OS thread](https://stackoverflow.com/questions/32712133/package-management-in-git-for-windows) has great suggestions on how to solve this problem inclusing using the full MSYS2. But the best solution for me was this [answer](https://stackoverflow.com/a/65204171/4524171) by [Michael Chen](https://stackoverflow.com/users/7902054/michael-chen) which installs `pacman` on git bash. I'll reproduce here his answer with some updates that made it work for me: ## Step 1 -
rafaelpadovezi revised this gist
Jun 12, 2021 . 1 changed file with 45 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,49 @@ Download [pacman](https://packages.msys2.org/package/pacman?repo=msys), [pacman- The files are in the `zstd` format. To decompress to `tar` format I download the windows version of the [`zstd` tool](https://github.com/facebook/zstd/releases). ```sh zstd -d pacman-6.0.0-2-x86_64.pkg.tar.zst zstd -d msys2-keyring-1_20210213-2-any.pkg.tar.zst zstd -d pacman-mirrors-20210423-2-any.pkg.tar.zst ``` ## Step 2 From git bash root unpack the tar files and restore the packages. It can be necessary open git bash as admin. ```sh cd / tar -xvf ~/Downloads/msys2-keyring-1_20210213-2-any.pkg.tar tar -xvf ~/Downloads/pacman-mirrors-20210423-2-any.pkg.tar tar -xvf ~/Downloads/pacman-6.0.0-2-x86_64.pkg.tar pacman-key --init pacman-key --populate msys2 pacman -Syu ``` ## Step 3 To sync the metadata files you need to run the commands below. This step takes some minutos to finish. ```sh URL=https://github.com/git-for-windows/git-sdk-64/raw/main cat /etc/package-versions.txt | while read p v; do d=/var/lib/pacman/local/$p-$v; mkdir -p $d; for f in desc files install mtree; do curl -sSL "$URL$d/$f" -o $d/$f; done; done ``` ## Step 4 Now you have `pacman` installed on git bash and can just do ```sh pacman -S fish ``` But when trying to run fish there is still an error: ``` ``` What I did was to download this file from here and add to . -
rafaelpadovezi created this gist
Jun 12, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ To install [fish shell](https://fishshell.com/) on windows the options are: - Cygwin - WSL - MSYS2 Since git bash is based on MSYS2 it seems a good fit to install fish. The problem is that git bash is a lightweight version of MSYS2 which not includes [`pacman`](https://www.msys2.org/docs/package-management/) as a package management, used to install fish. [This OS thread](https://stackoverflow.com/questions/32712133/package-management-in-git-for-windows) has great suggestions on how to solve this problem inclusing using the full MSYS2. But the best solution for me was this [answer](https://stackoverflow.com/a/65204171/4524171) by [Michael Chen](https://stackoverflow.com/users/7902054/michael-chen) which installs `pacman` on git bash. I'll reproduce here some steps with some updates: ## Step 1 Download [pacman](https://packages.msys2.org/package/pacman?repo=msys), [pacman-mirrors](https://packages.msys2.org/package/pacman-mirrors?repo=msys) and [msys2-keyring](https://packages.msys2.org/package/msys2-keyring?repo=msys) from MSYS2's site. The files are in the `zstd` format. To decompress to `tar` format I download the windows version of the [`zstd` tool](https://github.com/facebook/zstd/releases). ``` zstd -d pacman-6.0.0-2-x86_64.pkg.tar.zst ```