skywind3000 / skywind3000/z.lua

z -I seen as z -i when bash shell option nocasematch is set

Open
#84 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
3.1k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

In bash, when the environment has shopt -s nocasematch set then options -i and -I are considered equal and so interactive fzf is never used.

A solution is in the function _zlua in the script_zlua variable to make the following changes:

  1. Before the case statement add the following:
local restore_nocasematch=$(shopt -p nocasematch; true)
shopt -u nocasematch
  1. After the case statement add the following:
$restore_nocasematch

I don't know the situation in zsh.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the _zlua function within the script_zlua variable and inspect the case statement handling -i and -I. Ensure the existing nocasematch setting is restored afterward and verify that interactive fzf is selected correctly when shopt -s nocasematch is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, lua
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.