Forrest logo
back to the noglob tool

zsh:tldr:5078f

zsh: Execute a specific command inside `zsh` with disabled glob patterns.
$ noglob ${command}
try on your machine

The command noglob ${command} is used to prevent globbing or file name expansion by the shell for the specified ${command}.

Globbing is the mechanism in which the shell expands special characters like *, ?, and [ ] into matching filenames or paths in the current directory. This can be useful in normal shell operations, but sometimes you may want to pass a command to the shell without any globbing to be performed on its arguments.

By using noglob in front of ${command}, it disables globbing for that particular command. This means that the shell will treat the arguments of ${command} literally without performing any filename expansion. This can be important when you want to pass file names or special characters as arguments to a command, but you don't want the shell to perform any transformation on them.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the noglob tool