python.tools.terminal_settings Namespace Reference

Classes

class  ShellType
 

Functions

def write_file (data)
 
def get_label (install_dir)
 
def create_entry (label, install_dir, st)
 
def get_shell (label)
 
def add_entry (label, install_dir, shell)
 We are using a naming schema that this should not happen, but if you install the exact same version twice (in different location) this will happen.
 
def disable_entry (install_dir)
 

Variables

string terminal_settings_path = f"{os.environ['LOCALAPPDATA']}\\Packages\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\LocalState\\settings.json"
 
dictionary prefix_dict = {ShellType.cmd: "opalsShell", ShellType.pwsh: "opalsPowerShell"}
 
 default_dir = os.path.normpath(os.path.join(__file__, "..", "..", ".."))
 
 parser
 
 default
 
 nargs
 
 help
 
 action
 
 choices
 
 args = parser.parse_args()
 
 install_dir = args.directory
 
 shell = ShellType[args.shell]
 
def label = get_label(install_dir)
 

Detailed Description

Helper script to add or remove opalsShell to the Terminal App

Variable Documentation

◆ parser

parser
Initial value:
1 = argparse.ArgumentParser(prog=os.path.basename(__file__),
2  description='Add/Remove opals installation to Terminal Application')