You are not logged in.

#1 2021-03-09 15:11:13

ian.soarch.blvd.00
Member
Registered: 2020-03-29
Posts: 10

[SOLVED] zsh $PATH problem: $PATH setting is okay, but "command not...

I'm bash user, but I decided to learn zsh, yesterday.
I installed zsh with oh-my-zsh.

I transferred my setting to zsh, so I can see my path in $PATH and $path, also.
But, my binary or scripts in my path, zsh couldn't find...
I set my paths at the beginning of .zshrc

myid@host ~ % echo $PATH
$HOME/.local/scripts:$HOME/.local/bin:$HOME/.local/backup:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
myid@host ~ % echo $path
$HOME/.local/scripts $HOME/.local/bin $HOME/.local/backup /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl
myid@host ~ % my_xrandr.sh
zsh: command not found: my_xrandr.sh
127 myid@host ~ % ls $HOME/.local/scripts
dim-screen.sh           my_checksum.sh            my_rclone-mount.sh  offline-install-arch  rclone_mounts.sh
display                 my_mirrorlist-update.sh   my_umount-all.sh    old                   snippets
file_line_counter.py    my_mount-500gb-evo860.sh  my_xrandr.sh        python                test.sh
my_bluetooth-toggle.sh  my_qemu-win10-spice.sh    numlock             qemu                  vpn
myid@host ~ % 

What am I missing?

I've been googling to solve this all these hours, but no answer for me...

Last edited by ian.soarch.blvd.00 (2021-03-09 15:50:05)

Offline

#2 2021-03-09 15:27:18

Flemur
Member
Registered: 2012-05-24
Posts: 72

Re: [SOLVED] zsh $PATH problem: $PATH setting is okay, but "command not...

ian.soarch.blvd.00 wrote:

I installed zsh with oh-my-zsh.

I recently swtiched from bash to zsh for the terminal shell, and oh-my-zsh caused some strange problems; you might consider getting started without using oh-my-zsh.

myid@host ~ % echo $PATH
$HOME/.local/scripts:$HOME/.local/bin:$HOME/.local/backup:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
...
What am I missing?

The "echo $PATH" command should show $HOME expanded (at least mine does):

$ PATH=$PATH:$HOME
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/username/bin:/home/username

(EDIT: that's the PATH for a not-Arch installation!)

What's your statement to set your PATH?

Last edited by Flemur (2021-03-09 15:31:21)


"If you do not change direction, you may end up where you are heading." -- L.T.

Offline

#3 2021-03-09 15:44:31

ian.soarch.blvd.00
Member
Registered: 2020-03-29
Posts: 10

Re: [SOLVED] zsh $PATH problem: $PATH setting is okay, but "command not...

Thank you Flemur,

I edited and changed my paths as absolute ones, then, now it's working as it should be.
I'll consider to remove oh-my-zsh if another problem comes.

ps. oh-my-zsh says in .zshrc, like below:

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

Probably, something's wrong with oh-my-zsh, as you said...

Offline

#4 2021-03-09 19:55:31

positronik
Member
Registered: 2016-02-08
Posts: 86

Re: [SOLVED] zsh $PATH problem: $PATH setting is okay, but "command not...

Offline

Board footer

Powered by FluxBB