|
50 | 50 | -- |
51 | 51 | -- Power Shell Install: |
52 | 52 | -- * put something like this in your config file: |
53 | | --- Invoke-Expression (& { |
| 53 | +-- Invoke-Expression (& { |
54 | 54 | -- (lua /path/to/z.lua --init powershell) -join "`n" }) |
55 | 55 | -- |
56 | 56 | -- Windows Install (with Clink): |
@@ -405,7 +405,7 @@ if os.native.status then |
405 | 405 | return hr ~= nil and ffi.string(buffer) or nil |
406 | 406 | end |
407 | 407 | end |
408 | | - function os.native.tickcount() |
| 408 | + function os.native.tickcount() |
409 | 409 | if windows then |
410 | 410 | return os.native.GetTickCount() |
411 | 411 | else |
@@ -931,8 +931,8 @@ function os.environ(name, default) |
931 | 931 | end |
932 | 932 | elseif type(default) == 'number' then |
933 | 933 | value = tonumber(value) |
934 | | - if value == nil then |
935 | | - return default |
| 934 | + if value == nil then |
| 935 | + return default |
936 | 936 | else |
937 | 937 | return value |
938 | 938 | end |
@@ -1076,6 +1076,7 @@ function data_load(filename) |
1076 | 1076 | local item = {} |
1077 | 1077 | if part and part[1] and part[2] and part[3] then |
1078 | 1078 | local key = insensitive and part[1]:lower() or part[1] |
| 1079 | + part[2] = part[2]:gsub(",", ".") |
1079 | 1080 | item.name = part[1] |
1080 | 1081 | item.rank = tonumber(part[2]) |
1081 | 1082 | item.time = tonumber(part[3]) + 0 |
@@ -2088,7 +2089,7 @@ function z_clink_init() |
2088 | 2089 | end |
2089 | 2090 | local z_parser = clink.arg.new_parser() |
2090 | 2091 | z_parser:set_arguments({ z_match_completion }) |
2091 | | - z_parser:set_flags("-c", "-r", "-i", "--cd", "-e", "-b", "--add", "-x", "--purge", |
| 2092 | + z_parser:set_flags("-c", "-r", "-i", "--cd", "-e", "-b", "--add", "-x", "--purge", |
2092 | 2093 | "--init", "-l", "-s", "--complete", "--help", "-h") |
2093 | 2094 | clink.arg.register_parser("z", z_parser) |
2094 | 2095 | end |
@@ -2731,7 +2732,7 @@ if os.lfs.enable ~= nil then |
2731 | 2732 | end |
2732 | 2733 | os.path.isdir = function (name) |
2733 | 2734 | local mode = lfs.attributes(name) |
2734 | | - if not mode then |
| 2735 | + if not mode then |
2735 | 2736 | return false |
2736 | 2737 | end |
2737 | 2738 | return (mode.mode == 'directory') and true or false |
|
0 commit comments