Change how files are viewed #17

Open
opened 3 years ago by jab2870 · 0 comments
Owner

If a non-text document is to be viewed (or previewed), $PAGER probably isn't
the best choice.

Allow an external command to be run that will be used for opening a file.

It could be set via an environment variable or a command line option. It will be
the name of a script to run for previewing, viewing or opening a file.

The script will be called from the kb tool with the following arguments:

  1. Name of file to preview
  2. Action to be taken
    1. open - this could be a non-terminal program like zathura for pdfs
    2. preview - This would need to be a terminal program and would run inside
      fzf's preview
  3. <line number> - this would be the line number if relevant
If a non-text document is to be viewed (or previewed), `$PAGER` probably isn't the best choice. Allow an external command to be run that will be used for opening a file. It could be set via an environment variable or a command line option. It will be the name of a script to run for previewing, viewing or opening a file. The script will be called from the kb tool with the following arguments: 1. Name of file to preview 1. Action to be taken 1. open - this could be a non-terminal program like zathura for pdfs 1. preview - This would need to be a terminal program and would run inside fzf's preview 1. \<line number\> - this would be the line number if relevant
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: jab2870/knowledge-base#17
Loading…
There is no content yet.