Skip to content

Commit

Permalink
Add support for lsd in show.
Browse files Browse the repository at this point in the history
refs gh-271
  • Loading branch information
xwmx committed Sep 8, 2023
1 parent 903c243 commit 7a1b97e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 15 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Also supported for various enhancements:
[`imgcat`](https://www.iterm2.com/documentation-images.html),
[`joshuto`](https://github.com/kamiyaa/joshuto),
[kitty's `icat` kitten](https://sw.kovidgoyal.net/kitty/kittens/icat.html),
[`lsd`](https://github.com/lsd-rs/lsd),
[Links](https://en.wikipedia.org/wiki/Links_(web_browser)),
[Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)),
[Midnight Commander (`mc`)](https://en.wikipedia.org/wiki/Midnight_Commander),
Expand Down Expand Up @@ -1452,6 +1453,7 @@ Supported file types and tools include:
- Folders, Directories, Notebooks ([`$NB_DIRECTORY_TOOL`](#nb_directory_tool)):
- [`eza`](https://github.com/eza-community/eza)
- [`joshuto`](https://github.com/kamiyaa/joshuto)
- [`lsd`](https://github.com/lsd-rs/lsd)
- [Midnight Commander (`mc`)](https://en.wikipedia.org/wiki/Midnight_Commander)
- [`ranger`](https://ranger.github.io/)
- [`vifm`](https://vifm.info/)
Expand Down Expand Up @@ -7456,7 +7458,8 @@ Subcommands:
Shortcut Alias: `o`
peek Open the current notebook directory or notebook <name> in the
first tool found in the following list:
`ranger` [1], `mc` [2], `vifm` [3], `joshuto` [4], `eza` [5], or `ls`.
`ranger` [1], `mc` [2], `vifm` [3], `joshuto` [4], `lsd` [5],
`eza` [6], or `ls`.
Shortcut Alias: `p`
rename Rename a notebook. Aliases: `move`, `mv`
select Set the current notebook from a colon-prefixed selector.
Expand All @@ -7471,7 +7474,8 @@ Subcommands:
2. https://en.wikipedia.org/wiki/Midnight_Commander
3. https://vifm.info/
4. https://github.com/kamiyaa/joshuto
5. https://github.com/eza-community/eza
5. https://github.com/lsd-rs/lsd
6. https://github.com/eza-community/eza

Description:
Manage notebooks.
Expand Down Expand Up @@ -7565,13 +7569,14 @@ Description:
format or any other file type, `peek` is the equivalent of `show`. When
used with a notebook, `peek` opens the notebook folder first tool found in
the following list: `ranger` [1], `mc` [2], `vifm` [3], `joshuto` [4],
`eza` [5], or `ls`.
`lsd` [5], eza` [6], or `ls`.

1. https://ranger.github.io/
2. https://en.wikipedia.org/wiki/Midnight_Commander
3. https://vifm.info/
4. https://github.com/kamiyaa/joshuto
5. https://github.com/eza-community/eza
5. https://github.com/lsd-rs/lsd
6. https://github.com/eza-community/eza

Read More:
https://github.com/xwmx/nb#viewing-bookmarks
Expand Down
13 changes: 9 additions & 4 deletions docs/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ Also supported for various enhancements:
[`imgcat`](https://www.iterm2.com/documentation-images.html),
[`joshuto`](https://github.com/kamiyaa/joshuto),
[kitty's `icat` kitten](https://sw.kovidgoyal.net/kitty/kittens/icat.html),
[`lsd`](https://github.com/lsd-rs/lsd),
[Links](https://en.wikipedia.org/wiki/Links_(web_browser)),
[Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)),
[Midnight Commander (`mc`)](https://en.wikipedia.org/wiki/Midnight_Commander),
Expand Down Expand Up @@ -1458,6 +1459,7 @@ Supported file types and tools include:
- Folders, Directories, Notebooks ([`$NB_DIRECTORY_TOOL`](#nb_directory_tool)):
- [`eza`](https://github.com/eza-community/eza)
- [`joshuto`](https://github.com/kamiyaa/joshuto)
- [`lsd`](https://github.com/lsd-rs/lsd)
- [Midnight Commander (`mc`)](https://en.wikipedia.org/wiki/Midnight_Commander)
- [`ranger`](https://ranger.github.io/)
- [`vifm`](https://vifm.info/)
Expand Down Expand Up @@ -7462,7 +7464,8 @@ Subcommands:
Shortcut Alias: `o`
peek Open the current notebook directory or notebook <name> in the
first tool found in the following list:
`ranger` [1], `mc` [2], `vifm` [3], `joshuto` [4], `eza` [5], or `ls`.
`ranger` [1], `mc` [2], `vifm` [3], `joshuto` [4], `lsd` [5],
`eza` [6], or `ls`.
Shortcut Alias: `p`
rename Rename a notebook. Aliases: `move`, `mv`
select Set the current notebook from a colon-prefixed selector.
Expand All @@ -7477,7 +7480,8 @@ Subcommands:
2. https://en.wikipedia.org/wiki/Midnight_Commander
3. https://vifm.info/
4. https://github.com/kamiyaa/joshuto
5. https://github.com/eza-community/eza
5. https://github.com/lsd-rs/lsd
6. https://github.com/eza-community/eza

Description:
Manage notebooks.
Expand Down Expand Up @@ -7571,13 +7575,14 @@ Description:
format or any other file type, `peek` is the equivalent of `show`. When
used with a notebook, `peek` opens the notebook folder first tool found in
the following list: `ranger` [1], `mc` [2], `vifm` [3], `joshuto` [4],
`eza` [5], or `ls`.
`lsd` [5], eza` [6], or `ls`.

1. https://ranger.github.io/
2. https://en.wikipedia.org/wiki/Midnight_Commander
3. https://vifm.info/
4. https://github.com/kamiyaa/joshuto
5. https://github.com/eza-community/eza
5. https://github.com/lsd-rs/lsd
6. https://github.com/eza-community/eza

Read More:
https://github.com/xwmx/nb#viewing-bookmarks
Expand Down
29 changes: 22 additions & 7 deletions nb
Original file line number Diff line number Diff line change
Expand Up @@ -16136,13 +16136,14 @@ $(_color_primary "Description"):
format or any other file type, \`peek\` is the equivalent of \`show\`. When
used with a notebook, \`peek\` opens the notebook folder first tool found in
the following list: \`ranger\` [1], \`mc\` [2], \`vifm\` [3], \`joshuto\` [4],
\`eza\` [5], or \`ls\`.
\`lsd\` [5] \`eza\` [6], or \`ls\`.

1. https://ranger.github.io/
2. https://en.wikipedia.org/wiki/Midnight_Commander
3. https://vifm.info/
4. https://github.com/kamiyaa/joshuto
5. https://github.com/eza-community/eza
5. https://github.com/lsd-rs/lsd
6. https://github.com/eza-community/eza

$(_color_primary "Read More"):
${_README_URL}#viewing-bookmarks
Expand Down Expand Up @@ -18414,13 +18415,13 @@ Can't show archives. Export archive and expand to edit.\\n"
then
if [[ -z "${_tool:-}" ]] &&
_contains "${NB_DIRECTORY_TOOL:-}" \
"ranger" \
"mc" \
"vifm" \
"joshuto" \
"eza" \
"lsd" \
"exa" &&
"mc" \
"exa" \
"eza" \
"ranger" \
"vifm" &&
_command_exists "${NB_DIRECTORY_TOOL:-}"
then
_tool="${NB_DIRECTORY_TOOL}"
Expand Down Expand Up @@ -18448,6 +18449,20 @@ Can't show archives. Export archive and expand to edit.\\n"
elif _command_exists "joshuto" && [[ "${_tool:-joshuto}" == "joshuto" ]]
then
joshuto --path "${_target_path}"
elif _command_exists "lsd" && [[ "${_tool:-lsd}" == "lsd" ]]
then
lsd \
-1Al \
--blocks=permission,size,date,git,name \
--color=always \
--date '+%F %R' \
--git \
--icon=always \
--icon-theme=fancy \
--ignore-config \
--group-directories-first \
--size=short \
"${_target_path}"
elif _command_exists "eza" && [[ "${_tool:-eza}" == "eza" ]]
then
eza \
Expand Down

0 comments on commit 7a1b97e

Please sign in to comment.