The upcoming fish 3.8 will add a feature flag to officially deprecate
"%self," see
8d71eef1da
Unfortunately this can cause mc+fish to break for users who configured
fish with "set -U fish_features all" which opts into any new feature
flag, thus disabling %self expansion.
Prevent this potential breakage by using the recommended "$fish_pid",
which was introduced in fish 3.0.0 (December 2018).
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
The -w option sets the working directory for the temporary archive 7-zip
builds when modifying an existing one. The option cant be used to set
the base path inside an archive when adding something into it.
When adding something to a 7z archive by its absolute path, 7zip only
uses the last part of the path by default. E.g. `7z a 1.7z
/tmp/a/b/date.txt` would add date.txt to the root dir inside the
archive. If we wanted the file to be under `a/b/` inside the archive as
well, it should be `7z a 1.7z /tmp/a`.
ClosesMidnightCommander/mc#202.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (file_op_context_new): change default value of file_op_context_t::do_reget.
* (overwrite_query_dialog): show the "Reget" button in query dialog for
move operation.
* (copy_file_file): keep non-default value of file_op_context_t::do_reget
that was set before.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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.
ClosesMidnightCommander/mc#203.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(edit_callback): use bracketed_pasting_in_progress variable to detect
if text is being pasted. If yes, paste text as is without macro
expanaison.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (tar_read_header): canonicalize path name after decoding of all
headers occupied with long file/directory name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* (extfs_open_and_read_archive): fix NULL dereference if
extfs_open_archive() doesn't create an error.
* (extfs_open_archive): create an error message when mc_open() returns -1.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
We currently call Bash with argv[0] being just the fixed string
"bash", but this confuses Bash when it initializes the shell variable
BASH, which are expected to be the absolute file path to the current
Bash image. This patch fixes argv[0] to be the actual path that mc
uses to start Bash.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This function is present at least in glib-2.43.92:
../../lib/glibcompat.c:69:1: error: static declaration of 'g_direct_equal' follows non-static declaration
69 | g_direct_equal (gconstpointer v1, gconstpointer v2)
| ^~~~~~~~~~~~~~
In file included from /home/zaytsev/opt/glib/include/glib-2.0/glib.h:50,
from ../../lib/global.h:10,
from ../../lib/glibcompat.c:36:
/home/zaytsev/opt/glib/include/glib-2.0/glib/ghash.h:180:10: note: previous declaration of 'g_direct_equal' was here
180 | gboolean g_direct_equal (gconstpointer v1,
| ^~~~~~~~~~~~~~
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
../../../src/filemanager/filegui.c:1413:35: warning: implicit conversion from 'int' to 'mode_t' (aka 'unsigned short') changes value from 262143 to 65535 [-Wconstant-conversion]
ctx->umask_kill = 0777777;
~ ^~~~~~~
../../../src/filemanager/fileopctx.c:81:23: warning: implicit conversion from 'int' to 'mode_t' (aka 'unsigned short') changes value from 262143 to 65535 [-Wconstant-conversion]
ctx->umask_kill = 0777777;
~ ^~~~~~~
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
../../../../src/vfs/sftpfs/connection.c:787:22: warning: passing 'unsigned char *const' to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
if (strncmp (prompts[i].text, "Password: ", prompts[i].length) == 0)
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:84:26: note: passing argument to parameter '__s1' here
int strncmp(const char *__s1, const char *__s2, size_t __n);
^
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
../../../src/filemanager/file.c:2402:61: warning: variable 'attrs' may be uninitialized when used here [-Wconditional-uninitialized]
while (attrs_ok && mc_fsetflags (dst_vpath, attrs) != 0 && !ctx->skip_all)
^~~~~
../../../src/filemanager/file.c:2266:24: note: initialize the variable 'attrs' to silence this warning
unsigned long attrs;
^
= 0
../../../src/filemanager/file.c:3227:38: warning: variable 'attrs' may be uninitialized when used here [-Wconditional-uninitialized]
mc_fsetflags (dst_vpath, attrs);
^~~~~
../../../src/filemanager/file.c:2942:24: note: initialize the variable 'attrs' to silence this warning
unsigned long attrs;
^
= 0
../../../lib/strutil/tokenize.c:163:44: warning: variable 'delimopen' may be uninitialized when used here [-Wconditional-uninitialized]
if (nestdelim != 0 && string[i] == delimopen)
^~~~~~~~~
../../../lib/strutil/tokenize.c:72:19: note: initialize the variable 'delimopen' to silence this warning
char delimopen;
^
= '\0'
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Path to libssh2 headers was missing from CPPFLAGS resulting into FTBFS.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Seemingly that at some point clang started accepting _any_ flags,
whereas previously it would error out.
These days, you can give it -Whamsandwich and it will succeed, while
at the same time throwing an annoying warning.
Add -Werror so that everything gets flagged and set accordingly.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108082
Cc: Vinson Lee <vlee@freedesktop.org>
Repored-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Get rid of double conversion of path: remove passwords using
vfs_path_from_str_flags (path, VPF_STRIP_PASSWORD).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>