.#ý3 Shell_Default_Shellþ * is_defined.* 3 Shell_Default_Shell+ý% SHELLþ & getenv°3 Shell_Default_Shell 3 Shell_Default_Shell $ NULLA." sh°3 Shell_Default_Shell/c/bý? Shell_Default_Interactive_Shellþ * is_defined.* ? Shell_Default_Interactive_Shell+ " -i°? Shell_Default_Interactive_Shell/b* ) AShell_Id+" -1°) AShell_Id& 9 Current_Working_Directory+! .°9 Current_Working_Directory,* $ path+ $ path $ NULLA $ path! ~AD." ~/°$ path/c* # cwd+ & getcwd°# cwdý 9 Current_Working_Directoryþ % chdirPý $ pathþ / expand_filename°$ pathý # cwdþ % chdirP $ pathw†2 ashell_expand_path, 9 Current_Working_Directoryw†- ashell_getcwd,* # dir+ý # dirþ 2 ashell_expand_path°# dir" -1ý # dirþ % chdirA.ý3 chdir %s failed: %s # dirý % errnoþ , errno_stringþ & verror/c # dir°9 Current_Working_Directory†, ashell_chdir,* # cmd $ argc $ argv+* # arg+ýý! 1 $ argv!þ 2 ashell_expand_path°# arg! 0ý # argþ % chdirA. # arg°9 Current_Working_Directory/c # cmdw‚* builtin_cd,* # cmd $ argc $ argv+* # dir+ 9 Current_Working_Directory°# dirýý! 1 $ argc! 1:á $ argv!ýþ.* $ file+°$ fileýýý # dir $ fileþ & dircatþ / expand_filenameþ ) find_fileP/ƒ w‚, builtin_edit,* # cmd $ argc $ argv+. , _clear_errorý8 \nUnable to read file.\nþ & insert w/n $ argc ! 2=. # cmdw/cýý! 1 $ argv!þ ) read_filePý ' whatbufþ ' pop2buf ) most_mode w‚, builtin_most& , Builtin_Cmds+ý ( Ref_Type * Assoc_Type!°, Builtin_Cmds,* # cmd # fun+ # funý # cmd , Builtin_Cmds †2 ashell_add_builtiný" cd}* builtin_cdþ 2 ashell_add_builtiný$ edit}, builtin_editþ 2 ashell_add_builtiný# jed}, builtin_editþ 2 ashell_add_builtiný$ most}, builtin_mostþ 2 ashell_add_builtiný$ more}, builtin_mostþ 2 ashell_add_builtiný$ less}, builtin_mostþ 2 ashell_add_builtin,* # cmd+ * $ argv $ argc+ý # cmdþ & strtok°# cmdý # cmdþ & length°$ argcý $ argc! 19 + String_Type!°$ argv $ argc. # cmdýý! 0 $ argc! 1:á $ argv /c $ argc $ argvw‚/ parse_shell_cmd,* # cmd+* $ argc $ argv+ý # cmdþ / parse_shell_cmd°$ argv°$ argc $ argc. # cmdw/b* # fun ' command+ý! 0 $ argv!°' commandý , Builtin_Cmds ' commandþ 0 assoc_key_exists. # cmdw/bý ' command , Builtin_Cmds!°# funý # cmd $ argc $ argvþ # funMw‚+ try_builtin,* # buf+* ) this_line ) mark_line+* ! m " ch & prompt+ý ) AShell_Idþ , process_mark°! m ) what_line°) this_line ) push_marký ! mþ . goto_user_mark ) what_line°) mark_line ) this_line ) mark_line@. * pop_mark_0 - push_mark_eob ) bufsubstr°# buf/.ý" þ + bskip_chars ) push_mark $ bolp. ) go_left_1 ) what_char°" ch/b # bol ) bufsubstr°& prompt * pop_mark_1 # bolý & promptþ * looking_at.ýý & promptþ & strlenþ ( go_right/.ý " chþ * ffind_char. * go_right_1/c/d - push_mark_eol ) bufsubstr°# buf # eobý # bufþ & insert/d ' newlineý ! mþ . move_user_marký # bufþ + try_builtin°# bufý ) AShell_Id # buf" \n9þ , send_processy1 ashell_send_input,ý ) AShell_Id! 2þ 1 signal_fg_processy0 ashell_send_intr,* 2 partial_completion+* # dir $ file+ ) push_spot ) push_marký) ^ '`"><$þ + bskip_chars ) bufsubstr °2 partial_completion ( pop_spotý 2 partial_completionþ . parse_filename°$ file°# dirý # dirþ 2 ashell_expand_path°# dir* # len+ý $ fileþ & strlen°# len* % files+ý # dirþ ' listdir°% filesýý! 0ý ( Int_Type}' strncmp % files $ file # lenþ ) array_mapAþ % where % files!°% files* + num_matches+ý % filesþ & length°+ num_matches + num_matches! 0A.ý. No completionsþ ' messagew/c* % match+* ! i+! 0 + num_matches! 1:! 1.°! iý ! i % files!°% match! 2ýý # dir % matchþ + path_concatþ + file_statusA.ý % match þ + path_concatý ! i % files /c/hý! 0 % files!°% match + num_matches! 1A.ýýý # lenâá % match!þ & insertw/c # lený % matchþ & strlen! 1:! 1.°! i* ) try_match+ýý! 0 ! iá % match!°) try_match + num_matchesýý! 0ý ( Int_Type}' strncmp ) try_match % files ! i! 19þ ) array_mapAþ % whereþ & lengthB. ! i # lenB.ýýý # len ! i! 1:á % match!þ & insert/cv/c/h* $ cbuf+ ' whatbuf°$ cbufý- *completions*þ ' pop2buf , erase_buffer % filesýþ.ýþ & insert ' newline/ƒ 8 buffer_format_in_columns # bobý $ cbufþ ' pop2bufý5 Ambiguous Completionsþ ' messagey1 ashell_completion) AShellMap°" $1ý " $1þ ( keymap_p.ý " $1þ + make_keymap/bý1 ashell_send_input" ^M " $1þ ) definekeyý" ^C " $1þ + undefinekeyý0 ashell_send_intr" ^C " $1þ ) definekeyý 1 ashell_completion! " $1þ ) definekey,* # pid % flags & status+* # msg+ # eobý # pid % flags & statusþ 9 aprocess_stringify_status°# msgý7 \n\n----- %s ------\n\n # msgþ ' vinsert" -1°) AShell_Idy5 ashell_signal_handler,* # pid # str+ # eob ) push_spotý # strþ & insert ( pop_spot # bolý" \r + Null_Stringþ ' replace # eobýý # pidþ , process_markþ . move_user_marky4 ashell_insert_output,* # buf+( *ashell*°# buf* # arg % nargs+! 0°% nargs ) AShell_Id" -1Bý # bufþ ' bufferpC.ý # bufþ ' pop2bufýO Currently, only one shell process is supported.þ % error/cý # bufþ ' pop2buf + getbuf_infoPP°9 Current_Working_DirectoryPý 9 Current_Working_Directoryþ % chdirPý) AShellMapþ * use_keymapý0 ashell_mode_hookþ . run_mode_hooks , erase_buffer .ý 3 Shell_Default_Shell % nargs" 32þ / extract_element°# arg # arg $ NULLA.v/c·% nargs # arg/e ? Shell_Default_Interactive_Shell % nargs , open_process°) AShell_Idý ) AShell_Id& signal5 ashell_signal_handlerþ + set_processý ) AShell_Id& output 4 ashell_insert_outputþ + set_processy& ashellý& ashellþ ' provide