()
| 2 | import { createText, getInputValue } from "./functions.js"; |
| 3 | //end imports |
| 4 | export async function commandHistory(){ |
| 5 | let record = JSON.parse(localStorage.getItem("history")) || []; |
| 6 | if(record.length === 0){ |
| 7 | await createText("No History Found!"); |
| 8 | }else{ |
| 9 | await createText("Previously used commands are: "); |
| 10 | for(let i=0;i<record.length;++i){ |
| 11 | await createText((i+1).toString() + ".) " + record[i]); |
| 12 | } |
| 13 | await createText("To run a specific cmd from history, run history {id} where id is the id of that cmd in histroy") |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | export async function runSpecificHistoryCmd(id) { |
| 18 | let record = JSON.parse(localStorage.getItem("history")) || []; |
no test coverage detected