Using MSYS and MinGW
Copy the produced binary nano.exe
to your environment. You can get this:
From source
I installed MYSYS with MinGW and was able to:
$ pacman -S tar gcc ncurses ncurses-devel
$ f='nano-5.8' # Change this line for a different v5 version
$ curl --proto '=https' --tlsv1.2 -sSf 'https://www.nano-editor.org/dist/v5/'"$f"'.tar.xz'
$ tar xf "$f"'.tar.xz' && cd "$f"
$ ./configure
$ make # See './src/nano.exe'
From pre-compiled package
$ pacman -S nano
to get it working in that environment:
From source (patched for Windows)
In case you keep getting Error opening terminal: xterm-256color.
errors:
$ pacman -S git
$ git clone https://github.com/lhmouse/nano-win
$ cd nano-win # tested on `38790067`
$ ./build_nano-win.sh
From archive
Or just download the package directly and add it to your PATH
:
https://mirror.msys2.org/msys/x86_64/nano-5.8-1-x86_64.pkg.tar.zst (extract with Modern 7-zip + 7-zip, or unzstd
) and exe
s from nano-5.8-1-x86_64.pkg.tar.zst\nano-5.8-1-x86_64.pkg.tar\usr\bin\
to your PATH
, along with (from msys64\usr\bin\
or the archives): msys-ncursesw6.dll
, msys-2.0.dll
, msys-magic-1.dll
, msys-intl-8.dll
, msys-iconv-2.dll
, msys-bz2-1.dll
, msys-z.dll
Test, on cmd.exe
(Windows Command Prompt)
> nano --version
GNU nano, version 5.8
(C) 1999-2011, 2013-2021 Free Software Foundation, Inc.
(C) 2014-2021 the contributors to nano
Compiled options: --enable-utf8
If it works, invocation of nano
will look like:
GNU nano 5.8 New Buffer
[ Welcome to nano. For basic help, type Ctrl+G. ]
^G Help ^O Write Out ^W Where Is ^K Cut ^T Execute ^C Location
^X Exit ^R Read File ^\ Replace ^U Paste ^J Justify ^_ Go To Line