-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup-hook: bad substitution #14
Comments
It seems that problem went away after |
when calling
but the plugins build-shell-shim uses For now I will update the Readme. |
it appears that brew's bash isn't good enough either (though I'm getting a slightly different error, $ which -a bash
/usr/local/bin/bash
/bin/bash
$ bash --version
GNU bash, version 5.2.2(1)-release (x86_64-apple-darwin21.6.0)
#...
$ /bin/bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin22)
#...
$ nix-shell --command 'sed "s/\033/ESC/g" < /private/tmp/nix-shell-*/rc;echo;echo' -p cowsay
_nix_shell_clean_tmpdir() { command rm -rf '/private/tmp/nix-shell-48073-0'; }; trap _nix_shell_clean_tmpdir EXIT; exitHooks+=(_nix_shell_clean_tmpdir); failureHooks+=(_nix_shell_clean_tmpdir); [ -n "$PS1" ] && [ -e ~/.bashrc ] && source ~/.bashrc;p=$PATH; unset PATH;dontAddDisableDepTrack=1; [ -e $stdenv/setup ] && source $stdenv/setup; PATH=$PATH:$p; unset p; PATH='/path/to/zsh-nix-shell/scripts':"$PATH"; SHELL='/path/to/zsh-nix-shell/scripts/buildShellShim'; BASH='/path/to/zsh-nix-shell/scripts/buildShellShim'; set +e; [ -n "$PS1" -a -z "$NIX_SHELL_PRESERVE_PROMPT" ] && PS1='
\[ESC[1;32m\][nix-shell:\w]\$\[ESC[0m\] '; if [ "$(type -t runHook)" = function ]; then runHook shellHook; fi; unset NIX_ENFORCE_PURITY; shopt -u nullglob; unset TZ; shopt -s execfail;sed "s/ESC/ESC/g" < /private/tmp/nix-shell-48073-0/rc
SHELL=
unset NIX_BUILD_SHELL
FPATH=$(echo 'echo $FPATH' | --stdin)
for path in ${PATH//:/ }; do
if [[ $path = /nix/store/* ]]; then
path=${path/%bin/share\/zsh\/site-functions}
if [ -d "$path" ]; then
FPATH="$path:$FPATH"
fi
fi
done
FPATH=$FPATH
/private/tmp/nix-shell-48073-0/rc: line 5: --stdin: command not found (note, actual escape characters replaced with |
Hm, the issue seems to be that @mark-pictor-csec could you post the output of |
Hi @chisui I am getting the same error as @mark-pictor-csec after installing bash 5.1 with When I run $ echo $SHELL
/bin/zsh
$ readlink /proc/$$/exe
$ |
sorry @chisui I should have checked for replies $ readlink /proc/$$/exe
$ readlink /proc/$$/exe | wc -c
0
$ zsh -c 'ls /proc/$$/exe'
ls: /proc/40813/exe: No such file or directory |
Issue description
I'm getting the following error when trying to run
nix-shell
withzsh-nix-shell
enabled:If I comment
zsh-nix-shell
out - it works fine. I thought it might be related to NixOS/nixpkgs#71625, but I have same old default bash-3.2 from Mojave and didn't have to update it with brew.I used plain installation (I use prezto instead of Oh-My-ZSH).
Steps to reproduce
I have a following
default.nix
file:Technical details
The text was updated successfully, but these errors were encountered: