How can I display the time in 24h format?
ruipacheco opened this issue · comments
I tried "+%a %H:%M" but doesn't seem to work.
beau:beau@github ~ ./rw
$ set -g theme_display_time yes
01:59 beau:beau@github ~ ./rw
$ set -g theme_display_time_format '+%a %H:%M'
Fri 14:00 beau:beau@github ~ ./rw
$
If this doesn't work can you list your fish --version
and command date --version
fish --version Fri Nov 16 21:07:36 2018
fish, version 2.7.1
~/P/a/io.js ⎇
command date --version Fri Nov 16 21:07:39 2018
date: illegal option -- -
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
! ~/P/a/io.js ⎇
Fri Nov 16 21:07:41 2018
Which operating system? And what does the last line of the date manual page show? ie: man date | tail -n 1
Latest macOS.
BSD May 7, 2015 BSD
Is it possible it's not calling /bin/date? The command date
command ignores any date functions or builtins, ensuring it calls a date command in your PATH. We tested on a MacOS with the same version of date here without any issues
> which date
/bin/date
date --version
date: illegal option -- -
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
! ~
which date
/bin/date
~
Are you sure you're putting the date format in quotations? set -g theme_display_time_format '+%a %H:%M'
ruihpacheco:staff@descartes ~ ./rw
$ vi .config/omf/init.fish
set -g theme_display_time yes
set -g theme_display_time_format '+%a %H:%M'
$ omf reload
12:25 ruihpacheco:staff@descartes ~ ./rw
It's currently midnight where I am so I assume I'd see 00:25? I know that I was seeing 08 at 8pm instead of 20.
That explains it, the theme is overriding variables defined in init.fish
. Reinstall the theme and see if it's working properly now
Fixed, thanks!