Commit Graph

15901 Commits

Author SHA1 Message Date
Andrew Borodin 7b3c427c85 Merge branch '4533_external_editor_tokens'
* 4533_external_editor_tokens:
  Ticket #4533: External editor does not work with arguments in $EDITOR
2024-04-07 15:52:04 +03:00
Andrew Borodin 44d8213f4e Ticket #4533: External editor does not work with arguments in $EDITOR
When using an external editor (i.e. "Use internal edit" in the Configure
Options is unchecked) the environment variable EDITOR is used. However,
if $EDITOR contains a command line argument after the executable name,
these arguments are not processed properly, and the editor might not be
started at all.

How to reproduce: (Precondition: vi is available on the system)
  1) On the command line, execute: export EDITOR="vi +" && mc
(the + argument should let vi start at the document's end instead of the
beginning).
  2) Go to the Options menu -> Configuration -> uncheck "Use internal
edit".
  3) Move the cursor to a file that is larger than a single screen (e.g.
ABOUT-NLS in mc's source directory).
  4) Press F4 to start the external editor.

Result: Nothing visible happens

Expected result: vi is opened showing the end of the file ABOUT-NLS

The bug: my_system_make_arg_array() doesn't perform full-feature
parsing of the comman line.

  * (str_tokenize): mew function based on history_tokenize_internal()
from GNU readline-8.2.
  * (str_tokenize_word): mew function based on history_tokenize_word()
from GNU readline-8.2.
  * (my_system_make_arg_array): reimplement using str_tokenize().
  * (my_systemv_flags): use modified my_system_make_arg_array().
  * (fork_child_tokens): new test for string tokenization.
  * (fork_child_tokens2): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-03-31 19:04:26 +03:00
Andrew Borodin 25f008c0b0 Merge branch '4532_copy_move_attrs'
* 4532_copy_move_attrs:
  mceditor: support ext2fs attributes.
  Ticket #4451: preserve ext2fs attributes on copy/move operations.
2024-03-31 18:48:21 +03:00
Andrew Borodin 16fadb9d02 mceditor: support ext2fs attributes.
Get attributes on file open and set ones on file save.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-03-31 18:46:46 +03:00
Andrew Borodin f6f7c8c1ce Ticket #4451: preserve ext2fs attributes on copy/move operations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-03-31 18:46:46 +03:00
Andrew Borodin 293e534f3e Merge branch '4530_skins'
* 4530_skins:
  skins: add modarin256 thin and root variant.
  skins: add modarcon16 thin and root variant.
  skins: add xoria thin and root variant.
  Ticket #4530: new skins.
2024-03-23 10:14:50 +03:00
Eugene San (eugenesan) ad2431c40f skins: add modarin256 thin and root variant.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-03-23 09:47:33 +03:00
Eugene San (eugenesan) 7b9e2db5cf skins: add modarcon16 thin and root variant.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-03-23 09:47:29 +03:00
Eugene San (eugenesan) 2f4d7095f4 skins: add xoria thin and root variant.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-03-23 09:29:46 +03:00
Eugene San (eugenesan) 5d64768e22 Ticket #4530: new skins.
Initial commit: xoria256.ini: clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-03-23 09:23:43 +03:00
Andrew Borodin d792f707fc Merge branch '4224_mcdiff_man'
* 4224_mcdiff_man:
  Ticket #4224: add mcdiff manual page.
2024-02-24 10:14:02 +03:00
Denys Vlasenko 4092ea8bbe Ticket #4224: add mcdiff manual page.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-24 10:13:41 +03:00
Andrew Borodin 6b44fce839 Merge branch '3088_terminal_cwd'
* 3088_terminal_cwd:
  Use ESC_STR macro in escape sequences.
  (update_xterm_title_path): change the escape sequence's terminator
  Ticket #3088: tell the current directory to the terminal
2024-02-11 19:28:07 +03:00
Andrew Borodin c3ffd4a790 Use ESC_STR macro in escape sequences.
* (update_xterm_title_path): use ESC_STR macro.
  * (update_terminal_cwd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:26:45 +03:00
Egmont Koblinger e777f75397 (update_xterm_title_path): change the escape sequence's terminator
...from \a to \e\\. Various standards (at least ECMA-48 and DEC STD 070)
agree that an OSC is to be terminated by an ST, i.e. \e\\. Using BEL \a
is a nonstandard solution introduced and popularized by xterm.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:26:45 +03:00
Egmont Koblinger 5e9fac5c94 Ticket #3088: tell the current directory to the terminal
...using OSC 7 sequence, so it can open new tabs there.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:26:45 +03:00
Andrew Borodin dc1aa3e4e3 Merge branch '4521_fish_history'
* 4521_fish_history:
  Ticket #4521: really escape fish shell history.
2024-02-11 19:20:55 +03:00
Anton Anikin ae4553442f Ticket #4521: really escape fish shell history.
Some of the "service" commands generated by the mc "leak" into the fish
subshell history available to the user. An example to reproduce:

  *  set user shell to fish and start mc (SHELL=/usr/bin/fish mc)
  *  navigate to any directory
  *  press Ctrl+o
  *  press \u2191 button (UP, go back in history)
  *  observe " cd (printf '%b' ... " command

This commit avoids the " cd (printf '%b' ... " commands in the fish
history.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:19:40 +03:00
Andrew Borodin a58e0a1d61 Merge branch '4525_mcedit_replace_regex'
* 4525_mcedit_replace_regex:
  (edit_search_init): call edit_search_fix_search_start_if_selection().
  Tickets #4525, #4526: mcedit: fix replacement using regular expressions.
2024-02-11 19:10:32 +03:00
Andrew Borodin f87a6ae312 (edit_search_init): call edit_search_fix_search_start_if_selection().
* (edit_search): do not call edit_search_fix_search_start_if_selection()
  since it called in edit_search_init().
  * (edit_replace_cmd): likewise; join two ifs.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:09:16 +03:00
Andrew Borodin 40e773908c Tickets #4525, #4526: mcedit: fix replacement using regular expressions.
The bug was introduced in 21feb38a8d.

  * (edit_search_init): call edit_get_search_line_type().
  * (edit_search): do mot call edit_get_search_line_type() since it is
  called in edit_search_init().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-02-11 19:09:16 +03:00
Andrew Borodin c1832fd586 Merge branch '4518_unrar7'
* 4518_unrar7:
  Ticket #4518: extfs: support unrar-7.
2024-01-30 21:55:03 +03:00
Andrew Borodin b20c068e51 Ticket #4518: extfs: support unrar-7.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-30 21:54:45 +03:00
purdeaandrei 147f28ab24 Ticket #4519: mcedit: fix php.syntax.
Highlight comment located in any place of line, not from start only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-28 11:29:39 +03:00
Yury V. Zaytsev 953c101347 Update doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-01-20 21:09:00 +01:00
Yury V. Zaytsev adca552d80 Update hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-01-20 21:04:28 +01:00
Yury V. Zaytsev 023f6c4d64 Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-01-20 21:02:14 +01:00
Andrew Borodin e850db370c Merge branch '4490_cleanup'
* 4490_cleanup: (31 commits)
  Update po/*.po files.
  ext.d/image.sh: use exiftool in addition to exif to view image metadata.
  ext.d/image.sh: check $DISPLAY in the xpm View action.
  mc.ext.ini: support avif images.
  mc.ext.ini: add View action for webp images.
  Update copyright years.
  (main): call tty_check_term() right after mc_args_parse().
  Refactor learn keys.
  Use g_string_new_take().
  (test_glob_prepare_replace_str): remove unneeded type cast.
  maint/utils/update-years.sh: replaced unportable 'sed -i' command.
  maint/utils/update-years.sh: add src/man2hlp/man2hlp.in.
  src/man2hlp/man2hlp.in: collapse copyright years.
  (str_utf8_offset_to_pos): change type of variable.
  (mc_search_regex__get_max_num_of_replace_tokens): refactor loop.
  lib/widget/input_complete.c: remove intermediate variables.
  mcedit: add intermediate variables to make code more readable and debuggable.
  (is_blank): refactor loop.
  (edit_help): use help node of editor dialog.
  (tree_execute_cmd): move CK_Help handler to separate function tree_help()
  ...
2024-01-14 18:30:28 +03:00
Andrew Borodin 5e5593e0b6 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-14 18:29:41 +03:00
Andrew Borodin b03981f1f4 ext.d/image.sh: use exiftool in addition to exif to view image metadata.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-13 17:14:57 +03:00
Andrew Borodin 3a160902a1 ext.d/image.sh: check $DISPLAY in the xpm View action.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-13 16:13:51 +03:00
Eugene San 51b0b5fe7c mc.ext.ini: support avif images.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-13 15:38:40 +03:00
Eugene San 45cd77ffa5 mc.ext.ini: add View action for webp images.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-13 15:23:29 +03:00
Andrew Borodin fe42478b97 Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-01 09:46:17 +03:00
Andrew Borodin 19d852dbd3 (main): call tty_check_term() right after mc_args_parse().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 07db4c4fa3 Refactor learn keys.
* (learn_store_key):
  * (learn_key): use GString for key buffer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 2d86b8889f Use g_string_new_take().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 2019737846 (test_glob_prepare_replace_str): remove unneeded type cast.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin fea3a86faf maint/utils/update-years.sh: replaced unportable 'sed -i' command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 2ce0b25cfd maint/utils/update-years.sh: add src/man2hlp/man2hlp.in.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin ded62f5f3e src/man2hlp/man2hlp.in: collapse copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 247d092217 (str_utf8_offset_to_pos): change type of variable.
GString is pointless here.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 2e33fd4fad (mc_search_regex__get_max_num_of_replace_tokens): refactor loop.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 85b1cec81e lib/widget/input_complete.c: remove intermediate variables.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 49bc0ddebf mcedit: add intermediate variables to make code more readable and debuggable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin d8a93bcc86 (is_blank): refactor loop.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 1152a232fb (edit_help): use help node of editor dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 5567eb573d (tree_execute_cmd): move CK_Help handler to separate function tree_help()
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 94daff9071 (menubar_execute_cmd): move CK_Help handler to separate function menubar_help().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin 20dd30ada3 (dlg_execute_cmd): move CK_Help handler to separate function dlg_help().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00