|
4 | 4 | -- z.lua - a cd command that learns, by skywind 2018-2022 |
5 | 5 | -- Licensed under MIT license. |
6 | 6 | -- |
7 | | --- Version 1.8.18, Last Modified: 2024/04/30 17:11 |
| 7 | +-- Version 1.8.22, Last Modified: 2025/05/17 13:54:38 |
8 | 8 | -- |
9 | 9 | -- * 10x faster than fasd and autojump, 3x faster than z.sh |
10 | 10 | -- * available for posix shells: bash, zsh, sh, ash, dash, busybox |
@@ -1670,12 +1670,12 @@ function z_cd(patterns) |
1670 | 1670 | local flag = os.environ('_ZL_FZF_FLAG', '') |
1671 | 1671 | flag = (flag == '' or flag == nil) and '+s -e' or flag |
1672 | 1672 | cmd = ((fzf == '') and 'fzf' or fzf) .. ' ' .. cmd .. ' ' .. flag |
| 1673 | + local height = os.environ('_ZL_FZF_HEIGHT', '35%') |
| 1674 | + if height ~= nil and height ~= '' and height ~= '0' then |
| 1675 | + cmd = cmd .. ' --height ' .. height |
| 1676 | + end |
1673 | 1677 | if not windows then |
1674 | 1678 | tmpname = os.tmpname() |
1675 | | - local height = os.environ('_ZL_FZF_HEIGHT', '35%') |
1676 | | - if height ~= nil and height ~= '' and height ~= '0' then |
1677 | | - cmd = cmd .. ' --height ' .. height |
1678 | | - end |
1679 | 1679 | cmd = cmd .. ' < "' .. tmpname .. '"' |
1680 | 1680 | else |
1681 | 1681 | tmpname = os.tmpname():gsub('[\\:]', ''):gsub('%.', '') |
@@ -2655,7 +2655,9 @@ if /i "%1"=="--purge" ( |
2655 | 2655 | ) |
2656 | 2656 | :check |
2657 | 2657 | if /i "%1"=="" ( |
2658 | | - set "RunMode=-l" |
| 2658 | + if /i "%InterMode%"=="" ( |
| 2659 | + set "RunMode=-l" |
| 2660 | + ) |
2659 | 2661 | ) |
2660 | 2662 | for /f "delims=" %%i in ('cd') do set "PWD=%%i" |
2661 | 2663 | if /i "%RunMode%"=="-n" ( |
|
0 commit comments