mirror of https://github.com/Hilbis/Hilbish
feat: show indexes on cdr list and change home to tilde (#253)
* feat: show indexes on cdr list and change home to tilde * fix: remove underline in cdr help pagefuzzy-history-search^2
parent
6729ecddea
commit
cbc5e81c9d
|
@ -6,6 +6,7 @@
|
||||||
- `read()` method for retrieving input (so now the `in` sink of commanders is useful)
|
- `read()` method for retrieving input (so now the `in` sink of commanders is useful)
|
||||||
- `flush()` and `autoFlush()` related to flushing outputs
|
- `flush()` and `autoFlush()` related to flushing outputs
|
||||||
- `pipe` property to check if a sink with input is a pipe (like stdin)
|
- `pipe` property to check if a sink with input is a pipe (like stdin)
|
||||||
|
- Show indexes on cdr list
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Replaced `sed` in-place editing with `grep` and `mv` for compatibility with BSD utils
|
- Replaced `sed` in-place editing with `grep` and `mv` for compatibility with BSD utils
|
||||||
|
|
|
@ -10,7 +10,7 @@ cdr: change directory to one which has been recently visied
|
||||||
|
|
||||||
usage: cdr <index>
|
usage: cdr <index>
|
||||||
|
|
||||||
to get a list of recent directories, use {green}{underline}cdr list{reset}]])
|
to get a list of recent directories, use {green}cdr list{reset}]])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,10 @@ to get a list of recent directories, use {green}{underline}cdr list{reset}]])
|
||||||
sinks.out:writeln 'No directories have been visited.'
|
sinks.out:writeln 'No directories have been visited.'
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
sinks.out:writeln(table.concat(recentDirs, '\n'))
|
for idx, d in ipairs(dirs.recentDirs) do
|
||||||
|
if d:find(hilbish.home, 1, true) then d = fs.join('~', d:sub(hilbish.home:len() + 1)) end
|
||||||
|
sinks.out:writeln(lunacolors.format(string.format('{cyan}%d{reset} %s', idx, d)))
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue