z icon indicating copy to clipboard operation
z copied to clipboard

Not working on install

Open franck-noahk opened this issue 1 year ago • 2 comments

I cloned the release (1.12) and made z.sh executable. However I am unable to use the z command. I have added it to the PATH and refreshed the terminal.

Upon looking into it a bit more I am unable to execute z.sh manually.

./z.sh
or 
./z.sh -t
or 
./z.sh foo

returns the following: ./z.sh: 147: Syntax error: redirection unexpected

Neofetch data (its very close to a fresh install) : OS: Pop!_OS 22.04 LTS x86_64 Kernel: 6.6.10-76060610-generic Shell: bash 5.1.16 DE: GNOME 42.5 Terminal: gnome-terminal

franck-noahk avatar Feb 19 '24 06:02 franck-noahk

z shoud be sourced, you don't need to make it executable.

Instead of calling the script, source it by either:

. '<path>/<to>/z.sh'
# or
source '<path>/<to>/z.sh'

Lockszmith-GH avatar Feb 19 '24 22:02 Lockszmith-GH

z shoud be sourced, you don't need to make it executable.

Instead of calling the script, source it by either:

. '<path>/<to>/z.sh'
# or
source '<path>/<to>/z.sh'

That worked. Sorry I thought z.sh had to be run and added to the path. I am not that familiar with what sourced does but I will check out that article.

franck-noahk avatar Feb 19 '24 22:02 franck-noahk