shell tools: globbing

This commit is contained in:
kepler155c@gmail.com
2019-05-10 08:08:49 -04:00
parent 8ea2598254
commit 86cba3b585
35 changed files with 303 additions and 432 deletions

View File

@@ -0,0 +1,24 @@
local Config = require('config')
local kernel = _G.kernel
local os = _G.os
local settings = _G.settings
settings.set('LS_COLORS', "di=0;36:fi=0:ln=0;33:*.lua=0;32")
function os.setenv(k, v)
settings.set(k, v)
end
function os.getenv(k)
return settings.get(k)
end
local config = Config.load('shell', { aliases = { } })
if not config.openOsInit then
config.openOsInit = true
for _, alias in pairs({ 'ls', 'rm', 'cp', 'mv' }) do
config.aliases[alias] = nil
kernel.getShell().clearAlias(alias)
end
Config.update('shell', config)
end