Commit Graph

594 Commits

Author SHA1 Message Date
Yury V. Zaytsev
1e0e6b5e1e charset: rename IBM866 to CP866 for iconv and adjust charset names for codeset
```
linux $ iconv -l | grep 866
866//
866NAV//
CP866//
CP866NAV//
CSIBM866//
IBM866//
IBM866NAV//

solaris $ iconv -l | grep 866
    CP866 (CP866, CP-866, CP_866, 866),
    IBM-866,

macos % iconv -l | grep 866
CP866 866 CSIBM866 IBM866 MSCP866

musl/src/locale/codepages.h: "cp866\0"
```

On glibc-based systems, codeset will be set to charmap name, on most other systems it seems to be taken from locale name.

## Linux

```
zaytsev@fedora:~$ locale -a | grep ru
ru_RU
ru_RU.cp866
ru_RU.ibm866
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8

zaytsev@fedora:~/src$ LC_ALL=ru_RU.cp866 LANG=ru_RU.cp866 ./a.out
IBM866

zaytsev@fedora:~/src$ LC_ALL=ru_RU.koi8r LANG=ru_RU.koi8r ./a.out
KOI8-R

zaytsev@fedora:~/src$ LC_ALL=ru_RU.iso88595 LANG=ru_RU.iso88595 ./a.out
ISO-8859-5
```

## macOS

```
ru_RU.ISO8859-5
ru_RU.CP866
ru_RU.CP1251
ru_RU.UTF-8
ru_RU.KOI8-R
ru_RU

zaytsev@Yurys-MBP mc % LANG=ru_RU.CP866 LC_ALL=ru_RU.CP866 ./a.out
CP866

zaytsev@Yurys-MBP mc % LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.out
ISO8859-5
```

## FreeBSD

```
ru_RU.CP1251
ru_RU.CP866
ru_RU.ISO8859-5
ru_RU.KOI8-R
ru_RU.UTF-8

zaytsev@cfarm240:~ $ LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.out
ISO8859-5

zaytsev@cfarm240:~ $ LANG=ru_RU.CP866 LC_ALL=ru_RU.CP866 ./a.out
CP866
```

## Solaris

```
ru
ru.UTF-8
ru.koi8-r
ru_RU
ru_RU.ANSI1251
ru_RU.ISO8859-5
ru_RU.KOI8-R
ru_RU.UTF-8

zaytsev@gcc-solaris10:~/src$ LANG=ru_RU.ISO8859-5 LC_ALL=ru_RU.ISO8859-5 ./a.o>
ISO8859-5

zaytsev@gcc-solaris10:~/src$ LANG=ru.koi8-r LC_ALL=ru.koi8-r ./a.out
KOI8-R
```

## AIX

```
zaytsev@gcc111:[/home/zaytsev]locale -a
C
POSIX
en_US.8859-15
en_US.IBM-858
en_US.ISO8859-1
en_US

-bash-5.1$ LANG=en_US.ISO8859-1 LC_ALL=en_US.ISO8859-1 ./a.out
ISO8859-1
```

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-10-05 11:49:26 +02:00
Kirill Rekhov
f425b90402 Ticket #4588: add vim keymap
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-09-23 14:00:47 +02:00
Yury V. Zaytsev
50976cec62 shell: replace which with command -v for speed and POSIX compatibility
https://stackoverflow.com/a/677212/5132088

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-09-11 08:45:25 +02:00
Yury V. Zaytsev
572312bd88 Ticket #4479: prioritize console players for audio/video and images
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-09-10 10:00:28 +02:00
Andrey Semashev
92f56dc679 Ticket #4583: Fix a typo for apt view command line.
Fixes MidnightCommander/mc#206.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2024-09-05 10:57:05 +02:00
Morthimer McMare
cd8355bfa8 Ticket #4556: color definitions in the "c.syntax" highlight file.
Definitions are provided for:
- Various punctuation (divided into 9 groups);
- Preprocessor;
- Keywords;
- Data types;
- Data type qualifiers;
- Numbers (can be different for the integer, hexadecimal, octal and floatpoint representations);
- Strings and escaped characters;
- Comments (with keywords like "TODO:");
- Labels.
In total 32 "defines"...

Based on the original "c.syntax" file, this version includes most of the content from C89..C23.

Closes MidnightCommander/mc#203.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-07-25 21:38:44 +03:00
Yury V. Zaytsev
9f02d1339d mc.ext.ini: grammar. 2024-05-30 21:17:00 +03:00
Andrew Borodin
3d9ff0fbb7 mc.ext.ini.in: escape dot in gettext catalogs regex.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-30 21:17:00 +03:00
Andrew Borodin
4988414f18 Ticket #4502: mc.ext.ini: escape literal parenthesis, don't escape spaces.
Escape literal parenthesis with double backslashes: \\( \\).
Spaces are no need to be escaped.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-30 21:17:00 +03:00
Eugene San (eugenesan)
ce571933c9 Ticket #4536: skins: add root variant of julia256 skin.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-09 09:53:15 +03:00
Eugene San (eugenesan)
09077ff3c1 skins: modarin256-thin.ini: fix typo.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-05-09 09:52:15 +03:00
Dmitry Atamanov
9fb4261334 mcedit: update C and C++ syntax highlightings.
Closes MidnightCommander/mc#195.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:01:47 +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
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
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
1b3684e0e1 Ticket #4433: skins: add color for non-printable characters in editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-10 17:47:07 +03:00
TobiasW
f78f9b2eda Ticket #4509: support for lzo/lzop compression format.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-26 17:27:11 +03:00
Guy Stalnaker
cd60a2907a mc.ext.ini.in: support webp images.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-06 21:06:14 +03:00
Andrew Borodin
6ca4ab4b4e Rename FISH VFS to SHELL one. 2023-10-15 16:04:39 +03:00
Andrew Borodin
372cb29d80 Ticket #4419: mc.ext.ini: clarify regex for Makefile.
Consider "Makefile" as whole word to avoid handling of
files named like "Makefile.zip" as makefiles.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-10-07 14:58:21 +03:00
Andrew Borodin
18421b7e54 Ticket #4502: mc.ext.ini: escape backslashes.
An unescaped backslash \ is treated as invalid escape sequences in
glib-2.77.3 and glib-2.79:
https://gitlab.gnome.org/GNOME/glib/-/issues/3094)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-09-16 20:03:18 +03:00
Andrew Borodin
75577b66a7 Ticket #4497: mc.ext.ini: fix comments.
Clarify desctiption of how multiple sections and keys with same names
in this file are processed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-09-16 19:58:37 +03:00
Bogdan107
626d02998a mcedit: fix colorize *.zsh files.
I need colorizing content of the "*.zsh" files in mcedit.
With "zsh(env|rc)" regexp rule, only "*.zshenv" and "*.zshrc" files are will be colorized.
With "zsh(env|rc)?" regexp rule, "*.zsh" files will be colorized too.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
bill auger
ef2172ee5a PKGBUILD.syntax: recognize 'b2sums'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
srem1
5a10a33c9e ruby.syntax: add puts
puts == print + "\n" very often use

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Oleg Kharitonov
6a9ad25e44 Add support for MacOS Mach-O and .dylib files
Closes MidnightCommander/mc#164.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Gyorgy Rotter
1536b5acf4 Ticket #4470: mcedit: add B language syntax highlight.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-31 20:29:45 +03:00
dsilakov
0d5a989e7e Ticket #4469: add syntax highlighting for Jenkinsfiles.
Jenkinsfiles follow Groovy syntax, treat them accordingly

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-26 20:19:15 +03:00
Pavel Roskin
1ad30a6474 Ticket #4445: skin julia256.ini: minor improvements.
Set "errdhotfocus" to a higher contrast color combination. Yellow is barely
visible on lightgray. The cursor stands on the the focused hotkey. If the
cursor is an underscore, the high contrast is obviously needed. If the focus
is a full box, it normally inverts both the background and the foreground, so
poor contrast remains poor. Red on lightgray is consistent with other colors
of the skin.

Set "menutitle" to yellow on blue. Otherwise, the title is not
distinguishable from the menu entries. Both "parent" skins, default and
xoria256, use distinctive color for the popup menu title.

Set "editrightmargin" to the same color as the panels. White on blue is
extremely distracting in contrast to black background to the left of the
margin.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-02-19 19:00:31 +03:00
Andrew Borodin
be16d3a747 Ticket #4444: mc.ext.ini: .md files are not recognized as Markdown ones by extension.
Change ShellIgnoreCase key to RegexIgnoreCase one since the Regex key
is used.
Simplify Regex value.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-02-17 21:36:28 +03:00
Pavel Roskin
a6fc94f294 Ticket #4441: skin julia256.ini: Fix visual inconsistencies.
Set "disabled" background to "lightgray" for consistency with the dialog
background. The inconsistent background can be seen in the file search dialog
with an empty search string.

The hotkeys in dialogs were impossible to distinguish from other text. Make
them red for consistency with the buttonbar.

Show changed lines in diffs in black on cyan. Blue on cyan is hard to see,
such color combination is not used elsewhere in the skin, which promises
"good contrast".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-02-12 13:37:22 +03:00
JJ Andresson
9ad896f5e7 mcedit: use diff syntax highlighting for git commit messages
...when GIT_EDITOR=mcedit (closes MidnightCommander/mc#85).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-01-28 21:38:05 +03:00
Mariusz Białończyk
c84f9b0536 mc.ext.ini.in: fix a typo (closes MidnightCommander/mc#178).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-01-28 21:38:05 +03:00
Sorin Sbarnea
93fed656bc Filehighlight: recognize vsix files as zip files (closes MidnightCommander/mc#171).
vsix files are vscode code plugins and they just zip archives, so
it makes sense to recognize them as alternative zip file extension.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
2023-01-28 21:38:05 +03:00
Timur Shemsedinov
4c287bb73e mcedit: support modern ECMAScript syntax in TypeScript (closes MidnightCommander/mc#172).
Signed-off-by: Timur Shemsedinov <timur.shemsedinov@gmail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2023-01-28 21:38:05 +03:00
Timur Shemsedinov
1d1c37834a Aadd syntax highlighting for modern ECMAScript (closes MidnightCommander/mc#172).
Signed-off-by: Timur Shemsedinov <timur.shemsedinov@gmail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2023-01-28 21:38:05 +03:00
Kian-Meng Ang
5001232704 Fix various typos in the source code (closes MidnightCommander/mc#177).
Found via `codespell -S
po,doc,./misc/syntax,./src/vfs/extfs/helpers/README.it -L
parm,rouge,sav,ect,vie,te,dum,clen,wee,dynamc,childs,ths,fo,nin,unx,nd,iif,iterm,ser,makrs,wil`

Co-authored-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Kian-Meng Ang <kianmeng@cpan.org>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2023-01-28 21:38:05 +03:00
Yury V. Zaytsev
9d7a83aec6 maint: update address protocol and mailing list information 2023-01-02 21:43:20 +01:00
Andrew Borodin
7230269ce4 Ticket #4419: mc.ext.ini: clarify regex for makefiles.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-12-18 14:44:27 +03:00
Andrew Borodin
cea7d35209 Ticket #4320: syntax/Syntax: document location of syntax files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-12-18 14:26:30 +03:00
Alexander Fadeev
87bfef7317 Ticket #4412: add TOML (Tom's Obvious Minimal Language) syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-11-26 09:44:24 +03:00
Andrew Borodin
2d7616e3c6 filehighlight.ini: add TypeScript tsx files to sources.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-10-10 21:07:40 +03:00
Andrew Borodin
d60e3d5311 filehighlight.ini: add Markdown mkd files to documents. 2022-10-10 21:07:40 +03:00
Andrew Borodin
d9eeec9a5a Port mc.ext to INI format.
Ticket #2773: 'include' keyword (for command class def) have no effect
if it was defined before 'Include' keyword (for command def).

Ticket #3742: update comment in mc.ext.ini.

doc: remove mc.ext.ini format description from manual page.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-09-25 14:55:00 +03:00