1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980open!ImportincludeBase.Sysletunix_quotex=if(not(String.is_emptyx))&&String.for_allx~f:(function|'a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|':'|'.'|'/'|','|'+'|'='|'%'|'@'->true|_->false)then((* Shell keywords, as output by [compgen -k] for bash, [man dash] for dash, and [PATH=
type -m '*' | grep reserved] for zsh, except for keywords that have special
characters like [[. Note that builtins don't matter because 'alias' and alias
behave the same, unlike 'if' and if. *)matchxwith|"if"|"then"|"else"|"elif"|"fi"|"case"|"esac"|"for"|"select"|"while"|"until"|"do"|"done"|"in"|"function"|"time"|"coproc"|"foreach"|"repeat"|"nocorrect"->Filename.quotex|_->x)elseFilename.quotex;;letquote=matchCaml.Sys.os_typewith|"Unix"->unix_quote|_->Filename.quote;;letconcat_quotedsplit_command=List.map~f:quotesplit_command|>String.concat~sep:" ";;letc_int_size=`Use_Sys_unixletcatch_break=`Use_Sys_unixletchdir=`Use_Sys_unixletcommand=`Use_Sys_unixletcommand_exn=`Use_Sys_unixletexecutable_name=`Use_Sys_unixletexecution_mode=`Use_Sys_unixletfile_exists=`Use_Sys_unixletfile_exists_exn=`Use_Sys_unixletfold_dir=`Use_Sys_unixletgetcwd=`Use_Sys_unixlethome_directory=`Use_Sys_unixletis_directory=`Use_Sys_unixletis_directory_exn=`Use_Sys_unixletis_file=`Use_Sys_unixletis_file_exn=`Use_Sys_unixletls_dir=`Use_Sys_unixletoverride_argv=`Use_Sys_unixletreaddir=`Use_Sys_unixletremove=`Use_Sys_unixletrename=`Use_Sys_unixletunsafe_getenv=`Use_Sys_unixletunsafe_getenv_exn=`Use_Sys_unixexceptionBreak=Caml.Sys.BreakmodulePrivate=structletunix_quote=unix_quoteend