When we try to complete something what can't be stat()'ed,
we treated it like dir. Now we do not consider such candidates
for completion.
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
This commit moves the mhl_str_concat_dir_and_file back into src/util.c whitout changing atm the functionality.
Please note that this is an incomplete fix and needs to be partially enhanced in order to keep the full functionality with glib.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
<winnie> ls -lQ /tmp/test
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:05 "a"
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:04 " test\"hallo"
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:04 " test$hallo"
<winnie> and then cat /tmp/test/\ and ESC-tab in subshell...
unescape/escape sequences in command completion (it also solves
completiont of weirdweird escapy commands like ./<escapy-cmd><complete>, like:
$ ls -lQ
-rwxr-xr-x 1 slyfox slyfox 2037 Jan 15 21:18 " 'asd&&\"->build-glib1.sh"
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
* mc-4.6:
replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file()
fixed out-of-tree-builds
Updated the NEWS file for 4.6.2 and added the bugnumbers behind the items in the list.
Update for OpenOffice and StarOffice viewer.
changelog: added entry for python syntax
syntax: python: keywords update (patch by NNemec) fixes#216
AC_USE_SYSTEM_EXTENSIONS macro requires autoconf >= 2.60
po/ru.po: In russian translation, there are some hotkey conficts in menu.
ChangeLog/NEWS: added entry for #181 ticket (copy to deleted dir)
Now a trailing slash will only be added in copy & move dialogs if the path itselfs
copy/move dialog: add trailing '/' to default destination path (fix#181)
fixed comments to /* ... */
Not only comment it out but removing it
Removed unneeded var to make build process a bit cleaner
Add code snipplet by il.smind which should fix issues with putty and
Conflicts:
ChangeLog
mhl/string.h
src/command.c
src/complete.c
src/file.c
src/util.c
mhl/escape.h:
add new function mhl_shell_is_char_escaped()
src/command.c; src/complete.c; src/file.c; src/util.c:
Changes for use MHL-functions.
src/util.h:
remove old escape-related declarations of functions
in input widget I made a lot of changes:
1. rename some members in WInput to reflect more their functions
(field_len -> field_width, ...)
2. buffer for reading multibytes characters - charbuf, (taken from UTF-8
patch)
3. modified insert_char to accept mulstibytes characters, drawing changed
4. works only with valid strings, str_fix_string used to assure that
input->buffer is valid
changes in complete.c:
- some iteration strings with ++/-- replaced with str_next_char,
str_prev_char, where was needed. ++ was offset oriented, but str_next_char
use directly referecne (char *), so result is not extra beatiful in every
cases
- other buffer for multibytes characters
- complete only valid filenames
pty_buffer.
* complete.c (variable_completion_function): strncpy()->memcpy()
changes are because we know there is no '\0' among the first
length bytes.
(insert_text): Likewise.
(command_completion_function): Avoid memory leaks.
(filename_completion_function): g_free handles NULL argument too,
no need for the comparison.
(try_complete): Likewise.
(command_completion_function): Likewise.
(free_completions): Likewise.
* widget.c (gauge_callback): Fix for 64-bit arches (%*s len must
be int, %3d takes int.
(copy_region): g_free handles NULL argument too, no need for
the comparison.
(kill_line): Likewise.
* find.c (do_search): Likewise.
(init_find_vars): Likewise.
(do_find): Likewise.