File content preview #9

Closed
edoz90 opened this Issue Dec 4, 2016 · 5 comments

Projects

None yet

2 participants

@edoz90
edoz90 commented Dec 4, 2016

Hi! :)
Great work.

What do you think about making a view of the content of the file or a preview right or after the selection list?
It will be difficult to implement?

@rcmdnk
Owner
rcmdnk commented Dec 4, 2016

It could be like:

https://gist.github.com/rcmdnk/d7a29b8c9e16fd4cada19cc74832f94b

Usage is same as sentaku, like:

$ ls |  /PATH/TO/file_selector

(if file_sleector is under $PATH, /PATH/TO/ is not needed.)

This wrapper script shows the file content below, and shows more content when you push s.

or simpler implementation only s function (much faster):

https://gist.github.com/rcmdnk/ba0b97f94b290ced8bc8ca6657981b9a

@edoz90
edoz90 commented Dec 4, 2016

Yeah! The first one is great, thanks! :D

Is it possibile to achieve something like ranger? Maybe choosing where to show the preview...

ranger

@rcmdnk
Owner
rcmdnk commented Dec 4, 2016

file_selector has been added in the repository:

https://github.com/rcmdnk/sentaku/blob/master/bin/file_selector

Now, you can use "--right" or "--under" option, showing a content in the right or under the list, respectively.
Default is "right".
Can be changed by _SENTAKU_CONTENT_SHOW_UNDER variable, like

$ ls |_SENTAKU_CONTENT_SHOW_UNDER=1 ./file_selector

This is same as ./file_selector --under.
Or set

$ export  _SENTAKU_CONTENT_SHOW_UNDER=1

How about it?

@edoz90
edoz90 commented Dec 4, 2016

OMG! 😃
You're great!!

screenshot from 2016-12-04 19-32-24

Thank you so much 🍺

@edoz90 edoz90 closed this Dec 4, 2016
@rcmdnk
Owner
rcmdnk commented Dec 6, 2016

I have updated the script in the different repository: shell-explorer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment