entr: No regular files to watch in ruby
maxdzyubak opened this issue ยท 8 comments
Install
I have install entr
with hombrew brew install entr
No work
Hello. I'm having trouble with run my ruby file. Help me please.
I'm enter command ls *.rb | entr -r ruby test.rb
or ls *.rb | entr ruby test.rb
and result error
entr: unable to stat '๎ test.rb'
entr: No regular files to watch
My ruby test.rb
file:
# frozen_string_literal: true
puts 'Hello, World'
My Gemfile
# frozen_string_literal: true
source 'https://rubygems.org'
gem "rails"
gem 'rubocop'
gem 'ruby-lsp', git: 'https://github.com/Shopify/ruby-lsp', require: false
My setup
MacOS Ventura 13.4.1 (22F82)
iTerm2
zsh
tmux
vim
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin22]
Thanks.
What happens if you use find to list files?
find . -name '*.rb' | entr ruby test.rb
What happens if you use find to list files?
find . -name '*.rb' | entr ruby test.rb
Eric, thank you very much! It's works! Iโm beginner in programmers. Sorry for this elementary question. Good luck and thanks for your app.
Your welcome! But let's reopen this because we still haven't figured out what's wrong with ls(1)! Please paste the output of these two commands:
env
ls -G | sort
output env
command:
ASDF_DIR=/Users/maxdzyubak/.asdf
BAT_THEME=gruvbox-dark
COLORFGBG=15;0
COLORTERM=truecolor
COMMAND_MODE=unix2003
EDITOR=vim
FIGTERM_SESSION_ID=c5c3133a-67f8-4809-9709-cee22b6828e7
FIG_PID=64400
FIG_SET_PARENT=c5c3133a-67f8-4809-9709-cee22b6828e7
FIG_SET_PARENT_CHECK=1
FIG_TERM=2.16.0
FIG_TERM_TMUX=2.16.0
FZF_DEFAULT_COMMAND=fd --type f --hidden --exclude .git
GIT_RADAR_COLOR_CHANGES_UNTRACKED=
GIT_RADAR_FETCH_TIME=20
GIT_RADAR_FORMAT=%{stash}%{remote}%{local}%{changes}
HOME=/Users/maxdzyubak
ITERM_PROFILE=maxdzyubak
ITERM_SESSION_ID=w0t0p0:74018BBB-1867-402B-8122-6F8489607C89
LC_CTYPE=UTF-8
LC_FIG_SET_PARENT=c5c3133a-67f8-4809-9709-cee22b6828e7
LC_TERMINAL=iTerm2
LC_TERMINAL_VERSION=3.4.19
LESS=-R
LOGNAME=maxdzyubak
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
MYVIMRC=~/.local/share/chezmoi/dot_vim/
OLDPWD=/
PAGER=less
PATH=/Users/maxdzyubak/.asdf/shims:/Users/maxdzyubak/.asdf/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/lib/ruby/gems/3.2.0/bin:/usr/local/opt/ruby/bin:/Users/maxdzyubak/.cabal/bin:/Users/maxdzyubak/.ghcup/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/Users/maxdzyubak/.fig/bin:/Users/maxdzyubak/.local/bin:./node_modules/.bin/:/Users/maxdzyubak/.config/tmux/plugins/treemux/scripts/bin:/usr/local/bin:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/:./node_modules/.bin/
PROMPT=
%F{magenta}%~
%(?,%F{blue},%F{red})%(?,,%F{red}%? )# %F{default}
PWD=/Users/maxdzyubak
SHELL=/bin/zsh
SHLVL=8
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.Zk8ZoOd9rX/Listeners
TERM=screen-256color
TERM_PROGRAM=tmux
TERM_PROGRAM_VERSION=3.3a
TERM_SESSION_ID=w0t0p0:74018BBB-1867-402B-8122-6F8489607C89
TMPDIR=/var/folders/bm/dwbr6kl94xb1kmqpckpqnyxc0000gn/T/
TMUX=/private/tmp/tmux-501/default,730,0
TMUX_CONF=/Users/maxdzyubak/.config/tmux/tmux.conf
TMUX_CONF_LOCAL=/Users/maxdzyubak/.config/tmux/tmux.conf.local
TMUX_PANE=%9
TMUX_PLUGIN_MANAGER_PATH=/Users/maxdzyubak/.config/tmux/plugins
TMUX_PROGRAM=/usr/local/Cellar/tmux/3.3a_2/bin/tmux
TMUX_SOCKET=/private/tmp/tmux-501/default
TTY=/dev/ttys015
TYPEWRITTEN_ROOT=/Users/maxdzyubak/.asdf/installs/nodejs/19.5.0/lib/node_modules/typewritten
USER=maxdzyubak
VISUAL=vim
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
ZNT_CONFIG_DIR=/Users/maxdzyubak/.config/znt
ZNT_REPO_DIR=/Users/maxdzyubak/.oh-my-zsh/plugins/zsh-navigation-tools
ZSH=/Users/maxdzyubak/.oh-my-zsh
__CFBundleIdentifier=com.googlecode.iterm2
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
tmux_version=3.3
CHEZMOI=1
CHEZMOI_FQDN_HOSTNAME=m1-pro-16-gray.local
CHEZMOI_GROUP=staff
CHEZMOI_HOSTNAME=m1-pro-16-gray
CHEZMOI_ARCH=amd64
CHEZMOI_CACHE_DIR=/Users/maxdzyubak/.cache/chezmoi
CHEZMOI_SOURCE_DIR=/Users/maxdzyubak/.local/share/chezmoi
CHEZMOI_USERNAME=maxdzyubak
CHEZMOI_WORKING_TREE=/Users/maxdzyubak/.local/share/chezmoi
CHEZMOI_GID=20
CHEZMOI_OS=darwin
CHEZMOI_UID=501
CHEZMOI_CONFIG_FILE=/Users/maxdzyubak/.config/chezmoi/chezmoi.toml
CHEZMOI_HOME_DIR=/Users/maxdzyubak
CHEZMOI_ARGS=chezmoi cd
CHEZMOI_EXECUTABLE=/usr/local/bin/chezmoi
CHEZMOI_VERSION_VERSION=2.31.0
CHEZMOI_VERSION_BUILT_BY=Homebrew
CHEZMOI_VERSION_COMMIT=4d2bc846212e27fae1e5bbd45d70e00908da603b
CHEZMOI_VERSION_DATE=2023-02-17T11:19:43Z
_=/usr/bin/env
output ls -G | sort
command:
๎ helloo.rb
๎ learn.rb
๎ main.rb
๎ .vscode
๏ Gemfile
๏ฃ Gemfile.lock
๏ .ruby-lsp
๏
น .DS_Store
Is this what you needed?
What's puzzling is that there are special characters before each file name.
- This formatting does not appear to be native to
ls
- By convention Unix utilities turn off all formatting if STDOUT is not a TTY (a pipe to
sort
for example)
What is the output of which ls
?
Do you get a different result if you run /bin/ls
?
Eric, I found a error. I use aliases for the l
and ls
commands in my zshrc
. I use these tool the.exa.website.
Examples my zshrc
:
alias l="exa --tree --level=1 --group-directories-first --all --icons --long --color auto"
alias ls="exa --all --group-directories-first --icons --grid --color auto"
I remove this aliases and it works fine.
What's puzzling is that there are special characters before each file name.
- This formatting does not appear to be native to
ls
- By convention Unix utilities turn off all formatting if STDOUT is not a TTY (a pipe to
sort
for example)What is the output of
which ls
?Do you get a different result if you run
/bin/ls
?
Glad we found it!
It seems like a bug in exa
: extra formatting should not be printed when not connected to a terminal, but perhaps there is a reason they do that. Closing
Glad we found it!
It seems like a bug in
exa
: extra formatting should not be printed when not connected to a terminal, but perhaps there is a reason they do that. Closing
Good luck, Eric! Thank you very much!