fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerRun fish_indent on share/completions/*.fishe9bf8b9a4

master
1.8 KiB34 linesraw
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 --version 2>/dev/null >/dev/null # GNU
8    complete touch -s B -l backward -x -d "set date back"
9    complete touch -s c -l no-create -d "don't create file if it doesn't exist"
10    complete touch -s d -l date -x -d "set to specified YYYY-MM-DDThh:mm:SS[.frac][tz]"
11    complete touch -s f -l forward -x -d "set date forward"
12    complete 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
15    complete touch -l time -x -d "change specified kind of timestamp" -a \
16        "atime\t'change access time (atime) only'
17    access\t'change access time (atime) only'
18    use\t'change access time (atime) only'
19    mtime\t'change modification time (mtime) only'
20    modify\t'change modification time (mtime) only'"
21    complete touch -l help -d "display help"
22    complete touch -l version -d "display version"
23else # not GNU
24    set -l uname (uname -s)
25    contains $uname Darwin DragonFly FreeBSD
26    and complete touch -s A -d "adjust timestamps by relative value [-][hh]mm]SS" -x
27    contains $uname Darwin DragonFly FreeBSD NetBSD
28    and complete touch -s h -d "act on symbolic links themselves"
29    contains $uname Darwin DragonFly FreeBSD OpenBSD SunOS
30    and complete touch -s d -d "set to specified YYYY-MM-DDThh:mm:SS[.frac][tz]" -x
31    # common BSD options
32    complete touch -s c -d "don't create file if it doesn't exist"
33    complete touch -s r -d "use times from specified reference file" -r
34end