#!/usr/bin/python # # This file contains definitions that describe the output of your esh. # # You may adapt all settings in this file to match the output of your # shell. (Alternatively, you may write your shell to match these templates.) # # the shell executable. shell = "./esh" # the prompt printed by your shell prompt = "esh>" # the test rpompts for config_propt_test.py import os, getpass, socket user = getpass.getuser() host = socket.gethostname() cwd = os.getcwd() cwd_formated = cwd home = os.getenv('HOME') if home in cwd: cwd_formated = '~' + cwd[len(home):len(cwd)] else: cwd_formated = cwd prompt1 = "A custom prompt>" prompt2 = "/u/h/w>" prompt3 = host + ':' + cwd_formated + '>' + user + '@' prompt_default = user + '@' + host + ':' + cwd_formated + '>' # # a regexp matching the message printed when a job is sent into the background # must capture (jobid, processid) # bgjob_regex = "\[(\d+)\] (\d+)" # # a regexp matching a job status when printed using the 'jobs' command # must capture (jobid, jobstatus, commandline) # job_status_regex = "\[(\d+)\].?\s+(\S+)\s+\((.+?)\)\r\n" # # job status messages # jobs_status_msg = { 'stopped' : "Stopped", 'running' : "Running" } # # builtin commands # # Use printf-style formats. stop, kill, fg, and bg expect job ids. # If your shell requires a % before the jobid, use %%%s. # builtin_commands = { 'jobs' : 'jobs', 'stop' : 'stop %s', 'kill' : 'kill %s', 'fg' : 'fg %s', 'bg' : 'bg %s' } # Uncomment this line if you like stdriver.py to keep a log of everything # input and output to the pty in file 'log.txt' # logfile=open("log.txt", "w")