1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-15 12:19:49 +00:00
Commit Graph

488 Commits

Author SHA1 Message Date
skywind3000
019b2af475 add a return statement for nil case in os.interpreter() function. 2024-04-07 11:26:35 +08:00
Linwei
ef9a49d73d Merge pull request #158 from ibayramli/fig
Add Fig as an installation method to the README
1.8.18
2024-03-20 22:19:26 +08:00
skywind3000
7cd399b30d bloat version 2024-03-20 22:17:58 +08:00
Linwei
9112f0e9cc Merge pull request #189 from Arkaeriit/fix_pipes_in_filenames
Support '|' in path
2024-03-20 22:13:57 +08:00
Maxime Bouillot
cb4c9d3c8f Revert back to the old separator and improve db reading
A smarter reading function lets us support '|' in
filenames whilst still using it as the database
separator.
2024-03-20 14:38:04 +01:00
Maxime Bouillot
924f61a48b Change separator in data file
Using '|' as the data separator caused crashes if
a path with a '|' char in it was in the data file.
Changing that separator to a null byte ensures
that this kind of issue can never happen again as
the null byte can't be in a path.
2024-03-06 14:52:16 +01:00
skywind3000
30220996ca fix typo 1.8.17 2024-02-20 12:40:23 +08:00
skywind3000
d3ba781d4d Refactor the z.lua.plugin.zsh script to ensure proper initialization with or without FZF support 2024-02-20 11:43:00 +08:00
skywind3000
9a24fef334 Refactor logic to initialize fzf in zsh plugin to support a new condition where fzf can be disabled. 2024-02-19 11:29:04 +08:00
skywind3000
a9e034cb5c Update z.lua zsh plugin to allow customization of the fzf command used for fuzzy finding.
- Introduced new environment variable _ZL_ZSH_FZF to specify the fzf command
- Updated the eval statement to use the custom fzf command if provided by the user
2024-02-19 11:24:30 +08:00
Linwei
992134061a Merge pull request #196 from ilyagr/hyphens
Make z.lua try treating `-` as a normal character if there are no results
2023-12-11 01:11:14 +08:00
Ilya Grigoriev
b62784b66d Make z.lua try treating - as a normal character if there are no results
Previously, you needed to set `_ZL_HYPHEN=1` to treat `-` as a normal
character.  Otherwise, it was treated as a Lua regexp special character, see
https://www.lua.org/pil/20.2.html. Note that it is not super-useful to treat
`-` as a special character; it is almost the same as `*` and the difference
is not very useful in the context of fuzzy matching.

Now, if `_ZL_HYPHEN` is not set, z.lua first tries to treat it as a regexp
character. If there are no results (which is likely if the user does not know
it's a special character), z.lua tries again, treating `-` as a normal
character this time.

If `_ZL_HYPHEN=0` or `_ZL_HYPHEN=1`, z.lua will always treat `-` as
either a regex symbol or as a normal character (respectively).

Hopefully, this will make the FAQ at
https://github.com/skywind3000/z.lua/wiki/FAQ#how-to-input-a-hyphen---in-the-keyword-
unnecessary.  It took me weeks to look into the question of why `z
home-manager` refused to work and to find that FAQ. 

I only tested this briefly, but it seems to work.
2023-12-08 22:21:38 -08:00
Linwei
7f2bfcbfc1 Merge pull request #185 from kang8/feature/support-fzf-for-zsh-tab
ZSH: TAB complete using fzf
2023-07-13 11:02:56 +08:00
kang
86cb43af67 ZSH: TAB complete using fzf
Tested in Linux(ArchLinux) and MacOS

Close: #99, #77
2023-07-13 10:29:48 +08:00
skywind3000
71bae7fc0b refine window batch script initializing 2023-05-19 10:51:41 +08:00
Linwei
4d89b55363 Merge pull request #181 from chrisant996/clink_changes
Clink changes
2023-05-18 05:49:33 +08:00
Chris Antos
db1a863d40 Update z completions for Clink.
- Added description strings for the flags.
- Added dir completions for the `-x` flag.
2023-05-17 10:48:42 -07:00
Chris Antos
dff016528c z.lua was missing some lines for z.cmd.
The auto-init for z.cmd was missing a couple of lines.  The HomeDir
line, in particular, is important because it enables Lua to find the
z.lua script.
2023-05-17 10:48:05 -07:00
Linwei
6fe677aae4 Merge pull request #179 from Kosette/master
fix potential compatibilty issue for some fish shell versions and add…
2023-05-04 18:17:06 +08:00
Simsum
ba83bf67b2 fix potential compatibilty issue for some fish shell versions and add autocompletion for cmd options
1. `alias` command not available in some fishshell versions like 3.3.1. use fish-native `function` instead;
2. add autocompletion for cmd options benefitting from magic power of fish. just type `z -` and press tab. enjoy yourself.
2023-05-04 17:49:20 +08:00
skywind3000
0992ebf9f1 update z.lua 2022-09-29 15:48:52 +08:00
Linwei
83dfec0843 Merge pull request #170 from ilyagr/fuzzy-zb
Allow `z -b` to do fuzzy matching
2022-09-06 21:13:00 +08:00
Ilya Grigoriev
3703c5a0ea Put z -b foo bar in command summary, add regex docs 2022-08-27 22:00:52 -07:00
Ilya Grigoriev
3894a6b936 Reduce indentation and add comments 2022-08-27 22:00:52 -07:00
Ilya Grigoriev
0905165889 Allow z -b to do fuzzy matching
If `z -b foo bar` finds no exact match in the path to the current directory,
it tries a "fuzzy" substitution with a frecent directory. For example, if
we are in `~/github/jekyll/test` and run `z -b jek gh`, it will try to
substitute the entire `jekyll` path component with `gh`. The result will
be equivalent to running `z ~/github gh test`.
2022-08-27 22:00:52 -07:00
Linwei
3009e33176 Merge pull request #167 from FlTr/convert-string-to-float
Substitute comma with dot before conversion
2022-08-15 17:17:25 +08:00
FlTr
32786a0592 Substitute comma with dot before conversion 2022-08-15 09:37:36 +02:00
Linwei
47468a8588 Merge pull request #165 from ilyagr/ilya
Fixes and docs for the ranger plugin
2022-08-14 15:52:11 +08:00
Ilya Grigoriev
f347eaf1c8 Slight stylistic edits to ranger_zlua.py 2022-08-13 18:10:20 -07:00
Ilya Grigoriev
e11d2e2017 Fixes and docs for the ranger plugin
- Makes Ranger plugin use the standard `$ZLUA_LUAEXE` and `$ZLUA_SCRIPT`
  environment variables that `z.lua` itself uses.

- Better error handling; errors loading plugin no longer cause
  `ranger` to quit entirely.

- Briefly document the plugin
2022-08-13 16:14:50 -07:00
skywind3000
3ecc14747f prevent loading 2022-08-10 16:58:47 +08:00
skywind3000
632f722ee4 bloat version number 1.8.16 2022-07-21 22:12:50 +08:00
Linwei
9b9c0b82e6 Merge pull request #163 from jpcirrus/patch-1
Update fzf --inline-info option to --info=inline
2022-07-21 22:11:56 +08:00
John Purnell
08510fe6c6 Update fzf --inline-info option to --info=inline
fzf changed the option `--inline-info` to the equivalent `--info=inline` in release 0.19.0 with commit junegunn/fzf@d2fa470165 on 2019-11-14.
2022-07-21 15:30:21 +02:00
Ilkin Bayramli
4c05e0d911 Add Fig as an installation method to the README 2022-06-15 10:12:16 -07:00
Linwei
1ead694395 Merge pull request #157 from wtfzambo/patch-1
docs: added warning for powershell users
2022-06-14 20:35:45 +08:00
wtfzambo
ee6aa2c5ce docs: added warning for powershell users
`.zlua` file doesn't get created for Powershell users that use [Starship Prompt](https://starship.rs/) and place z.lua init command before starship init command in their `profile.ps1`.

Couldn't reproduce the bug in zsh. Didn't test other shells.
2022-06-14 06:16:58 -04:00
skywind3000
a8e92e0216 fix Monterey initialization issues 1.8.15 2022-03-27 21:51:29 +08:00
skywind3000
e2cce39ee4 bloat version to 1.8.14 1.8.14 2022-01-30 21:54:08 +08:00
skywind3000
3c88f8d8fa recognize %_ZL_CD% in cmd.exe 2022-01-30 10:55:40 +08:00
Linwei
786225005c Merge pull request #148 from phanirithvij/imgbot
[ImgBot] Optimize images
2022-01-29 18:37:34 +08:00
ImgBotApp
481c1774ed [ImgBot] Optimize images
*Total -- 161.14kb -> 53.31kb (66.92%)

/images/step1.png -- 27.95kb -> 7.53kb (73.06%)
/images/mru.png -- 38.12kb -> 10.42kb (72.68%)
/images/fzf.png -- 29.02kb -> 8.47kb (70.81%)
/images/complete-2.png -- 28.69kb -> 9.05kb (68.46%)
/images/complete-1.png -- 12.35kb -> 5.12kb (58.53%)
/images/step2.png -- 12.63kb -> 5.66kb (55.16%)
/images/step3.png -- 7.56kb -> 3.63kb (52.03%)
/images/step4.png -- 4.83kb -> 3.44kb (28.77%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2022-01-29 07:03:13 +00:00
Linwei
35e1199eff Merge pull request #145 from doubleloop/zluaexec
Try luajit in zsh and fish, fix ZLUA_EXEC check
2021-11-14 01:40:55 +08:00
Jakub Łuczyński
99dbe7b677 Mention support for luajit in README 2021-11-13 11:29:00 +01:00
Jakub Łuczyński
c88746629b zsh plugin: fix ZLUA_EXEC check
Previous check required full path (even if value was available in PATH)
2021-11-13 10:33:41 +01:00
Jakub Łuczyński
336e95b05a Try luajit in zsh and fish 2021-11-13 10:32:59 +01:00
Linwei
a3d4f5db68 Merge pull request #138 from FlTr/path-exists-17
path valid if error code 17 by os.rename
1.8.13
2021-05-05 16:41:06 +08:00
TRF2SGM
a991162428 #136 path valid if error code 17 by os.rename 2021-05-03 12:13:34 +02:00
Linwei
8210c56414 Merge pull request #132 from ilyagr/patch-1
Improve Fish installation instructions
2021-03-08 23:16:40 +08:00
Ilya Grigoriev
a01b28a8d3 Fixup #2 2021-03-08 01:26:22 -08:00