Closed arsiarola closed 2 years ago
I got it to work by putting this in a script called z-external:
#!/bin/bash
# Set vars if necessary
#_Z_DATA="$HOME/.cache/z_data"
. ~/.config/z.sh
_z "$@"
Then you can run eg: z-external -e foo
from anywhere.
Oh yeah I got it to work after I checked from fzf with rupa z integrations how theyve done it and not sure but maybe the problem was that I had already sourced it from .bashrc or something, but now that I put the script in .bashrc its good.
Took me a while to find the “fzf-z integration”: https://github.com/junegunn/fzf/wiki/examples#z
Took me a while to find the “fzf-z integration”: https://github.com/junegunn/fzf/wiki/examples#z
Yeah that was it, sry my bad forgot to leave the link here for others.
The z is working well for me but I thought about using it in my own script and it feels like I cannot get it to work.
If I use 'source path/to/rupa/z.sh' in the script I get 141: Syntax: error: redirection unexpected