skywind3000 / skywind3000/z.lua
Example function "zii" from wiki doesn't work
Open
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.1k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/skywind3000/z.lua/wiki/Effective-with-fzf#define-a-new-z--i
function zii() {
local $dir="$(z -l "$@"|fzf --nth 2.. --reverse --inline-info --tac +s -e --height 35%)"
[ -n "$dir" ] && cd "$dir"
}
In bash it fails like this:
bash: local: `=134 /var/tmp': not a valid identifier
This works for me:
function zii() {
local dir="$(z -l "$@"|fzf --nth 2.. --reverse --inline-info --tac +s -e --height 35%)"
[ -n "$dir" ] && cd "$(echo $dir | tr -s ' ' | cut -d ' ' -f 2)"
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the linked wiki section, “Define a new z-i,” and reproduce the example in Bash with z.lua and fzf. Compare the documented function with the working form in the issue, then update the wiki example and verify that it runs without the invalid-identifier error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100