skywind3000 / z.lua

:zap: A new cd command that helps you navigate faster by learning your habits.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interactive selection mode does not works on Mac Terminal

chenzixin1 opened this issue · comments

I typed the comamdn with the parameter “-i”, but I can't interact with the termial , no > {光标位置} shown .

Here is the result.

➜ prometheus-2.41.0.darwin-arm64 z -i
8 /Users/chenzixin/Downloads/南京
11.5 /Users/chenzixin/Downloads
104 /Users/chenzixin/Downloads/prometheus-2.41.0.darwin-arm64
➜ prometheus-2.41.0.darwin-arm64

keywords are required, at least input a dot .

z -i something

or

z -i .

If you have fzf installed:

z -I something

or

z -I .

thanks for the reply

I recommend something like the following (for the fish shell):

function zi --wraps='z -i' --description 'alias zi=z -i and some smarts'
        if set -q argv[1]
            z -i $argv
        else
            z -i .
        end
end

The bash/zsh version would be something like (untested)

#!/bin/sh

zi() {
  if [ "$1"  = "" ]; then
    z -i .
  else
    z -i "$@"
  fi
}