mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-09 04:52:04 +03:00
Set locale to C.
Add support for bzip2. Remove redirection of stderr to /dev/null.
This commit is contained in:
parent
b594ab56c4
commit
b1c7fda53b
@ -3,16 +3,16 @@
|
||||
# Based on previous version of lslR
|
||||
# Modified by Tomas Novak <tnovak@ipex.cz> April 2000
|
||||
# (to allow spaces in filenames)
|
||||
|
||||
ZCAT="gunzip -c"
|
||||
CAT="cat"
|
||||
#
|
||||
# It's assumed that lslR was generated in C locale.
|
||||
|
||||
mclslRfs_list () {
|
||||
case "$1" in
|
||||
*.gz) MYCAT="$ZCAT";;
|
||||
*.z) MYCAT="$ZCAT";;
|
||||
*.Z) MYCAT="$ZCAT";;
|
||||
*) MYCAT="$CAT";;
|
||||
*.bz2) MYCAT="bzip2 -dc";;
|
||||
*.gz) MYCAT="gzip -dc";;
|
||||
*.z) MYCAT="gzip -dc";;
|
||||
*.Z) MYCAT="gzip -dc";;
|
||||
*) MYCAT="cat";;
|
||||
esac
|
||||
|
||||
$MYCAT "$1" | @AWK@ '
|
||||
@ -38,9 +38,11 @@ BEGIN {
|
||||
# Cannot assign to $9, or spaces in the filename would be reduced.
|
||||
attr=substr($0, 1, length($0)-length(name))
|
||||
printf "%s%s%s\n", attr, dir, name
|
||||
}' 2>/dev/null
|
||||
}'
|
||||
}
|
||||
|
||||
export LC_ALL="C"
|
||||
|
||||
case "$1" in
|
||||
list) mclslRfs_list "$2"; exit 0;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user