Skip to content

Commit 3cded68

Browse files
committed
docs: add history, fix cd
1 parent 220e8ed commit 3cded68

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/hosted/App.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default {
9191
commands: {
9292
cd: parsed => {
9393
if (parsed.length < 1) {
94-
return
94+
return createQuery()
9595
}
9696
if (parsed[1] === 'home') {
9797
prompt.value = `${PROMPT}/home`
@@ -119,6 +119,15 @@ export default {
119119
return createStdout(listFormatter(...list))
120120
},
121121
122+
history: () => {
123+
const history = []
124+
for (const [index, entry] of [...dispatchedQueries.value].entries()) {
125+
history.push([index, entry])
126+
}
127+
128+
return createStdout(tableFormatter(history))
129+
},
130+
122131
json: () => {
123132
return createStdout(jsonFormatter({ test: 1 }))
124133
},

0 commit comments

Comments
 (0)