-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Extend 'test' with non-POSIX file time comparison extensions #3589
Comments
Strangely, our included completions for |
Our builtin doesn't do some of this stuff. See #3589
Sooo... which time does this compare? atime, ctime or mtime? Or all of them? |
|
In the mean time, what's the recommended way of testing which of two files is newer in fish shell? |
Your system most likely has a Or something like Or, if you're doing this for None of this is standard (but "-nt" isn't to begin with), so it won't work on e.g. Solaris or OpenBSD, but your normal GNU/Linux should have all of these. |
@faho Thanks! I was really getting stuck with |
Welll... no, not really. The problem is that
You mean like So... the
If you really want to use |
|
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in fish-shell#3589: testing if one file is newer than another file.
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in fish-shell#3589: testing if one file is newer than another file.
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in fish-shell#3589: testing if one file is newer than another file.
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in fish-shell#3589: testing if one file is newer than another file. -ef is a common extension to test(1) which checks if two paths refer to the same file, by comparing the dev and inode numbers.
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in fish-shell#3589: testing if one file is newer than another file. -ef is a common extension to test(1) which checks if two paths refer to the same file, by comparing the dev and inode numbers.
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in fish-shell#3589: testing if one file is newer than another file. -ef is a common extension to test(1) which checks if two paths refer to the same file, by comparing the dev and inode numbers.
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in fish-shell#3589: testing if one file is newer than another file. -ef is a common extension to test(1) which checks if two paths refer to the same file, by comparing the dev and inode numbers.
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in fish-shell#3589: testing if one file is newer than another file. -ef is a common extension to test(1) which checks if two paths refer to the same file, by comparing the dev and inode numbers.
These are non-POSIX extensions other test(1) utilities implement, which compares the modification time of two files as proposed for fish in #3589: testing if one file is newer than another file. -ef is a common extension to test(1) which checks if two paths refer to the same file, by comparing the dev and inode numbers.
These non-POSIX extensions are pretty popular and commonly used. I can't see the harm in making it easier to do file date comparisons with fish using
test
.At least on OS X, these are the other operations the system
test
can do that aren't POSIX, according to the manpage. Fish already supports-O
and-G
.The text was updated successfully, but these errors were encountered: