fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
e9bf8b9a4
master
1complete touch -d"change file access and modification times" 2# common options 3complete touch -s a -d"change access time (atime)" 4complete touch -s m -d"change modification time (mtime)" 5complete touch -s t -d"use specified time [[CC]YY]MMDDhhmm[.SS]" 6 7if touch --version2> /dev/null> /dev/null# GNU 8complete touch -s B -l backward -x -d"set date back" 9complete touch -s c -l no-create -d"don't create file if it doesn't exist" 10complete touch -s d -l date -x -d"set to specified YYYY-MM-DDThh:mm:SS[.frac][tz]" 11complete touch -s f -l forward -x -d"set date forward" 12complete touch -s r -l reference -d"use times from specified reference file" 13# TODO these may require that = but builtin complete doesn't seem to infer it should 14# use = here 15complete touch -l time -x -d"change specified kind of timestamp" -a\ 16"atime\t'change access time (atime) only' 17access\t'change access time (atime) only' 18use\t'change access time (atime) only' 19mtime\t'change modification time (mtime) only' 20modify\t'change modification time (mtime) only'" 21complete touch -l help -d"display help" 22complete touch -l version -d"display version" 23else # not GNU 24set -l uname( uname -s) 25contains $uname Darwin DragonFly FreeBSD 26and complete touch -s A -d"adjust timestamps by relative value [-][hh]mm]SS" -x 27contains $uname Darwin DragonFly FreeBSD NetBSD 28and complete touch -s h -d"act on symbolic links themselves" 29contains $uname Darwin DragonFly FreeBSD OpenBSD SunOS 30and complete touch -s d -d"set to specified YYYY-MM-DDThh:mm:SS[.frac][tz]" -x 31# common BSD options 32complete touch -s c -d"don't create file if it doesn't exist" 33complete touch -s r -d"use times from specified reference file" -r 34end