SLSH(1) SLSH(1) (NAME) slsh - S-Lang (SYNOPSIS) slsh [ --help ] [ --version ] [ -g ] [ -n ] [ --init file ] [ --no- readline ] [ -e string ] [ -i ] [ -q, --quiet ] [ -t ] [ -v ] [ -|script-file args... ] (DESCRIPTION) slsh S-Lang . S-Lang readline . (OPTIONS) --help . --version slsh. -g (tracebacks) . -n . --init file ~/.slshrc. --no-readline readline . -e string <> S-Lang. -i . (stdin) (stdout) slsh . -q, --quiet . -t slsh slsh_main . (syntax error) . -v (verbose) . . (INITIALIZATION) slsh.rc . SLSH_CONF_DIR SLSH_LIB_DIR slsh slsh.rc . : $(prefix)/etc/ ( Makefile ) /usr/local/etc/ /usr/local/etc/slsh/ /etc/ /etc/slsh/ slsh.rc slsh . slsh.rc $HOME/.slshrc slsh . . - stdin . -e slsh . slsh_main . (LOADING FILES) evalfile require ( slsh.rc ) SLSH_PATH Makefile . SLSH_PATH . get_slang_load_path set_slang_load_path : set_slang_load_path ("/home/bill/lib/slsh:/usr/share/slsh"); (INTERACTIVE MODE) slsh -i . . EOF ( Ctrl-D) quit . . . : slsh> 3*10; 30 slsh> x = [1:20]; slsh> sum (sin(x)-cos(x)); 0.458613 slsh> quit; . (logging) . start_log . stop_log . slsh.log . start_log : slsh> start_log; Logging input to slsh.log . . slsh> stop_log; slsh> start_log("foo.log"); Logging input to foo.log . . slsh> stop_log; slsh> start_log; Logging input to foo.log save_input : slsh> save_input; Input saved to slsh.log slsh> save_input ("foo.log"); Input saved to foo.log (semicolon) . : slsh> x = [ 1,2,3, 4,5,6]; slsh> sum(x); . $HOME/.slshrc : #ifdef __INTERACTIVE__ slsh_append_semicolon (1); #endif (shell escapes) . ! : slsh> !pwd /grandpa/d1/src/slang2/slsh slsh> !cd doc/tm slsh> !pwd /grandpa/d1/src/slang2/slsh/doc/tm help apropos : slsh> apropos list apropos list ==> List_Type list_append list_delete . . slsh> help list_append list_append SYNOPSIS Append an object to a list USAGE list_append (List_Type, object, Int_Type nth) . . help apropos . READLINE (READLINE HISTORY MECHANISM) slsh readline S-Lang . slsh ( S-Lang ) .slrlinerc . readline . .slrlinerc : % Load some basic functions that implement the history mechanism () = evalfile ("rline/slrline.rc"); % The name of the history file -- expands to .slsh_hist for slsh RLine_History_File = "$HOME/.${name}_hist"; % Some addition keybindings. Some of these functions are defined % in rline/editfuns.sl, loaded by rline/slrline.rc rline_unsetkey ("^K"); rline_setkey ("bol", "^B"); rline_setkey ("eol", "^E"); rline_setkey (&rline_kill_eol, "^L"); rline_setkey (&rline_set_mark, "^K^B"); rline_setkey (&rline_copy_region, "^Kk"); rline_setkey (&rline_kill_region, "^K^V"); rline_setkey (&rline_yank, "^K^P"); rline_setkey ("redraw", "^R"); #ifexists rline_up_hist_search % Map the up/down arrow to the history search mechanism rline_setkey (&rline_up_hist_search, "\e[A"); rline_setkey (&rline_down_hist_search, "\e[B"); #endif #ifexists rline_edit_history rline_setkey (&rline_edit_history, "^Kj"); #endif % Add a new function private define double_line () { variable p = rline_get_point (); variable line = rline_get_line (); rline_eol (); variable pend = rline_get_point (); rline_ins (line); rline_set_point (pend + p); } rline_setkey (&double_line, "^K^L"); (MISCELLANEOUS SCRIPTS) $prefix/share/slsh/scripts/ $prefix slsh (/usr /usr/local ...). : sldb S-Lang . jpegsize jpeg . svnsh SVN. (AUTHORS) slsh . (John E. Davis) . (Mike Noble) . S-Lang slsh John E. Davis . Rafael Laboissiere (Debian) ( ). / (GNU General Public License) . /usr/share/common-licenses/GPL . 19 February 2021 SLSH(1)