batch = {}

function batch.get_keywords()
  local keywords0_set = "aux break call cls cmdextversion com1 com2 com3 com4 com5 com6 com7 com8 com9 con defined disabledelayedexpansion disableextensions do echo echo. else enabledelayedexpansion enableextensions endlocal equ errorlevel exist exit for geq goto gtr if in leq lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9 lss neq not nul pause popd prn rem set setlocal shift title ver verify assoc cd chdir color copy date del dir erase ftype md mkdir mklink move path prompt pushd rd ren rename rmdir start time type vol"
  local keywords1_set = "active add append arp assign at atmadm attach-vdisk attrib attributes auditpol autochk autoconv autofmt automount bcdboot bcdedit bdehdcfg begin bitsadmin bootcfg cacls certreq certutil change chcp chglogon chgport chgusr chkdsk chkntfs choice cipher clean cleanmgr clip cmd cmdkey cmstp comp compact convert cprofile create cscript dcgpofix defrag delete detach detail dfsdiag dfsrmig diantz diskcomp diskcopy diskpart diskperf diskraid diskshadow dispdiag dnscmd doskey driverquery edit end eventcreate eventquery eventtriggers exec expand expose extend extract fc filesystems find findstr finger flattemp fondue forfiles format freedisk fsutil ftp fveupdate getmac gettype gpfixup gpresult gpt gpupdate graftabl help helpctr hostname icacls import inactive inuse ipconfig ipxroute irftp jetpack klist ksetup ktmutil ktpass label list load lodctr logman logoff lpq lpr macfile makecab manage mapadmin merge mmc mode more mount mountvol mqbkup mqsvc mqtgsvc msdt msg msiexec msinfo32 mstsc nbtstat net netcfg netsh netstat nfsadmin nfsshare nfsstat nlbmgr nslookup ntbackup ntcmdprompt ntfrsutl offline online openfiles pagefileconfig pathping pbadmin pentnt perfmon ping pnpunattend pnputil powershell print prncnfg prndrvr prnjobs prnmngr prnport prnqctl pubprn pushprinterconnections pwlauncher qappsrv qprocess query quser qwinsta rcp rdpsign recover refsutil reg regini regsvr32 relog remove repair replace rescan reset retain revert rexec risetup robocopy route rpcinfo rpcping rsh rundll32 rwinsta san sc schtasks scwcmd secedit select serverceipoptin servermanagercmd serverweroptin setx sfc shadow showmount shrink shutdown simulate sort subcommand subst sxstrace sysocmgr systeminfo takeown tapicfg taskkill tasklist tcmsetup telnet tftp timeout tlntadmn tpmtool tpmvscmgr tracerpt tracert tree tscon tsdiscon tsecimp tskill tsprof typeperf tzutil unexpose uniqueid unlodctr verifier vssadmin waitfor wbadmin wdsutil wecutil wevtutil where whoami winnt winnt32 winpop winrs winsat wmic writer wscript xcopy ABOVENORMAL AFFINITY BELOWNORMAL EOF HIGH LOW MAX MIN NODE NORMAL REALTIME SEPARATE SHARED WAIT abovenormal addenctypeattr addfile addfileset addfilewithranges addhosttorealmmap addkdc addkpasswd addrealmflags addsw affinity alert alias all analyze and api ascii autounlock backup basic bde behavior bell belownormal binary bye cache cancel catalog cfg changekey changepassword changepin class clear close compare complete config configure context counter d2 dbg1394 debug default delenctypeattr deleteurl delhosttorealmmap delims delkdc delkpasswd delrealmflags device dirty disable disconnect discover disk disks display domain driveinfo drivergroup drivergroupfilter driverpackage dumpstate dynamic efi ems enable enableanalyticchannel environmental eof eol examples export extended file forcerecovery fsinfo generaterollback get getaclflags getbytestotal getbytestransferred getclientcertificate getcompletiontime getconfigurationflags getcreationtime getcustomheaders getdescription getdisplayname getenctypeattr geterror geterrorcount getexpirationtime getfilestotal getfilestransferred gethelpertokenflags gethelpertokensid gethttpmethod getieproxy getlimit getmaxdownloadtime getminretrydelay getmodificationtime getnoprogresstimeout getnotifycmdline getnotifyflags getnotifyinterface getowner getpeercachingflags getpriority getproxybypasslist getproxylist getproxyusage getreplydata getreplyfilename getreplyprogress getsecurityflags getstate gettemporaryname getvalidationstate glob group hardlink hash high id image imagegroup info ise items job keypackage lcd listfiles listrealmflags literal lock logical logon low ls lserver makecustomheaderswriteonly mapuser max mbr mdelete mdir mem metadata mfmedia mget min mirror mls monitor mput msr multicasttransmission namespace newdriveletter node normal nowrap objectid off on open option partition peercaching peers port primary printui process protectors providers put pwd querytype quiet quit quota quote raid raw rawreturn realtime recovery recurse recv register remotehelp removeclientcertificate removecredentials removerealm repairservice reparsepoint replaceremoteprefix resize resource resourcesacl restart restore resume retry rmsw rollback root save search send separate server session setaclflag setclientcertificatebyid setclientcertificatebyname setcomputerpassword setconfigurationflags setcredentials setcustomheaders setdescription setdisplayname setenctypeattr setexpirationtime sethelpertoken sethelpertokenflags sethttpmethod setidentifier setieproxy setlimit setmaxdownloadtime setminretrydelay setnoprogresstimeout setnotifycmdline setnotifyflags setpeercachingflags setpriority setproxysettings setrealm setrealmflags setreplyfilename setsecurityflags setvalidationstate shadows shadowstorage shared simple size skip sparse srchlist status stop stripe suspend sysrecovery systemstatebackup systemstaterecovery takeownership target termserver testdcs testdfsconfig testdfsintegrity testreferral testsites tiering tokens tpm trace transaction transfer transform transportserver unload unlock unset update upgrade usebackq user usn util validate variables vc vdisk verbose version versions view volume wait wim wipefreespace wrap writers ws2008"
  local keywords2_set = "ASSOC ATTRIB AUX BCDEDIT BREAK CACLS CALL CD CHCP CHDIR CHKDSK CHKNTFS CLS CMD CMDEXTVERSION COLOR COM1 COM2 COM3 COM4 COM5 COM6 COM7 COM8 COM9 COMP COMPACT CON CONVERT COPY CmdExtVersion DATE DEFINED DEL DIR DISABLEDELAYEDEXPANSION DISABLEEXTENSIONS DISKPART DO DOSKEY DRIVERQUERY DisableDelayedExpansion DisableExtensions ECHO ECHO. ELSE ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS ENDLOCAL EQU ERASE ERRORLEVEL EXIST EXIT EnableDelayedExpansion EnableExtensions EndLocal ErrorLevel Evntcmd FC FIND FINDSTR FOR FORMAT FSUTIL FTYPE GEQ GOTO GPRESULT GRAFTABL GTR HELP ICACLS IF IN LABEL LEQ LPT1 LPT2 LPT3 LPT4 LPT5 LPT6 LPT7 LPT8 LPT9 LSS MD MKDIR MKLINK MODE MORE MOVE NEQ NOT NUL OPENFILES PATH PAUSE POPD PRINT PRN PROMPT PUSHD RD RECOVER REM REN RENAME REPLACE RMDIR ROBOCOPY SC SCHTASKS SET SETLOCAL SHIFT SHUTDOWN SORT START SUBST SYSTEMINFO SetLocal TASKKILL TASKLIST TIME TITLE TREE TYPE VER VERIFY VOL WMIC XCOPY ALLUSERSPROFILE APPDATA AllUsersProfile AppData CMDCMDLINE COMPUTERNAME CmdCmdLine ComSpec CommonProgramFiles CommonProgramFiles(x86) CommonProgramW6432 ComputerName DriverData ExitCode ExitCodeAscii HIGHESTNUMANODENUMBER HOMEDRIVE HOMEPATH HighestNumaNodeNumber HomeDrive HomePath LOCALAPPDATA LOGONSERVER LocalAppData LogonServer NUMBER_OF_PROCESSORS Number_Of_Processors OS PATHEXT PROCESSOR_ARCHITECTURE PROCESSOR_IDENTIFIER PROCESSOR_LEVEL PROCESSOR_REVISION PSModulePath PUBLIC Path PathExt Processor_Architecture Processor_Identifier Processor_Level Processor_Revision ProgramData ProgramFiles ProgramFiles(x86) ProgramW6432 Public RANDOM Random SESSIONNAME SessionName SystemDrive SystemRoot TEMP TMP USERDOMAIN USERDOMAIN_ROAMINGPROFILE USERNAME USERPROFILE UserDomain UserDomain_RoamingProfile UserName UserProfile WINDIR WinDir __APPDIR__ __AppDir__ __CD__ random windir"
  return keywords0_set,keywords1_set,keywords2_set
end

function batch.get_autocomplete()
  local autocomplete_set = "aux break call cls cmdextversion com1 com2 com3 com4 com5 com6 com7 com8 com9 con defined disabledelayedexpansion disableextensions do echo echo. else enabledelayedexpansion enableextensions endlocal equ errorlevel exist exit for geq goto gtr if in leq lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9 lss neq not nul pause popd prn rem set setlocal shift title ver verify assoc cd chdir color copy date del dir erase ftype md mkdir mklink move path prompt pushd rd ren rename rmdir start time type vol active add append arp assign at atmadm attach-vdisk attrib attributes auditpol autochk autoconv autofmt automount bcdboot bcdedit bdehdcfg begin bitsadmin bootcfg cacls certreq certutil change chcp chglogon chgport chgusr chkdsk chkntfs choice cipher clean cleanmgr clip cmd cmdkey cmstp comp compact convert cprofile create cscript dcgpofix defrag delete detach detail dfsdiag dfsrmig diantz diskcomp diskcopy diskpart diskperf diskraid diskshadow dispdiag dnscmd doskey driverquery edit end eventcreate eventquery eventtriggers exec expand expose extend extract fc filesystems find findstr finger flattemp fondue forfiles format freedisk fsutil ftp fveupdate getmac gettype gpfixup gpresult gpt gpupdate graftabl help helpctr hostname icacls import inactive inuse ipconfig ipxroute irftp jetpack klist ksetup ktmutil ktpass label list load lodctr logman logoff lpq lpr macfile makecab manage mapadmin merge mmc mode more mount mountvol mqbkup mqsvc mqtgsvc msdt msg msiexec msinfo32 mstsc nbtstat net netcfg netsh netstat nfsadmin nfsshare nfsstat nlbmgr nslookup ntbackup ntcmdprompt ntfrsutl offline online openfiles pagefileconfig pathping pbadmin pentnt perfmon ping pnpunattend pnputil powershell print prncnfg prndrvr prnjobs prnmngr prnport prnqctl pubprn pushprinterconnections pwlauncher qappsrv qprocess query quser qwinsta rcp rdpsign recover refsutil reg regini regsvr32 relog remove repair replace rescan reset retain revert rexec risetup robocopy route rpcinfo rpcping rsh rundll32 rwinsta san sc schtasks scwcmd secedit select serverceipoptin servermanagercmd serverweroptin setx sfc shadow showmount shrink shutdown simulate sort subcommand subst sxstrace sysocmgr systeminfo takeown tapicfg taskkill tasklist tcmsetup telnet tftp timeout tlntadmn tpmtool tpmvscmgr tracerpt tracert tree tscon tsdiscon tsecimp tskill tsprof typeperf tzutil unexpose uniqueid unlodctr verifier vssadmin waitfor wbadmin wdsutil wecutil wevtutil where whoami winnt winnt32 winpop winrs winsat wmic writer wscript xcopy ABOVENORMAL AFFINITY BELOWNORMAL EOF HIGH LOW MAX MIN NODE NORMAL REALTIME SEPARATE SHARED WAIT abovenormal addenctypeattr addfile addfileset addfilewithranges addhosttorealmmap addkdc addkpasswd addrealmflags addsw affinity alert alias all analyze and api ascii autounlock backup basic bde behavior bell belownormal binary bye cache cancel catalog cfg changekey changepassword changepin class clear close compare complete config configure context counter d2 dbg1394 debug default delenctypeattr deleteurl delhosttorealmmap delims delkdc delkpasswd delrealmflags device dirty disable disconnect discover disk disks display domain driveinfo drivergroup drivergroupfilter driverpackage dumpstate dynamic efi ems enable enableanalyticchannel environmental eof eol examples export extended file forcerecovery fsinfo generaterollback get getaclflags getbytestotal getbytestransferred getclientcertificate getcompletiontime getconfigurationflags getcreationtime getcustomheaders getdescription getdisplayname getenctypeattr geterror geterrorcount getexpirationtime getfilestotal getfilestransferred gethelpertokenflags gethelpertokensid gethttpmethod getieproxy getlimit getmaxdownloadtime getminretrydelay getmodificationtime getnoprogresstimeout getnotifycmdline getnotifyflags getnotifyinterface getowner getpeercachingflags getpriority getproxybypasslist getproxylist getproxyusage getreplydata getreplyfilename getreplyprogress getsecurityflags getstate gettemporaryname getvalidationstate glob group hardlink hash high id image imagegroup info ise items job keypackage lcd listfiles listrealmflags literal lock logical logon low ls lserver makecustomheaderswriteonly mapuser max mbr mdelete mdir mem metadata mfmedia mget min mirror mls monitor mput msr multicasttransmission namespace newdriveletter node normal nowrap objectid off on open option partition peercaching peers port primary printui process protectors providers put pwd querytype quiet quit quota quote raid raw rawreturn realtime recovery recurse recv register remotehelp removeclientcertificate removecredentials removerealm repairservice reparsepoint replaceremoteprefix resize resource resourcesacl restart restore resume retry rmsw rollback root save search send separate server session setaclflag setclientcertificatebyid setclientcertificatebyname setcomputerpassword setconfigurationflags setcredentials setcustomheaders setdescription setdisplayname setenctypeattr setexpirationtime sethelpertoken sethelpertokenflags sethttpmethod setidentifier setieproxy setlimit setmaxdownloadtime setminretrydelay setnoprogresstimeout setnotifycmdline setnotifyflags setpeercachingflags setpriority setproxysettings setrealm setrealmflags setreplyfilename setsecurityflags setvalidationstate shadows shadowstorage shared simple size skip sparse srchlist status stop stripe suspend sysrecovery systemstatebackup systemstaterecovery takeownership target termserver testdcs testdfsconfig testdfsintegrity testreferral testsites tiering tokens tpm trace transaction transfer transform transportserver unload unlock unset update upgrade usebackq user usn util validate variables vc vdisk verbose version versions view volume wait wim wipefreespace wrap writers ws2008 ASSOC ATTRIB AUX BCDEDIT BREAK CACLS CALL CD CHCP CHDIR CHKDSK CHKNTFS CLS CMD CMDEXTVERSION COLOR COM1 COM2 COM3 COM4 COM5 COM6 COM7 COM8 COM9 COMP COMPACT CON CONVERT COPY CmdExtVersion DATE DEFINED DEL DIR DISABLEDELAYEDEXPANSION DISABLEEXTENSIONS DISKPART DO DOSKEY DRIVERQUERY DisableDelayedExpansion DisableExtensions ECHO ECHO. ELSE ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS ENDLOCAL EQU ERASE ERRORLEVEL EXIST EXIT EnableDelayedExpansion EnableExtensions EndLocal ErrorLevel Evntcmd FC FIND FINDSTR FOR FORMAT FSUTIL FTYPE GEQ GOTO GPRESULT GRAFTABL GTR HELP ICACLS IF IN LABEL LEQ LPT1 LPT2 LPT3 LPT4 LPT5 LPT6 LPT7 LPT8 LPT9 LSS MD MKDIR MKLINK MODE MORE MOVE NEQ NOT NUL OPENFILES PATH PAUSE POPD PRINT PRN PROMPT PUSHD RD RECOVER REM REN RENAME REPLACE RMDIR ROBOCOPY SC SCHTASKS SET SETLOCAL SHIFT SHUTDOWN SORT START SUBST SYSTEMINFO SetLocal TASKKILL TASKLIST TIME TITLE TREE TYPE VER VERIFY VOL WMIC XCOPY ALLUSERSPROFILE APPDATA AllUsersProfile AppData CMDCMDLINE COMPUTERNAME CmdCmdLine ComSpec CommonProgramFiles CommonProgramFiles(x86) CommonProgramW6432 ComputerName DriverData ExitCode ExitCodeAscii HIGHESTNUMANODENUMBER HOMEDRIVE HOMEPATH HighestNumaNodeNumber HomeDrive HomePath LOCALAPPDATA LOGONSERVER LocalAppData LogonServer NUMBER_OF_PROCESSORS Number_Of_Processors OS PATHEXT PROCESSOR_ARCHITECTURE PROCESSOR_IDENTIFIER PROCESSOR_LEVEL PROCESSOR_REVISION PSModulePath PUBLIC Path PathExt Processor_Architecture Processor_Identifier Processor_Level Processor_Revision ProgramData ProgramFiles ProgramFiles(x86) ProgramW6432 Public RANDOM Random SESSIONNAME SessionName SystemDrive SystemRoot TEMP TMP USERDOMAIN USERDOMAIN_ROAMINGPROFILE USERNAME USERPROFILE UserDomain UserDomain_RoamingProfile UserName UserProfile WINDIR WinDir __APPDIR__ __AppDir__ __CD__ random windir"
  return autocomplete_set
end

function batch.get_reqular()
  local symbol_reqular_exp = "^\\s*:([_a-zA-Z][_a-zA-Z0-9_]*)[\\r\\n]"
  return symbol_reqular_exp
end

function batch.create_bakup(path)
  local m_code = {
    "user_batch = {}\n",
    "function user_batch.get_keywords()\n",
    "  local keywords0_set = \"aux break call cls cmdextversion com1 com2 com3 com4 com5 com6 com7 com8 com9 con defined disabledelayedexpansion disableextensions do echo echo. else enabledelayedexpansion enableextensions endlocal equ errorlevel exist exit for geq goto gtr if in leq lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9 lss neq not nul pause popd prn rem set setlocal shift title ver verify assoc cd chdir color copy date del dir erase ftype md mkdir mklink move path prompt pushd rd ren rename rmdir start time type vol\"\n",
    "  local keywords1_set = \"active add append arp assign at atmadm attach-vdisk attrib attributes auditpol autochk autoconv autofmt automount bcdboot bcdedit bdehdcfg begin bitsadmin bootcfg cacls certreq certutil change chcp chglogon chgport chgusr chkdsk chkntfs choice cipher clean cleanmgr clip cmd cmdkey cmstp comp compact convert cprofile create cscript dcgpofix defrag delete detach detail dfsdiag dfsrmig diantz diskcomp diskcopy diskpart diskperf diskraid diskshadow dispdiag dnscmd doskey driverquery edit end eventcreate eventquery eventtriggers exec expand expose extend extract fc filesystems find findstr finger flattemp fondue forfiles format freedisk fsutil ftp fveupdate getmac gettype gpfixup gpresult gpt gpupdate graftabl help helpctr hostname icacls import inactive inuse ipconfig ipxroute irftp jetpack klist ksetup ktmutil ktpass label list load lodctr logman logoff lpq lpr macfile makecab manage mapadmin merge mmc mode more mount mountvol mqbkup mqsvc mqtgsvc msdt msg msiexec msinfo32 mstsc nbtstat net netcfg netsh netstat nfsadmin nfsshare nfsstat nlbmgr nslookup ntbackup ntcmdprompt ntfrsutl offline online openfiles pagefileconfig pathping pbadmin pentnt perfmon ping pnpunattend pnputil powershell print prncnfg prndrvr prnjobs prnmngr prnport prnqctl pubprn pushprinterconnections pwlauncher qappsrv qprocess query quser qwinsta rcp rdpsign recover refsutil reg regini regsvr32 relog remove repair replace rescan reset retain revert rexec risetup robocopy route rpcinfo rpcping rsh rundll32 rwinsta san sc schtasks scwcmd secedit select serverceipoptin servermanagercmd serverweroptin setx sfc shadow showmount shrink shutdown simulate sort subcommand subst sxstrace sysocmgr systeminfo takeown tapicfg taskkill tasklist tcmsetup telnet tftp timeout tlntadmn tpmtool tpmvscmgr tracerpt tracert tree tscon tsdiscon tsecimp tskill tsprof typeperf tzutil unexpose uniqueid unlodctr verifier vssadmin waitfor wbadmin wdsutil wecutil wevtutil where whoami winnt winnt32 winpop winrs winsat wmic writer wscript xcopy ABOVENORMAL AFFINITY BELOWNORMAL EOF HIGH LOW MAX MIN NODE NORMAL REALTIME SEPARATE SHARED WAIT abovenormal addenctypeattr addfile addfileset addfilewithranges addhosttorealmmap addkdc addkpasswd addrealmflags addsw affinity alert alias all analyze and api ascii autounlock backup basic bde behavior bell belownormal binary bye cache cancel catalog cfg changekey changepassword changepin class clear close compare complete config configure context counter d2 dbg1394 debug default delenctypeattr deleteurl delhosttorealmmap delims delkdc delkpasswd delrealmflags device dirty disable disconnect discover disk disks display domain driveinfo drivergroup drivergroupfilter driverpackage dumpstate dynamic efi ems enable enableanalyticchannel environmental eof eol examples export extended file forcerecovery fsinfo generaterollback get getaclflags getbytestotal getbytestransferred getclientcertificate getcompletiontime getconfigurationflags getcreationtime getcustomheaders getdescription getdisplayname getenctypeattr geterror geterrorcount getexpirationtime getfilestotal getfilestransferred gethelpertokenflags gethelpertokensid gethttpmethod getieproxy getlimit getmaxdownloadtime getminretrydelay getmodificationtime getnoprogresstimeout getnotifycmdline getnotifyflags getnotifyinterface getowner getpeercachingflags getpriority getproxybypasslist getproxylist getproxyusage getreplydata getreplyfilename getreplyprogress getsecurityflags getstate gettemporaryname getvalidationstate glob group hardlink hash high id image imagegroup info ise items job keypackage lcd listfiles listrealmflags literal lock logical logon low ls lserver makecustomheaderswriteonly mapuser max mbr mdelete mdir mem metadata mfmedia mget min mirror mls monitor mput msr multicasttransmission namespace newdriveletter node normal nowrap objectid off on open option partition peercaching peers port primary printui process protectors providers put pwd querytype quiet quit quota quote raid raw rawreturn realtime recovery recurse recv register remotehelp removeclientcertificate removecredentials removerealm repairservice reparsepoint replaceremoteprefix resize resource resourcesacl restart restore resume retry rmsw rollback root save search send separate server session setaclflag setclientcertificatebyid setclientcertificatebyname setcomputerpassword setconfigurationflags setcredentials setcustomheaders setdescription setdisplayname setenctypeattr setexpirationtime sethelpertoken sethelpertokenflags sethttpmethod setidentifier setieproxy setlimit setmaxdownloadtime setminretrydelay setnoprogresstimeout setnotifycmdline setnotifyflags setpeercachingflags setpriority setproxysettings setrealm setrealmflags setreplyfilename setsecurityflags setvalidationstate shadows shadowstorage shared simple size skip sparse srchlist status stop stripe suspend sysrecovery systemstatebackup systemstaterecovery takeownership target termserver testdcs testdfsconfig testdfsintegrity testreferral testsites tiering tokens tpm trace transaction transfer transform transportserver unload unlock unset update upgrade usebackq user usn util validate variables vc vdisk verbose version versions view volume wait wim wipefreespace wrap writers ws2008\"\n",
    "  local keywords2_set = \"ASSOC ATTRIB AUX BCDEDIT BREAK CACLS CALL CD CHCP CHDIR CHKDSK CHKNTFS CLS CMD CMDEXTVERSION COLOR COM1 COM2 COM3 COM4 COM5 COM6 COM7 COM8 COM9 COMP COMPACT CON CONVERT COPY CmdExtVersion DATE DEFINED DEL DIR DISABLEDELAYEDEXPANSION DISABLEEXTENSIONS DISKPART DO DOSKEY DRIVERQUERY DisableDelayedExpansion DisableExtensions ECHO ECHO. ELSE ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS ENDLOCAL EQU ERASE ERRORLEVEL EXIST EXIT EnableDelayedExpansion EnableExtensions EndLocal ErrorLevel Evntcmd FC FIND FINDSTR FOR FORMAT FSUTIL FTYPE GEQ GOTO GPRESULT GRAFTABL GTR HELP ICACLS IF IN LABEL LEQ LPT1 LPT2 LPT3 LPT4 LPT5 LPT6 LPT7 LPT8 LPT9 LSS MD MKDIR MKLINK MODE MORE MOVE NEQ NOT NUL OPENFILES PATH PAUSE POPD PRINT PRN PROMPT PUSHD RD RECOVER REM REN RENAME REPLACE RMDIR ROBOCOPY SC SCHTASKS SET SETLOCAL SHIFT SHUTDOWN SORT START SUBST SYSTEMINFO SetLocal TASKKILL TASKLIST TIME TITLE TREE TYPE VER VERIFY VOL WMIC XCOPY ALLUSERSPROFILE APPDATA AllUsersProfile AppData CMDCMDLINE COMPUTERNAME CmdCmdLine ComSpec CommonProgramFiles CommonProgramFiles(x86) CommonProgramW6432 ComputerName DriverData ExitCode ExitCodeAscii HIGHESTNUMANODENUMBER HOMEDRIVE HOMEPATH HighestNumaNodeNumber HomeDrive HomePath LOCALAPPDATA LOGONSERVER LocalAppData LogonServer NUMBER_OF_PROCESSORS Number_Of_Processors OS PATHEXT PROCESSOR_ARCHITECTURE PROCESSOR_IDENTIFIER PROCESSOR_LEVEL PROCESSOR_REVISION PSModulePath PUBLIC Path PathExt Processor_Architecture Processor_Identifier Processor_Level Processor_Revision ProgramData ProgramFiles ProgramFiles(x86) ProgramW6432 Public RANDOM Random SESSIONNAME SessionName SystemDrive SystemRoot TEMP TMP USERDOMAIN USERDOMAIN_ROAMINGPROFILE USERNAME USERPROFILE UserDomain UserDomain_RoamingProfile UserName UserProfile WINDIR WinDir __APPDIR__ __AppDir__ __CD__ random windir\"\n",
    "  return keywords0_set,keywords1_set,keywords2_set\n",
    "end\n",
    "\n",
    "function user_batch.get_autocomplete()\n",
    "  local autocomplete_set = \"aux break call cls cmdextversion com1 com2 com3 com4 com5 com6 com7 com8 com9 con defined disabledelayedexpansion disableextensions do echo echo. else enabledelayedexpansion enableextensions endlocal equ errorlevel exist exit for geq goto gtr if in leq lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9 lss neq not nul pause popd prn rem set setlocal shift title ver verify assoc cd chdir color copy date del dir erase ftype md mkdir mklink move path prompt pushd rd ren rename rmdir start time type vol active add append arp assign at atmadm attach-vdisk attrib attributes auditpol autochk autoconv autofmt automount bcdboot bcdedit bdehdcfg begin bitsadmin bootcfg cacls certreq certutil change chcp chglogon chgport chgusr chkdsk chkntfs choice cipher clean cleanmgr clip cmd cmdkey cmstp comp compact convert cprofile create cscript dcgpofix defrag delete detach detail dfsdiag dfsrmig diantz diskcomp diskcopy diskpart diskperf diskraid diskshadow dispdiag dnscmd doskey driverquery edit end eventcreate eventquery eventtriggers exec expand expose extend extract fc filesystems find findstr finger flattemp fondue forfiles format freedisk fsutil ftp fveupdate getmac gettype gpfixup gpresult gpt gpupdate graftabl help helpctr hostname icacls import inactive inuse ipconfig ipxroute irftp jetpack klist ksetup ktmutil ktpass label list load lodctr logman logoff lpq lpr macfile makecab manage mapadmin merge mmc mode more mount mountvol mqbkup mqsvc mqtgsvc msdt msg msiexec msinfo32 mstsc nbtstat net netcfg netsh netstat nfsadmin nfsshare nfsstat nlbmgr nslookup ntbackup ntcmdprompt ntfrsutl offline online openfiles pagefileconfig pathping pbadmin pentnt perfmon ping pnpunattend pnputil powershell print prncnfg prndrvr prnjobs prnmngr prnport prnqctl pubprn pushprinterconnections pwlauncher qappsrv qprocess query quser qwinsta rcp rdpsign recover refsutil reg regini regsvr32 relog remove repair replace rescan reset retain revert rexec risetup robocopy route rpcinfo rpcping rsh rundll32 rwinsta san sc schtasks scwcmd secedit select serverceipoptin servermanagercmd serverweroptin setx sfc shadow showmount shrink shutdown simulate sort subcommand subst sxstrace sysocmgr systeminfo takeown tapicfg taskkill tasklist tcmsetup telnet tftp timeout tlntadmn tpmtool tpmvscmgr tracerpt tracert tree tscon tsdiscon tsecimp tskill tsprof typeperf tzutil unexpose uniqueid unlodctr verifier vssadmin waitfor wbadmin wdsutil wecutil wevtutil where whoami winnt winnt32 winpop winrs winsat wmic writer wscript xcopy ABOVENORMAL AFFINITY BELOWNORMAL EOF HIGH LOW MAX MIN NODE NORMAL REALTIME SEPARATE SHARED WAIT abovenormal addenctypeattr addfile addfileset addfilewithranges addhosttorealmmap addkdc addkpasswd addrealmflags addsw affinity alert alias all analyze and api ascii autounlock backup basic bde behavior bell belownormal binary bye cache cancel catalog cfg changekey changepassword changepin class clear close compare complete config configure context counter d2 dbg1394 debug default delenctypeattr deleteurl delhosttorealmmap delims delkdc delkpasswd delrealmflags device dirty disable disconnect discover disk disks display domain driveinfo drivergroup drivergroupfilter driverpackage dumpstate dynamic efi ems enable enableanalyticchannel environmental eof eol examples export extended file forcerecovery fsinfo generaterollback get getaclflags getbytestotal getbytestransferred getclientcertificate getcompletiontime getconfigurationflags getcreationtime getcustomheaders getdescription getdisplayname getenctypeattr geterror geterrorcount getexpirationtime getfilestotal getfilestransferred gethelpertokenflags gethelpertokensid gethttpmethod getieproxy getlimit getmaxdownloadtime getminretrydelay getmodificationtime getnoprogresstimeout getnotifycmdline getnotifyflags getnotifyinterface getowner getpeercachingflags getpriority getproxybypasslist getproxylist getproxyusage getreplydata getreplyfilename getreplyprogress getsecurityflags getstate gettemporaryname getvalidationstate glob group hardlink hash high id image imagegroup info ise items job keypackage lcd listfiles listrealmflags literal lock logical logon low ls lserver makecustomheaderswriteonly mapuser max mbr mdelete mdir mem metadata mfmedia mget min mirror mls monitor mput msr multicasttransmission namespace newdriveletter node normal nowrap objectid off on open option partition peercaching peers port primary printui process protectors providers put pwd querytype quiet quit quota quote raid raw rawreturn realtime recovery recurse recv register remotehelp removeclientcertificate removecredentials removerealm repairservice reparsepoint replaceremoteprefix resize resource resourcesacl restart restore resume retry rmsw rollback root save search send separate server session setaclflag setclientcertificatebyid setclientcertificatebyname setcomputerpassword setconfigurationflags setcredentials setcustomheaders setdescription setdisplayname setenctypeattr setexpirationtime sethelpertoken sethelpertokenflags sethttpmethod setidentifier setieproxy setlimit setmaxdownloadtime setminretrydelay setnoprogresstimeout setnotifycmdline setnotifyflags setpeercachingflags setpriority setproxysettings setrealm setrealmflags setreplyfilename setsecurityflags setvalidationstate shadows shadowstorage shared simple size skip sparse srchlist status stop stripe suspend sysrecovery systemstatebackup systemstaterecovery takeownership target termserver testdcs testdfsconfig testdfsintegrity testreferral testsites tiering tokens tpm trace transaction transfer transform transportserver unload unlock unset update upgrade usebackq user usn util validate variables vc vdisk verbose version versions view volume wait wim wipefreespace wrap writers ws2008 ASSOC ATTRIB AUX BCDEDIT BREAK CACLS CALL CD CHCP CHDIR CHKDSK CHKNTFS CLS CMD CMDEXTVERSION COLOR COM1 COM2 COM3 COM4 COM5 COM6 COM7 COM8 COM9 COMP COMPACT CON CONVERT COPY CmdExtVersion DATE DEFINED DEL DIR DISABLEDELAYEDEXPANSION DISABLEEXTENSIONS DISKPART DO DOSKEY DRIVERQUERY DisableDelayedExpansion DisableExtensions ECHO ECHO. ELSE ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS ENDLOCAL EQU ERASE ERRORLEVEL EXIST EXIT EnableDelayedExpansion EnableExtensions EndLocal ErrorLevel Evntcmd FC FIND FINDSTR FOR FORMAT FSUTIL FTYPE GEQ GOTO GPRESULT GRAFTABL GTR HELP ICACLS IF IN LABEL LEQ LPT1 LPT2 LPT3 LPT4 LPT5 LPT6 LPT7 LPT8 LPT9 LSS MD MKDIR MKLINK MODE MORE MOVE NEQ NOT NUL OPENFILES PATH PAUSE POPD PRINT PRN PROMPT PUSHD RD RECOVER REM REN RENAME REPLACE RMDIR ROBOCOPY SC SCHTASKS SET SETLOCAL SHIFT SHUTDOWN SORT START SUBST SYSTEMINFO SetLocal TASKKILL TASKLIST TIME TITLE TREE TYPE VER VERIFY VOL WMIC XCOPY ALLUSERSPROFILE APPDATA AllUsersProfile AppData CMDCMDLINE COMPUTERNAME CmdCmdLine ComSpec CommonProgramFiles CommonProgramFiles(x86) CommonProgramW6432 ComputerName DriverData ExitCode ExitCodeAscii HIGHESTNUMANODENUMBER HOMEDRIVE HOMEPATH HighestNumaNodeNumber HomeDrive HomePath LOCALAPPDATA LOGONSERVER LocalAppData LogonServer NUMBER_OF_PROCESSORS Number_Of_Processors OS PATHEXT PROCESSOR_ARCHITECTURE PROCESSOR_IDENTIFIER PROCESSOR_LEVEL PROCESSOR_REVISION PSModulePath PUBLIC Path PathExt Processor_Architecture Processor_Identifier Processor_Level Processor_Revision ProgramData ProgramFiles ProgramFiles(x86) ProgramW6432 Public RANDOM Random SESSIONNAME SessionName SystemDrive SystemRoot TEMP TMP USERDOMAIN USERDOMAIN_ROAMINGPROFILE USERNAME USERPROFILE UserDomain UserDomain_RoamingProfile UserName UserProfile WINDIR WinDir __APPDIR__ __AppDir__ __CD__ random windir\"\n",
    "  return autocomplete_set\n",
    "end\n",
    "\n",
    "function user_batch.get_reqular()\n",
    "  local symbol_reqular_exp = \"^\\\\s*:([_a-zA-Z][_a-zA-Z0-9_]*)[\\\\r\\\\n]\"\n",
    "  return symbol_reqular_exp\n",
    "end\n",
    "return user_batch",
  }
  local batch_code = table.concat(m_code)
  eu_core.save_file(path, batch_code)
  batch_code = nil
  m_code = nil
end

return batch