X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=status.go;h=a75108e1a03879ab0f40a9f5fde013f42766818f;hb=b4eefdd675c9aef9ff8bd1089d031ee05733195b;hp=0852dbd03c7579420af105f386349b17656c52ce;hpb=b5a5c4fcfcc6fb214136a5cfafaa92d0e50c002a;p=goredo.git diff --git a/status.go b/status.go index 0852dbd..a75108e 100644 --- a/status.go +++ b/status.go @@ -1,6 +1,6 @@ /* goredo -- djb's redo implementation on pure Go -Copyright (C) 2020-2021 Sergey Matveev +Copyright (C) 2020-2023 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,9 +37,17 @@ const ( var ( FdStatus *os.File - flagNoStatus = flag.Bool("no-status", false, "disable statusline (REDO_NO_STATUS=1)") + flagNoStatus *bool ) +func init() { + cmdName := CmdName() + if !(cmdName == CmdNameRedo || cmdName == CmdNameRedoIfchange) { + return + } + flagNoStatus = flag.Bool("no-status", false, "disable statusline (REDO_NO_STATUS=1)") +} + func statusInit() { if NoProgress || *flagNoStatus { return