-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] Make navi
variables to fzf
's header
option
#899
Comments
You can try a workaround for the same result % sed
# Print a specific line from a file
sed -n <number>p <file>
$ file: find . -maxdepth 1 -type f | cut -c3-
$ number: aux=$(wc -l <file> | cut -f 1) && echo "This file contains $aux pages" --- --header-lines 1 |
Small correction, it should be Anyway, that is a good workaround, but it is a workaround. I would be great to make % sed
# Print a specific line from a file
sed -n <number>p <file>
$ file: find . -maxdepth 1 -type f | cut -c3-
$ number: export aux=$(wc -l <file> | cut -d ' ' -f 1) --- --header "The file <file> contains $aux pages " No workarounds, no tricks, no complications. |
Consider another example # add submodule
git submodule add <is_branch>
$ is_branch: echo "" --- --map "grep -Pq '.+' && echo 'branch=<is_branch>'" --header "are you adding submodule from a specific branch? Type the branch name if yes, or leave empty if no." I want to create an optional example. If I write something, I must append The solution would be # add submodule
git submodule add <prefix><is_branch>
$ is_branch: echo "" --- --header "are you adding submodule from a specific branch? Type the branch name if yes, or leave empty if no."
$ prefix: [[ -n $(echo <is_branch>) ]] && echo '--branch=' || echo '' --- --fzf-overrides '-1' Again, a functional but ugly workaround. It would be much better to be able to write former solution. |
Is your feature request related to a problem? Please describe.
Let us consider that I want to create a navi cheat sheet to print a line of a file using
sed
.Describe the solution you'd like
My idea is that the
aux
variable becomes available tofzf
so that it prints out a header likeDescribe alternatives you've considered
I tried some syntax such as
<file>
,$file
, etc. But it seems thatfzf
is insensitive to any variable declared bynavi
.The text was updated successfully, but these errors were encountered: