You are not logged in.
I am setting $HOME/.local/bin to be in PATH with append_path, both in /etc/profile, and .profile
Here is the output of
% echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:$HOME/.local/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perlClearly $HOME/.local/bin is in the path, however, if I
% touch .local/bin/pathtest
% chmod +x .local/bin/pathtest
% pathtestI get
zsh: command not found: pathtestWhat am I doing wrong? Is it because $HOME is not in quotes or something? Should it have expanded to my actual home?
Last edited by gustavosb (2021-08-03 10:28:59)
Offline
1. Zsh doesn't read ~/.profile: https://wiki.archlinux.org/title/Zsh#St … down_files
2. Paste the contents of the file where the PATH is declared. And the contents of any zshrc, zshenv or zprofile files that you have.
3. How do you login?
4. If you are using OMZ, don't bother with 2 or 3.
Offline
1. Zsh doesn't read ~/.profile: https://wiki.archlinux.org/title/Zsh#St … down_files
2. Paste the contents of the file where the PATH is declared. And the contents of any zshrc, zshenv or zprofile files that you have.
3. How do you login?
4. If you are using OMZ, don't bother with 2 or 3.
1. But it does read /etc/profile
2. ~/.profile is just append_path '$HOME/.local/bin' and /etc/profile is
# /etc/profile
# Set our umask
umask 022
# Append "$1" to $PATH when not already in.
# This function API is accessible to scripts in /etc/profile.d
append_path () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${PATH:+$PATH:}$1"
esac
}
# Append our default paths
append_path '/usr/local/sbin'
append_path '/usr/local/bin'
append_path '$HOME/.local/bin'
# Force PATH to be environment
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -r "$profile" && . "$profile"
done
unset profile
fi
# Unload our profile API functions
unset -f append_path
# Source global bash config, when interactive but not posix or sh mode
if test "$BASH" &&\
test "$PS1" &&\
test -z "$POSIXLY_CORRECT" &&\
test "${0#-}" != sh &&\
test -r /etc/bash.bashrc
then
. /etc/bash.bashrc
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATH~/.zshrc is
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=100000
setopt appendhistory beep nomatch notify
unsetopt autocd extendedglob
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/gustavo/.zshrc'
autoload -Uz compinit promptinit
compinit
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
# End of lines added by compinstall
promptinit
RPROMPT='%(?..[%?%1v] )%F{red}[%F{cyan}%D{%a %d/%m %R}%F{red}]'
PROMPT='%F{red}<%F{green}%n@%m%F{white}:%F{yellow}%~%F{red}>
%f%B%#%b '
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
typeset -g -A key
autoload zkbd
source ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE}
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
CASE_SENSITIVE="true"and I don't have any more places where I set path from, AFAIK
3. I log in with lightdm
4. I don't use OMZ
My point is, it says in the path that $HOME/.local/bin is there, but it does not work
Last edited by gustavosb (2021-08-03 10:22:40)
Offline
etc/profile is read by login shells, try
zsh -lYou'll probably pick it up globally w/ a re-login, in doubt restart lightdm.
Also please edit your post and wrap the file contents in code tags, https://bbs.archlinux.org/help.php#bbcode
Online
Please edit your post and use code tags: https://wiki.archlinux.org/title/Genera … s_and_code
Also, please read the wiki on setting the Zsh path: https://wiki.archlinux.org/title/Zsh#Configuring_$PATH
Offline
Single quotes do not expand variables in most shells.
You need to add "${HOME}/foo/bar" instead of '${HOME}/foo/bar' to the path.
Otherwise the shell will think, that you want that literal path and not the path to the respective home directory.
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
Single quotes do not expand variables in most shells.
You need to add "${HOME}/foo/bar" instead of '${HOME}/foo/bar' to the path.
Otherwise the shell will think, that you want that literal path and not the path to the respective home directory.
Thank you schard, this is what I needed.
Offline