X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aft.c;h=df295246db0cf1d1d6e3d0b202d43c86332db0f6;hp=261054df8fc4012236b42246158b87b77ce1623c;hb=2b9aa8a29a6bcc28a76289934d6dc6ca5606336f;hpb=9d8fdf8898418711558f70a9630b2444036d8285 diff --git a/aft.c b/aft.c index 261054df..df295246 100644 --- a/aft.c +++ b/aft.c @@ -696,7 +696,13 @@ static int get_local_time(uint64_t *seconds, char *buf, size_t size, return -E_STRFTIME; return 1; } - if (!strftime(buf, size, "%b %e %Y", tm)) + /* + * If the given time is more than six month away from the current time, + * we print only the year. The additional space character in the format + * string below makes the formated date align nicely with dates that + * contain the time (those written by the above strftime() statement). + */ + if (!strftime(buf, size, "%b %e %Y", tm)) return -E_STRFTIME; return 1; } @@ -1404,10 +1410,14 @@ int com_ls(struct command_context *cc) return -E_AFT_SYNTAX; } } - if (!strcmp(arg, "-p")) { + if (!strcmp(arg, "-p") || !strcmp(arg, "-F")) { flags |= LS_FLAG_FULL_PATH; continue; } + if (!strcmp(arg, "-b")) { + flags &= ~LS_FLAG_FULL_PATH; + continue; + } if (!strcmp(arg, "-a")) { flags |= LS_FLAG_ADMISSIBLE_ONLY; continue;