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>
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>
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>
...to prevent leaving wal/shm files after viewing sqlite database.
The problem I often had with viewing .sqlite files with mc is that
exiting the view mode mid-way may leave .wal/.shm files in the database
directory.
This never caused any actual issues, but a bit annoying, since leftover
.wal files are often a sign that the program working with the database
exited ungracefully.
This effectively reproduces mc's behaviour:
/tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "/tmp/testsqlite/db file.sqlite" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
'db file.sqlite'
'db file.sqlite-shm'
'db file.sqlite-wal'
After the change -- no shm/wal files
/tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "file:/tmp/testsqlite/db file.sqlite?immutable=1" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
'db file.sqlite'
You can find the docs on immutable mode here:
https://www.sqlite.org/uri.html#uriimmutable
Immutable mode has been supported in sqlite since 2014:
https://www.sqlite.org/changes.html#version_3_8_5
In case user's sqlite installation is older, the mode is just quietly
ignored, so the change is backwards compatible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
DOT is a graph description language, described at
<https://graphviz.org/doc/info/lang.html>. The new syntax file
recognizes the basic language keywords and syntax; known node,
edge, graph, etc. properties; comments; character strings.
The syntax file seems to work well with various DOT files found
in the Linux kernel sources as well as with the MNT Reform 2.0D-4
System Diagram.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Since .endc was defined both as the context end delimiter and a context
keyword, it was not recognized as the former and the control script
context, once started, would never be finished. This issue can be
noticed, for example, in wrong syntax highlighting of the .end command
if it was preceded by a control script.
Fix the issue by making the control script context exclusive and
highlighting the .control and .endc keywords in the default context
instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add basic support for highlighting Ngspice/SPICE (http://ngspice.sourceforge.net/)
circuit description files syntax. Two main contexts are defined:
- the default context, where the circuit is described,
- the control script context (between .control and .endc).
The default context highlights dot commands, circuit element instance
names and model types. The control script context highlights supported
functions/commands and known variables. Both contexts highlight comments
and line continuation marks.
Other than two FIXMEs, it is a known issue the first line of the file is
part of the default context, while in most cases it would contain the
file title.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...on systems that have no /bin/cat (like NixOS).
When opening .diff or .patch files mcview invokes /bin/cat. NixOS has no
/bin/cat (the path to cat looks like /run/current-system/sw/bin/cat).
However cat is still in PATH, so replace /bin/cat with just cat. This
should not affect other systems as /bin should normally be in PATH.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The mc's built-in samba library which is used to access data across
smb links is taken from an old samba version.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fixed:
- use of "grey" instead of "gray" (same for "lightgray");
- use of space in keywords;
- typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Support various versions of file utility which output is changed from
one version to another:
$ file --version
file-4.26
magic file from /etc/magic:/usr/share/file/magic
$ file mc.1
mc.1: ASCII troff or preprocessor input text
$ file -z -L mc.1.gz
mc.1.gz: ASCII troff or preprocessor input text (gzip compressed data, was "mc.1", last modified: Tue Aug 24 08:17:47 2021, from Unix)
$ file --version
file-5.40
magic file from /etc/file/magic
eccomp support included
$ file mc.1
mc.1: troff or preprocessor input, ASCII text
$ file -z -L -S mc.1.gz
mc.1.gz: troff or preprocessor input, ASCII text (gzip compressed data, was "mc.1", last modified: Wed Aug 18 04:41:29 2021, from Unix)
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fix mc.ext breakage caused by c3848a689c.
While reorganizing /etc/mc/mc.ext, the order of rules was changed in the file,
causing a bug where more general matches (e. g. any gzipped file) are made
before more specific ones (e. g. a gzip-compressed manpage).
Fix this by reverting to the original order of rules.
Signed-off-by: Tomas Szepe <szepe@pinerecords.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Use an empty patter (^$) that doesn't match any file name. In this
case, only the shebang is used to detect syntax highlighting rules for
OpenRC scripts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
$ file -L image.zip
image.zip: Zip archive data, at least v2.0 to extract
$ file -L -z image.zip
image.zip: JPEG image data, JFIF standard 1.01, resolution (DPI),
density 96x96, segment length 16, baseline, precision 8, 1024x768,
frames 3 (Zip archive data, at least v2.0 to extract)
Since in mc.ext
type/^JPEG
is evaluated before
type/\(Zip archive
mc assume image.zip is a image not an archive.
To solve this, since we use "file -z", match file name at first
(regex/ and shell/), then type/.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
mc.ext: add fb2 support.
ext.f/doc.sh.in: change key name for e-books.
Thanks korrado <anyhow2@mail.ru> for the issue.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
After 8857423e4e due to
using "file -z", zip archves w/o ".zip" file name extension
(i.e. "ff_ext.xpi", a Firefox extension) aren't handled
as zip archives.
misc/mc.ext.in: fix regular expression for zip format.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>