You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
somebody explain me wildcard * in fish,for bash i have no issues. #4175
Fish version 2.3 made "failglob" the default behavior (see issue #2719). This was done to catch mistakes made by the user. This is equivalent to shopt -o failglob in bash. In fish you should quote the string containing a glob character: nmap '192.168.1-3.*'.
Also, the default bash behavior is what could be described as "passglob" although that option isn't valid and thus can't be explicitly set in bash. That is, a glob that doesn't match any files is passed to the command without expansion. See also the "nullglob" option in bash.
With that command, it tries to find files that match 192.168.1-3.*. If it doesn't find them, it runs the command with a literal 192.168.1-3.*. If it does, it passes the matching filenames instead.
So try touch 192.168.1-3.banana (which creates a file called 192.168.1-3.banana) and run that command again in bash. It'll fail.
What you should have done even in bash is to quote the argument - nmap '192.168.1-3.*'. That will also work in fish.
Reacted by Bernardo García , Jeremy Wiebe, Francesco Pallotta, Jakob Dannel and Pratik Kulkarni
Activity
krader1961 commentedon Jul 2, 2017
Fish version 2.3 made "failglob" the default behavior (see issue #2719). This was done to catch mistakes made by the user. This is equivalent to
shopt -o failglobin bash. In fish you should quote the string containing a glob character:nmap '192.168.1-3.*'.krader1961 commentedon Jul 2, 2017
Also, the default bash behavior is what could be described as "passglob" although that option isn't valid and thus can't be explicitly set in bash. That is, a glob that doesn't match any files is passed to the command without expansion. See also the "nullglob" option in bash.
faho commentedon Jul 2, 2017
To explain the bash behavior a bit more:
With that command, it tries to find files that match
192.168.1-3.*. If it doesn't find them, it runs the command with a literal192.168.1-3.*. If it does, it passes the matching filenames instead.So try
touch 192.168.1-3.banana(which creates a file called 192.168.1-3.banana) and run that command again in bash. It'll fail.What you should have done even in bash is to quote the argument -
nmap '192.168.1-3.*'. That will also work in fish.anordal commentedon Jul 3, 2017
Essentially the same issue as #3649. In response to that, fish 2.6 got a new error message: #3919
krader1961 commentedon Jul 5, 2017
Closing since I think we've answered the question. Feel free to reopen, @narutowindy, if that isn't the case.
fix: prevent failglob error when $fisher_config is empty; close #455