Sync with gnulib 2a3dbe99a2aeb058ecb033d7d830e6600e16c91c.
/archive/html/ part can be replace with /r/.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Sync with gnulib 875dff5812cb9de949727e1aa399a06b07a886a9.
Remove AC_MSG_CHECKING without corresponding AC_MSG_RESULT.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Move declaration of {advanced_chown,chattr,chmod,chown}_cmd() into cmd.h.
Delete src/filemanager/{achown,chattr,chmod,chown}.h
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fix quoting of AC_LANG_PROGRAM arguments.
* m4.include/gnulib//mountlist.m4 (gl_MOUNTLIST): Quote the
AC_LANG_PROGRAM arguments through [[...]].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
call 'file' with -z switch to enable getting the type of compressed files,
and use that capability extensively.
the /logs?/ hacks in ext.d/text.sh need to remain for the time being, as
file -z doesn't handle .lz4 files as encapsulated content.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4126_persistent_subshell_command_buffer_fixups:
Disable subshell cursor position translation for bash v5+.
Optimize bash cursor position translation.
Make query of subshell command buffer leading-dash-safe.
Prevent word-splitting of the subshell command buffer.
Fixup FISH subshell setup.
Do not avoid big stack allocations.
Ticket #4126: fixups to persistent subshell command line buffer support.
the changelog clearly states that the position is now returned as a
character offset.
amends ff0fc17a.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
when the command buffer started with a valid option to the "echo"
command, weird things would happen. use "printf" instead, which doesn't
have this problem. this affected only the bash and zsh code paths.
amends ff0fc17a.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
this avoids inadvertent whitespace normalization (compression and
trimming), which is annoying and additionally invalidates the cursor
position.
for bash and zsh that meant quoting the variable expansion, while for
fish it meant removing the pointless indirection through echo.
for bash we had to introduce an indirection through a function, as there
is apparently no way to get the quoting right inside the binding. zsh
already had such an indirection - maybe for the same reason?
amends ff0fc17a.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
move binding commands out of the fish_prompt function definition, use
consistent command separators, and remove excess backslashes from the
bindings.
amends ff0fc17a.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4127_mc.ext_improve:
Relax mc.ext matching rules for makefiles.
Replace xmms with audacious in ext.d/shound.sh.
Ticket #4127: several improvements to mc.ext and syntax highlighting.
match the special cases first, and match makefiles irrespective of
extension. that is useful, as hand-written make-based build systems
often use qualifying suffixes, like .unix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
add plenty of missing 'which' commands in ext.d.
the construct 'if <command>' to check the presence of a command would
work in some cases (though inefficiently), but it others it was just
bogus. in every case it was inconsistent and confusing.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Subshell: don't setup command line promt if MC is run as standalone
editor/viewer/diffviewer.
Fix ff0fc17ae3.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
How to reproduce:
Use tsch as your shell.
ctrl-o
ctrl-c
ctrl-o
mc gives the error:
The Commander can't change to the directory that the subshell claims you
are in. Perhaps you have deleted your working directory, or given
yourself extra permissions with the "su" command?
This commit is really simple workaround that makes the problem go away.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commi allows the user to start typing a command in the MC's command
line, and then continue typing it in the subshell, or to start typing a
command in the subshell, and then finish typing it in the MC's command
line.
It also fixes#2269 and #2110, bugs in which mc can unexpectedly execute
commands without the user's permission.
The new feature works with bash4, zsh, and fish. The bugfix works on all
shells.
How to test the feature:
Run mc
Type any command in the command line, but don't hit enter.
Press Ctrl-O.
The command you typed will show up in the subshell.
Type any command in the subshell, but don't hit enter.
Press Ctrl-O.
The command you typed will show up in the command line.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
After ef5f1fa3eb ctrl-i stopped working
on some terminals including native Linux console.
To fix this, add default binging ctrl-i shortcut to ChangePanel action.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (do_compute_dir_size): fix directory size calculation.
Use mc_lstat() if "Follow links" option is set, mc_stat() otherwise.
* (single_dirsize_cmd): fix compute_dir_size() call.
* (dirsize_cmd): likewise.
* (panel_compute_totals): process symlink to directory as directory if
follow_symlink is set.
* (panel_operate_init_totals): process symlink to directory as
directory if "Follow links" option is set.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>