1. Eric Larson
  2. xenv


Eric Larson  committed 05211cd Draft

Added an id command to help see where the current xenv is. This is helpful when you want to verify you are using the right xenv

  • Participants
  • Parent commits 6b249ba
  • Branches default

Comments (0)

Files changed (1)

File xenv/main.py

View file
  • Ignore whitespace
 This defines the main 'xe' entry point to the xenv. Below, the parser
 definition describes the usage and UI for interacting with an xenv.
+from __future__ import print_function
 import os
 import sys
+def identity(xenv, args):
+    print('ROOT:', xenv.root)
 def run_cmd(xenv, args):
         create.add_argument('root', help='The root of the xenv')
+        # Check where the current xe is
+        ident = self.subs.add_parser('id', help='Get info on the current xenv')
+        ident.set_defaults(func=identity)
         # run a command via the xenv
         run = self.subs.add_parser('run', prefix_chars='!',
                                    help='Run a command from the xenv')