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>
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>
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>
* (find_cmd): remove.
* (find_file): rename to find_cmd() and move declaration to cmd.h.
* find.h: remove.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (complete): rename to input_complete() and move declaration to
input.h.
* input_complete.h: remove.
* (input_free_completions): rename to input_complete_free() and move
definition to input_complete.c.
* lib/widget/input_complete.c: rename variables and function from
query_* to complete_*.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(panel_operate_init_totals): set ctx->progress_totals_computed to TRUE
in case of copy/move operation for single file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>