Giter Site home page Giter Site logo

adamyg / mcwin32 Goto Github PK

View Code? Open in Web Editor NEW
169.0 169.0 13.0 95.16 MB

Midnight Commander for Windows

Home Page: https://sourceforge.net/projects/mcwin32/

Makefile 1.56% M4 1.41% Shell 1.30% Roff 13.22% Smalltalk 0.03% Emacs Lisp 0.05% JavaScript 0.03% NewLisp 0.03% Perl 2.74% Ruby 0.05% SystemVerilog 0.03% C 78.14% C++ 0.13% Inno Setup 0.16% Batchfile 0.03% Python 0.45% Berry 0.05% Assembly 0.56%
midnight-commander shell windows-console

mcwin32's People

Contributors

adamyg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mcwin32's Issues

Windows 10 OpenSSH integration

Hello!
Is there any way to integrate mc with windows 10 built-in Openssh? SFTP feature is not so usable at moment, but with ~/.ssh/config reading will open all the doors: public key auth, jumphosts, etc.

`\` seems to be ignored

In mc under GNU/Linux systems (and cygwin for what it is worth) the \ is use at least in three different places

  1. You can type a\, and a\ will appear in the shell (I'm not sure if it is named shell, I hope it is clear what I mean by that)

  2. The directory hotlist is opened with Ctrl+\

  3. You can open the unselect dialog directly with \

In mcwin32, none of those three scenarios work.

Typing a\ only shows a in the shell

Ctrl+\ does not do nothing, and \ does not do nothing either.

Thus, it seems that \ is ignored in mc, I've tested in cmd.exe, powershell, and also tried to start the executable directly

Missing mc-wrapper.sh script

Unix environments have an mc-wrapper.sh script.
When used instead of powershell with alias mc='source mc-wrapper.sh', it makes it possible to change directory automatically after exiting from mc.

A possible implementation for powershell would look like

$mc_tmp_file = [System.IO.Path]::GetTempFileName()
& "${PSScriptRoot}/mc.exe" "--printwd=${mc_tmp_file}" "${args}"
$mc_path = get-content -Path "${mc_tmp_file}"
cd "${mc_path}"
remove-item -Force -Path "${mc_tmp_file}"

The file should be placed in the same installation directory of mc, and used from powerhsell as

Set-Alias -Name mc -Value "C:/.../mc-wrapper.ps1";

I do not know if it is possible to create something similar for cmd, but at least for powershell it is, and it would be nice if the setup would provide the script by default.

How to change Language?

Dear Sirs,
when I started mc in my Windows 10 pc, mc is started in Greek language and this is probably getting from my Windows 10 region settings that is Greece/Greek, even my selected language for Windows is English and all in Windows U.I. is in English.
That is super annoying. How can select or force mc to started in English language?
Thanks and Best Regards,
Mike Kranidis

Very slow on network locations

When working on a mounted network location in Windows, mc is extremely slow.

It seems to hang (even for 1-2 seconds) every time I change folder, and I cannot open, for example, the user menu in the meantime.

Once the content of the folder is shown, mc feels normal again.

It seems thus it has to do with querying the list of files, but other file managers, for example, explorer.exe and far.exe do not have this issue.

mbedtls 3.3.0

Latest version of mbedtls3.x available,; pending libsshs2 updates to match.

Change default language

Hi,
Is there a way to change the MC interface language, it seems that it is picking up from the regional settings.
I use English for main system but other language for regional purposes (for date, delimiters etc.)

I would like to default MC to English.

Thank you.

Rename file without warning

Hi
When I rename a file and there is another file with the same name, mc doesn't give a warning.
Under linux mc shows an overwrite warning.
Thanks!

encoding bugs

Hello!
There is some output garbage in non-UTF folder names, such as:
image
Tried to set it in settings, but they don't apply immediatly, "save settings" don't save it.

Unable to change skin

Description

All skin names are trimed from start by 2 letters, and user can't select any other skin.

Same issue in both Windows Terminal and classic terminal window. Window resize does not affect the behaviour.

Screenshots

Seems like it should be Featured(?) or Seasons
image
image

Temporary Workaround

  1. Close MC
  2. Open ~/Midnight Commander/ini
  3. Change skin parameter value, for ex. skin=modarin256
  4. Open MC, selected theme will be applied.

Tech Details

GNU Midnight Commander 4.8.24
Built with GLib 2.51.4
Built with S-Lang 3.0.0 libw32 with terminfo database
With builtin Editor
With mouse support on xterm
With internationalization support
With multiple codepages support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs
Data types:
 char: 8; int: 32; long: 32; void *: 32; size_t: 32; off_t: 32;

Switch between drives

In Unix-like system, there is the root directoy /.

External drives are mounted somewhere under it, thus it is generally possible to access all folders by traversing a tree.

In Windows, as Paths represented as C:/blabla, it is not, as an USB drive will be mounted, for example, as D:/.

In explorer.exe there is a "virtual folder" from which it is possible to access C:/, other partitions if available and network drives.

As far as I know, there is no way from mc for switching between C:/ and D:/ (typing the cd command out and using a bookmark are possible workarounds).

I think it would be nice to have a virtual folder similar to explorer.exe (thus a parent of C:/), but I'm not sure what side-effects such a virtual folder could have.
Otherwise some action that enlists all mounted drives (local or network) and asks to which to switch?
For what is worth, far (another file manager like mc from the command line: https://www.farmanager.com/) uses Alt+F1 for asking to which drive to change

Windows 10: running mc.exe under git-bash console do not work.

MC build 228 installed with setup.exe
git-bash 2.42.0.2 64 bits installed with setup.exe

if i run a git-bash console and start mc.exe, process starting but nothing is shown. console still a black hole. Checking in the task manager, mc.exe is well running. I need to kill mc.exe process myself. git-bash console settings is the default one (eg. xterm type)

mc starts well from a cmd console or from the Windows start menu entry.

See the git-bash console export result:

gilles@Win10 MINGW64 ~
$ export
declare -x ACLOCAL_PATH="/mingw64/share/aclocal:/usr/share/aclocal"
declare -x ALLUSERSPROFILE="C:\ProgramData"
declare -x APPDATA="C:\Users\gilles\AppData\Roaming"
declare -x COMMONPROGRAMFILES="C:\Program Files\Common Files"
declare -x COMPUTERNAME="WIN10"
declare -x COMSPEC="C:\Windows\system32\cmd.exe"
declare -x CONFIG_SITE="/etc/config.site"
declare -x CommonProgramW6432="C:\Program Files\Common Files"
declare -x DISPLAY="needs-to-be-defined"
declare -x DriverData="C:\Windows\System32\Drivers\DriverData"
declare -x EXEPATH="C:\Program Files\Git"
declare -x FPS_BROWSER_APP_PROFILE_STRING="Internet Explorer"
declare -x FPS_BROWSER_USER_PROFILE_STRING="Default"
declare -x HOME="/c/Users/gilles"
declare -x HOMEDRIVE="C:"
declare -x HOMEPATH="\Users\gilles"
declare -x HOSTNAME="Win10"
declare -x INFOPATH="/mingw64/local/info:/mingw64/share/info:/usr/local/info:/usr/share/info:/usr/o:/share/info"
declare -x LC_CTYPE="en_US.UTF-8"
declare -x LOCALAPPDATA="C:\Users\gilles\AppData\Local"
declare -x LOGONSERVER="\\WIN10"
declare -x MANPATH="/mingw64/local/man:/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/re/man"
declare -x MINGW_CHOST="x86_64-w64-mingw32"
declare -x MINGW_PACKAGE_PREFIX="mingw-w64-x86_64"
declare -x MINGW_PREFIX="/mingw64"
declare -x MSYS="disable_pcon"
declare -x MSYSTEM="MINGW64"
declare -x MSYSTEM_CARCH="x86_64"
declare -x MSYSTEM_CHOST="x86_64-w64-mingw32"
declare -x MSYSTEM_PREFIX="/mingw64"
declare -x NUMBER_OF_PROCESSORS="4"
declare -x OLDPWD
declare -x ORIGINAL_PATH="/mingw64/bin:/usr/bin:/c/Users/gilles/bin:/c/Windows/system32:/c/Windows/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/cmd/Program Files/CMake/bin:/c/Program Files/TortoiseGit/bin:/c/Users/gilles/AppData/Local/Programs/Pon/Python312/Scripts:/c/Users/gilles/AppData/Local/Programs/Python/Python312:/c/Users/gilles/AppDaLocal/Programs/Python/Launcher:/c/Users/gilles/AppData/Local/Microsoft/WindowsApps:/c/Program Filex86)/Midnight Commander"
declare -x ORIGINAL_TEMP="/tmp"
declare -x ORIGINAL_TMP="/tmp"
declare -x OS="Windows_NT"
declare -x OneDrive="C:\Users\gilles\OneDrive"
declare -x PATH="/c/Users/gilles/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/b/c/Users/gilles/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WiwsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/cmd:/c/Program Files/CMake/bin:/c/Program Files/TorseGit/bin:/c/Users/gilles/AppData/Local/Programs/Python/Python312/Scripts:/c/Users/gilles/AppData/al/Programs/Python/Python312:/c/Users/gilles/AppData/Local/Programs/Python/Launcher:/c/Users/gilleppData/Local/Microsoft/WindowsApps:/c/Program Files (x86)/Midnight Commander:/usr/bin/vendor_perl:r/bin/core_perl"
declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
declare -x PKG_CONFIG_PATH="/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig"
declare -x PKG_CONFIG_SYSTEM_INCLUDE_PATH="/mingw64/include"
declare -x PKG_CONFIG_SYSTEM_LIBRARY_PATH="/mingw64/lib"
declare -x PLINK_PROTOCOL="ssh"
declare -x PROCESSOR_ARCHITECTURE="AMD64"
declare -x PROCESSOR_IDENTIFIER="Intel64 Family 6 Model 70 Stepping 1, GenuineIntel"
declare -x PROCESSOR_LEVEL="6"
declare -x PROCESSOR_REVISION="4601"
declare -x PROGRAMFILES="C:\Program Files"
declare -x PS1="\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$ "
declare -x PSModulePath="C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindPowerShell\v1.0\Modules"
declare -x PUBLIC="C:\Users\Public"
declare -x PWD="/c/Users/gilles"
declare -x ProgramData="C:\ProgramData"
declare -x ProgramW6432="C:\Program Files"
declare -x SESSIONNAME="Console"
declare -x SHELL="/usr/bin/bash"
declare -x SHLVL="1"
declare -x SSH_AGENT_PID="1582"
declare -x SSH_ASKPASS="/mingw64/bin/git-askpass.exe"
declare -x SSH_AUTH_SOCK="/tmp/ssh-yKucYVSgcMyi/agent.1581"
declare -x SYSTEMDRIVE="C:"
declare -x SYSTEMROOT="C:\Windows"
declare -x TEMP="/tmp"
declare -x TERM="xterm"
declare -x TERM_PROGRAM="mintty"
declare -x TERM_PROGRAM_VERSION="3.6.4"
declare -x TMP="/tmp"
declare -x TMPDIR="/tmp"
declare -x USER
declare -x USERDOMAIN="WIN10"
declare -x USERDOMAIN_ROAMINGPROFILE="WIN10"
declare -x USERNAME="gilles"
declare -x USERPROFILE="C:\Users\gilles"
declare -x WINDIR="C:\Windows"

gilles@Win10 MINGW64 ~
$

Thanks in advance

Gilles Caulier

winget has wrong version

The version on winget and the version of the program itself differ in the name, because of it, winget updates "MC" every time it checks for updates

winged writes:
Installed version: 4.8.28 (build: 20220618-227)
Available for update: 4.8.28

Incorrect file size shown

The displayed file size is incorrect for files of size 2^31 bytes or larger. The screenshot includes a file having exactly 2^31 bytes. The indicated file size is approximately 2^64 bytes. This has been observed in mc version 4.8.27.

MC

proxyjump in Shell-link won't work

I made aliases config in C:\Users\%USERNAME%\.ssh\config and have written aliases with proxyjumps there.
If I try to connect via cmd using ssh <alias> command, it asks passwords and connects successfully.

If I connect using alias via Shell-link feature in mc on my linux OS on the same PC, it connects without a problems too.

But if I try to connect on Windows using alias via Shell-link feature in mcwin32 (v4.8.29), I get error Cannot chdir to "/sh://<alias>"

External vim editor on windows

Hi,

I'm not able to setup up an external vim editor on windows. I'm using mc 4.8.24.

mc correctly picks up EDITOR env. variable, but the final command looks like this:

vim /C E:/another_dir/file.txt

So vim tries to open two files:

  • first file or in this case it tries to open /C folder at a current drive
  • and second file E:/another_dir/file.txt

The second problem is that file is not quoted, so when the command line looks like this:

vim /C E:/some dir/file.txt

Then it tries to open two folders and one file dir/file.txt.

I have also tried to add External parameters as is described in man pages:

[External editor or viewer parameters]
vim=%filename +%lineno

But without success, it looks like mc ignores this section, in the manpages is written: "The option name should be equal to the name (full pathname) of external editor or viewer."

I have tried various combinations.

The problem is also described here: https://superuser.com/questions/1119591/defining-midnight-commanders-external-editor-on-windows
I have also created an issue on mc's trac issue track and some good guy tell me that a dedicated project exists for windows support, ticket is here.

Anyway, it is not crucial whether [External editor or viewer parameters] works or not on windows, would be absolutely enough to correctly generate external editor command on windows.

That means remove that /C parameter from the beginning or replace it with -C because startup parameters for vim have to start with a dash and quote filepaths.

not possible to compare files

installed version 4.8.30 - build 229 at Windows 11
Dear Sirs, as the title says, in my installation / case, it is not possible to compare files, I always got the error : "Two files are needed to compare" although I have the two files
Is this functionality need any special handling? Do I need special handling ?
Just to mention that I usually work on mc on my Ubuntu 20.04 server and this function "compare files" is working as it should.

Thanks and Best Regards,
Mike Kranidis

Access directory expansion and other special keys.

As the <alt - tab> key is generally consumed by the console, one cannot use command-line auto complete.

Review options, and/or:

  • Remap <ctrl - tab> for directory expansion within panels.
  • Emulate mc tty <esc - xxx> processing, where
    • <esc - 1...0> = map function keys
    • <esc - tab> = could be mapped to <alt - tab>.

Review CodePage integration

MC's native code-page support is unaware of the consoles abilities, consider reworking.

Keyboard input and display are now both always UTF-8/Unicode, meaning input code-page support is not required,
yet editor encoding can have direct effects;

  • Separate display and editor code-page functionality.

  • Control display code-page via Console API's, not internal mapping

  • OR disable

Escape-Letter sequences not working

Following sequences are not working, even when the Escape timeout is long enough and I press the keys in quick succession.

Escape-? should show the Find File dialog
Escape-c should show the Quick CD dialog
Escape-H should show the command history

Instead, I'm just getting the symbols on the command line.

Those are the sequences I use regularly. There are more Escape sequences that are not working. It looks like only Escape-Number sequences are working.

Midnight Commander is not fully portable

Midnight Commander is not fully portable because it writes in '%USERPROFILE%\Midnight Commander' instead of application folder.
Can You solve this issue ?
Thanks.

[Feature request] one panel in right upper corner

Show/hide 2 full height panels <--> 1 half height panel in right upper corner
or
Upper panel in horizontal view.
So we would have wide command line screen

I've been using shortcut Ctrl/F1 with Volcov commander for about 20 years ago and lack this feature all the time.

MC fails to start (VCRUNTIME140.dll is missing)

After the Installation of the current release ( mcwin32-build228-setup.exe ) on a fresh Win11 system,
running fails, because VCRUNTIME140.dll is missing.

windows\system32 has: vcruntime140_1_clr0400.dll and vcruntime140_clr0400.dll
windows\syswow64 has: vcruntime140_clr0400.dll

Why are the linked dll names still in the 16bit win3.x style (uppercase)?

Workaround:
I found the missing runtime here:
https://www.microsoft.com/en-us/download/details.aspx?id=53587

After Installing the mentioned runtime, mc.exe starts

mouse not working

GNU Midnight Commander 4.8.21

The mouse doesn't work under Windows Terminal or Command Prompt. I can't access the top menu bar.

Alt+<nr> shortcuts do not work as expected

Tested from cmd.exe, powershell and bash (cygwin and bash for git, with and without mintty.exe), on Windows 10, Windows 7 and Windows XP, with mc.exe version 4.8.28 build 227 (but I can also reproduce with older mc.exe releases) on different PCs (I wanted to be very sure that it does not depend on my environment, I used the installer available on GitHub).

Alt+1 does not open help, AFAIK it does nothing
Alt+2 opens the help pane (should be alt+1)
Alt+3 opens the user menu pane (should be alt+2)
Alt+4 opens the view pane (should be alt+3)
Alt+5 starts the edit operation (should be alt+4)
Alt+6 opens the copy operation (should be alt+5)
Alt+7 opens the renmov operation (should be alt+6)
Alt+8 opens the mkdir operation (should be alt+7)
Alt+9 opens the delete operation (should be alt+8)
Alt+0 closes mc (the only one that works correctly)

Note that using the mouse or Fn keys everything works as expected (F1 opens help menu, F2 opens user pane, ...), thus only the alt+n shortcuts are not mapped correctly.

Also note that the cygwin port, or the mc executable available in WSL and WSL2, does not have this issue.

Subshell does not work

When Ctrl+O is pressed the panels hide but you can't type anything in the subshell - there is no a subshell. Is this feature supported on the Windows build?
Tested in wt, powershell, cmd

FISH

Enable FISH vfs support.

Can't enter some characters. Without @ I can't login to my remotes.

4.8.27
installed using winget

tested on Windows 10 Pro (set to German, Germany)
and a Win 10 (VM) set to English

some other symbols I can't type: € Ä Ö Ü ß \ §

I can't even copy/paste them what makes me think bug.
Do I have to change something on my end or is this a bug?

I tried to search that problem but I might not know the correct term so Id didn't find anything useful.

MC file plugins for win

mc has some plugins for handling files such as "plugin\archive.sh", "plugin\doc.sh" and such. All commands inside them are for unix. It will be very nice to make mc handle various types of files, but at least we need ability to pass file handling to win. Right now I can only launch executables.

mc seem to ignore EDITOR env variable

Test scenario

$env:EDITOR=nvim
mc

after opening mc, deselect the option "use internal editor" and open a .txt file for editing

The text file is openend with notepad.exe, instead of nvim.exe (nvim.exe is in PATH)

On a GNU/Linux system "EDITOR=nvim mc" let's mc use the $EDITOR as editor if not using the internal

MC fails on a subst - drive

I merged the contents of my old second drive to a subdirectory to "C:"
and use "mklink" and "subst.exe" to make the same drive letter available as i used before.
(In my use case, "S:" is a subst to "C:_s" and "C:_s" is a link to "C:\data\src")

In the console, changing to the subst drive with "S:" works, "dir" works,
but starting "mc" fails:
1: The mc Dialog "Kann Verzeichniss nicht lesen" comes up ("Cant read directory") 2: This Dialog is not active and cant be closed with "Enter", but a second "Enter" works
3: Main ui of mc comes up, but the panel has no files or directiories

Inconsistent Escape behavior with "Single Press" off

The behavior of Escape is incorrect when the "Single Press" option in turned off. It's different from Linux, making it hard to have consistent muscle memory.

Here's what the manual page says:

Esc key mode.

By default, Midnight Commander treats the Esc key as a key prefix. Therefore, you should press Esc code twice to exit a dialog. But there is a possibility to use a single press of Esc key for that action.

Single press. By default this option is disabled. If you'll enable it, the Esc key will act as a prefix key for set up time interval (see Timeout option below), and if no extra keys have arrived, then the Esc key is interpreted as a cancel key (Esc Esc).

Timeout. This options is used to setup the time interval (in microseconds) for single press of Esc key. By default, this interval is one second (1000000 microseconds). Also the timeout can be set via KEYBOARD_KEY_TIMEOUT_US environment variable (also in microseconds), which has higher priority than Timeout option value.

So my expectation is that when "Single Press" is off, the behavior is the same as with "Single Press" on and infinitely large timeout. That's what I see on Linux.

But the actual behavior on Windows is different. When "Single Press" is off, a single Escape is treated as Escape immediately. It as if "Single Press" is on and the timeout is 0. For instance, I cannot use Escape followed by 0 to exit MC no matter how fast I press one key after the other.

If it's tricky to implement the infinite timeout, please use a very large timeout, e.g. 1 billion microseconds (1000 seconds).

I'm OK with changing the default to "Single Press" on with a very short timeout (e.g. 1 millisecond) so that Windows-only users don't have to wait or press Escape twice.

It's confusing to have settings do something different from what they should do.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.