Skip to content

Add -version, -root, and -branch for printing version, SAGE_ROOT, and branch information. #433

@ncalexan

Description

@ncalexan
mannequin

Add -version, -root, and -branch for printing version, SAGE_ROOT, and branch information.

Useful from the command line.

Version information is taken from sage-banner; I would prefer it to be taken from the mercurial tags, but these are not kept updated.

The root information is taken from the environment via sage-env.

The branch information is taken from readlink SAGE_ROOT/devel/sage.

mero:~/sage/local/bin ncalexan$ sage -v
SAGE Version 2.8, Release Date: 2007-08-12

mero:~/sage/local/bin ncalexan$ sage -version
SAGE Version 2.8, Release Date: 2007-08-12

mero:~/sage/local/bin ncalexan$ sage -branch
nca

mero:~/sage/local/bin ncalexan$ sage -root
/Users/ncalexan/sage

Component: user interface

Keywords: version root branch

Issue created by migration from https://trac.sagemath.org/ticket/433

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions