Atom eve seo
This commit is contained in:
3
.output/server/node_modules/just-bash/dist/bundle/chunks/chunk-UIJUTQPH.js
generated
vendored
Normal file
3
.output/server/node_modules/just-bash/dist/bundle/chunks/chunk-UIJUTQPH.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
||||
import{a as i,b as l}from"./chunk-QAYAQNCG.js";var p={name:"history",summary:"display command history",usage:"history [n]",options:["-c clear the history list"," --help display this help and exit"]},h="BASH_HISTORY",m={name:"history",async execute(e,s){if(l(e))return i(p);let a=s.env.get(h)||"[]",t;try{t=JSON.parse(a)}catch{t=[]}if(e[0]==="-c")return s.env.set(h,"[]"),{stdout:"",stderr:"",exitCode:0};let n=t.length;e[0]&&/^\d+$/.test(e[0])&&(n=Math.min(parseInt(e[0],10),t.length));let c=t.length-n,r="";for(let o=c;o<t.length;o++){let y=(o+1).toString().padStart(5," ");r+=`${y} ${t[o]}
|
||||
`}return{stdout:r,stderr:"",exitCode:0}}},u={name:"history",flags:[{flag:"-c",type:"boolean"}]};export{m as a,u as b};
|
||||
Reference in New Issue
Block a user