add trailing / to directories.

This also adds a dependency on the test utility.
This commit is contained in:
Dylan Araps 2020-08-04 20:08:51 +03:00
parent ef353e6b6d
commit ec1d9f16e6
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
2 changed files with 5 additions and 5 deletions

9
README
View File

@ -9,7 +9,7 @@ screenshot: https://user-images.githubusercontent.com/6799467/89270554-2b40ab00-
features
________________________________________________________________________________
* no dependencies other than a POSIX shell + POSIX printf, dd and stty ***
* no dependencies other than a POSIX shell + POSIX test, printf, dd and stty ***
* tiny
* single file
* no compilation needed
@ -54,11 +54,10 @@ ________________________________________________________________________________
- [ ] print directories first (hard).
- [x] fix buggy focus after exit from inline editor.
- [ ] maybe file operations.
- [ ] add / to directories.
- [ ] use clearer variable names.
- [x] add / to directories.
- [x] going up directories should center entry.
- [ ] abstract over sequences.
- [ ] look into whether tput is feasible.
- [x] abstract over sequences.
- [x] look into whether tput is feasible.
opener

1
shfm
View File

@ -215,6 +215,7 @@ line_format() {
file_escape "$1"
esc EL0
printf %s "$safe"
test -d "$1" && printf /
esc SGR
printf '\r'
}