You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
I'm writing a script that will allow me to browse the filesystem and to choose file/directory. By using option --passthrough-keybindings I'm able to recursively call my script and go up or down in the filesystem tree.
It would be nice to have the current directory printed instead of "STDIN".
Feature
Add a new option to specify the header/name of the candidates list.
Examples
This is my script:
#! /bin/sh
path="${1}/"while:do
output=$(ls -1pha ${path}. | sed 1,2d | tv --preview "if [[ -d ${path}{0} ]] ; then ls ${path}{0} ; else bat -n --color=never --line-range=:20 ${path}{0}; fi" --passthrough-keybindings "ctrl-h,ctrl-l,ctrl-g,esc")
results=(${output/// })
case${results[0]}in"ctrl-l")
if [[ -d"${path}${results[1]}" ]] ;then path="${path}${results[1]}";else
output=${results[1]}break;fi
;;
"ctrl-h")
path="${path}../"
;;
"ctrl-g")
exit
;;
"esc")
exit
;;
*)
output=${results[0]}break
;;
esacdoneecho"${path}${output}"
Additional context
This is how it looks in Zed editor:
If I'm not mistaked fzf heas option --header which does something similar.
The text was updated successfully, but these errors were encountered:
Problem
I'm writing a script that will allow me to browse the filesystem and to choose file/directory. By using option
--passthrough-keybindings
I'm able to recursively call my script and go up or down in the filesystem tree.It would be nice to have the current directory printed instead of "STDIN".
Feature
Add a new option to specify the header/name of the candidates list.
Examples
This is my script:
Additional context
This is how it looks in Zed editor:
If I'm not mistaked
fzf
heas option--header
which does something similar.The text was updated successfully, but these errors were encountered: