DIY & Music & Guitar & Beer & Tech

Nano text editor on Windows 10, under git bash

If you like nano and miss it on windows, here is how you can make it work under git bash on Windows. First of all you need to download the compiled binaries (tar-zipped) from GNU nano site, e.g.:

<code>$ curl -L -O</code>

Unpack it somewhere to a folder called nano. Move that folder to the user share folder under git bash, on my machine that would be:

<code>C:\Program Files\Git\usr\share\{nano} &lt;- new folder with unpacked content</code>

Last thing to do is to create calling script, called simply nano (note: no extension!) and place it somewhere on your path e.g. ‘~/bin’ folder, with following content:

exec /usr/share/nano/nano.exe "$@"<br>

Now restart git bash if it was running and try it out by simply typing nano.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.