Trying to explain better what i've tested:
I have created 4 files with:
$ touch 'file_without_spaces'
$ touch 'file with spaces'
$ touch 'file_without_spaces_utf8_local_chars_ä_ü_ö_ß_'
$ touch 'file_without_spaces_utf8_nonlocal_chars_à_á_'
$ touch 'file with spaces'
$ touch 'file_without_spaces_utf8_local_chars_ä_ü_ö_ß_'
$ touch 'file_without_spaces_utf8_nonlocal_chars_à_á_'
On my system everything looks like it should.
$ ls -n
insgesamt 0
-rw-r--r-- 1 12073 40000 0 Mär 12 13:39 file_without_spaces
-rw-r--r-- 1 12073 40000 0 Mär 12 13:40 file_without_spaces_utf8_local_chars_ä_ü_ö_ß_
-rw-r--r-- 1 12073 40000 0 Mär 12 13:40 file_without_spaces_utf8_nonlocal_chars_à_á_
-rw-r--r-- 1 12073 40000 0 Mär 12 15:08 'file with spaces'
$ ls -n
insgesamt 0
-rw-r--r-- 1 12073 40000 0 Mär 12 13:39 file_without_spaces
-rw-r--r-- 1 12073 40000 0 Mär 12 13:40 file_without_spaces_utf8_local_chars_ä_ü_ö_ß_
-rw-r--r-- 1 12073 40000 0 Mär 12 13:40 file_without_spaces_utf8_nonlocal_chars_à_á_
-rw-r--r-- 1 12073 40000 0 Mär 12 15:08 'file with spaces'
They also look good in mc.
Then in mc I'm going with the cursor over the file and press F2 (user menu) (Debug is on for the user menu: see the '?' in the line '+? f [[:space:]] & t r')
mc will show a debug for file name: 'f' matching pattern: '[[:space:]]'.
mc will show a debug for file name: 'f' matching pattern: '[[:space:]]'.
These are my lines "filename=", "debug=" and "result="
Notice: in geman "Falsch" means "false" and "Wahr" means "true"
Notice: in geman "Falsch" means "false" and "Wahr" means "true"
The problem ist by the file 'file_without_spaces_utf8_nonlocal_chars_à_á_' hier the debug result ist true (?) and it should be false.
case 4:
filename='file_without_spaces_utf8_nonlocal_chars_à_á_'
debug=Wahr: f [[:space:]]
result=works NOT as expected (WRONG)
case 4:
filename='file_without_spaces_utf8_nonlocal_chars_à_á_'
debug=Wahr: f [[:space:]]
result=works NOT as expected (WRONG)
The same test with a bash variable:
creating a variable var
$ var='file_without_spaces_utf8_nonlocal_chars_à_á_'
creating a variable var
$ var='file_without_spaces_utf8_nonlocal_chars_à_á_'
test if var matches pattern [[:space:]]
$ [[ $var =~ [[:space:]] ]] && echo "var has spaces" || echo "var has NO spaces"
var has NO spaces
var has NO spaces
it works.
Fact is: in bash on my system pattern matching [[:space:]] works well, in mc not.
Fact is: in bash on my system pattern matching [[:space:]] works well, in mc not.
Anyway i will make a test with a recent version of mc an report.
Greets
-- mc mailing list [email protected] https://lists.midnight-commander.org/mailman/listinfo/mc
