Re:Undergrad thought he had mastered Unix in weeks. Then he ...
by einr on Monday November 18, 2024 @09:36AM
(#42172616)
It does not "not do anything", it expands to a list of your files that have a filename starting with ~. You just don't happen to have any in the current directory ;)
And yes, this is a potential footgun:
% touch ~test
zsh: no such user or named directory: test
% touch "~test"
% ls ~*
~test
% rm ~test
zsh: no such user or named directory: test
% rm "~test"
% ls ~*
%
And yes, this is a potential footgun: