Skip to content
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

tail: \t: No such file or directory & tr prints usage info #3429

Closed
JohnnyAmos opened this issue Sep 19, 2024 · 5 comments
Closed

tail: \t: No such file or directory & tr prints usage info #3429

JohnnyAmos opened this issue Sep 19, 2024 · 5 comments
Labels
shell alias clobbering Anything dealing with users shadowing builtins with aliases or functions. shell: zsh

Comments

@JohnnyAmos
Copy link

JohnnyAmos commented Sep 19, 2024

Operating system and version: MacOS 14.6.1

nvm debug output:

tail: \t: No such file or directory     ⎫
usage: tr [-Ccsu] string1 string2       ⎪      tr shows up five times in nvm.sh,
       tr [-Ccu] -d string1.            ⎪      but only the one at line 2970 gets
       tr [-Ccu] -s string1.            ⎪      the same result when run on the
       tr [-Ccu] -ds string1 string2.   ⎪      command line.
tail: \t: No such file or directory.    ⎪
usage: tr [-Ccsu] string1 string2.      ⎪
       tr [-Ccu] -d string1             ⎬      tail is present in the file ten times,
       tr [-Ccu] -s string1             ⎪      but I could not get a relevant result
       tr [-Ccu] -ds string1 string2.   ⎪      running it outside of the scope of the
usage: tr [-Ccsu] string1 string2.      ⎪      file.
       tr [-Ccu] -d string1             ⎪
       tr [-Ccu] -s string1             ⎪
       tr [-Ccu] -ds string1 string2.   ⎪
tail: \t: No such file or directory.    ⎭
nvm --version: v0.40.1
$TERM_PROGRAM: iTerm.app
$SHELL: /opt/local/bin/zsh
$SHLVL: 1
whoami: 'johnnyamos'
${HOME}: /Users/johnnyamos
${NVM_DIR}: '${HOME}/.config/nvm'
${PATH}: ${NVM_DIR}/versions/node/v20.17.0/bin:${HOME}/.local/bin:${HOME}/.local/perls/perl-5.40.0/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/ImageMagick7/bin:${HOME}/.cabal/bin:${HOME}/.cargo/bin:/Applications/iTerm.app/Contents/Resources/utilities:/opt/R/arm64/bin:${HOME}/Library/Python/3.12/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.9 (arm-apple-darwin23.2.0)'
uname -a: 'Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:16:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8112 arm64'
checksum binary: 'shasum'
OS version: macOS 14.6.1 23G93
awk: /usr/bin/awk, awk version 20200816
curl: /opt/local/bin/curl, curl 8.9.1 (aarch64-apple-darwin23.2.0) libcurl/8.9.1 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 nghttp2/1.63.0
wget: not found
sed: /usr/bin/sed
cut: /usr/bin/cut
basename: /usr/bin/basename
rm: /bin/rm
mkdir: /bin/mkdir
xargs: /usr/bin/xargs
git: /opt/local/bin/git, git version 2.46.1
grep: /usr/bin/grep, grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
nvm current: tail: \t: No such file or directory
usage: tr [-Ccsu] string1 string2
       tr [-Ccu] -d string1
       tr [-Ccu] -s string1
       tr [-Ccu] -ds string1 string2
v20.17.0
which node: ${NVM_DIR}/versions/node/v20.17.0/bin/node
which iojs: iojs not found
which npm: ${NVM_DIR}/versions/node/v20.17.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v20.17.0
npm root -g: ${NVM_DIR}/versions/node/v20.17.0/lib/node_modules

nvm ls output:

How did you install nvm?

I used the install script from readme with this command:
PROFILE=/dev/null bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

What steps did you perform?

  1. install nvm
  2. run nvm
  3. run nvm --help
  4. run nvm ls-remote
  5. run nvm install v20.17.0
  6. run npm install iojs
  7. run npm install -g [email protected]
  8. run npm install - save iojs-bin
  9. run nvm debug

What happened?

tr usage information and tail error messages were printed out after every command was run, with the ordering varied.

What did you expect to happen?

I expected not to see the messages.

Is there anything in any of your profile files that modifies the PATH? Yes.

@ljharb
Copy link
Member

ljharb commented Sep 19, 2024

Do you have any aliases for tail or tr set up? In particular, any zsh global aliases?

@ljharb ljharb added shell: zsh needs followup We need some info or action from whoever filed this issue/PR. shell alias clobbering Anything dealing with users shadowing builtins with aliases or functions. labels Sep 19, 2024
@JohnnyAmos
Copy link
Author

No.

@ljharb
Copy link
Member

ljharb commented Sep 20, 2024

Can you share anything from your profile file that might be relevant? Maybe something in your prompt?

@JohnnyAmos
Copy link
Author

I found the problem. I have an alias for tail that I forgot about because I don't use it frequently. I have removed it.

alias -g t='| tail'

Thanks.

@ljharb
Copy link
Member

ljharb commented Sep 20, 2024

Indeed, and that's a zsh global alias, which there's no way to override. Glad you figured it out.

@ljharb ljharb closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2024
@ljharb ljharb removed the needs followup We need some info or action from whoever filed this issue/PR. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell alias clobbering Anything dealing with users shadowing builtins with aliases or functions. shell: zsh
Projects
None yet
Development

No branches or pull requests

2 participants