Comments (1)
I'd like to expose more information to the subprocesses to facilitate the development of sophisticated applications.
pro (environment variables)
- can take advantage of
Parameter Expansion
#!/usr/bin/env bash
set -o allexport -o errexit -o nounset -o pipefail
# https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin
SHELL=$(which bash)
show_port() {
echo "${FZF_PORT?:"no port"}"
}
fzf --bind 'start:change-preview:show_port'
- can easily see all the available variables and their corresponding values
: | fzf --listen --preview-window 90% --preview 'typeset | grep FZF'
![](https://private-user-images.githubusercontent.com/92653266/296553277-5746e55e-6df4-40e5-8dc9-e1119ba9fe44.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgyNDA1NDcsIm5iZiI6MTcxODI0MDI0NywicGF0aCI6Ii85MjY1MzI2Ni8yOTY1NTMyNzctNTc0NmU1NWUtNmRmNC00MGU1LThkYzktZTExMTliYTlmZTQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjEzVDAwNTcyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM0YmFhY2Q5Nzk3OGZlZjc5NjJjYjI2MWE1Nzc5YTVlNzBkNGE2YTFiMjFlM2JmYjM5MmZkOGI0MDhjOTA1ZjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.iCC45L-9BVH0Rkqn8fUwC2cXQyt6cMmc8C-K8jcERmM)
cons (environment variables)
- Could it be confusing to have an
$FZF_ACTION
environment variable? It might be mistaken for the$FZF_DEFAULT_COMMAND
, or some users might assign the$FZF_PROMPT
and wonder why nothing changes on their prompt when they start upfzf
.
So,
$FZF_TOTAL_COUNT
or{fzf:total-count}
?
I'm indifferent and can live with either option. If you need a short version for the total placeholder, parallel
1 uses {##}
.
# {#} the sequence number of the job
# {##} is the total number of jobs
parallel --plus echo Job {#} of {##} ::: {1..5}
# Job 1 of 5
# Job 2 of 5
# Job 3 of 5
# Job 4 of 5
# Job 5 of 5
I'd like to expose more information to the subprocesses to facilitate the development of sophisticated applications.
Thank you.
Footnotes
from fzf.
Related Issues (20)
- Breaking Change in Keybinding Behavior due to Commit 6b4358f HOT 2
- Command history sorting order HOT 1
- Directories not walked recursively in FUSE mounted directories HOT 1
- Issue with single key binding to toggle file and directory mode HOT 7
- Examine Profile-guided optimization (PGO) HOT 1
- Allow for external shell script in --preview HOT 2
- [Feature Request] History syntax highlighting HOT 4
- Tiebreak parameter of length or end does not produce the expected results HOT 3
- Can't bind C-z to a readline function without getting 'readline: maximum macro execution nesting level exceeded' with fzf-cd - Alt-C HOT 5
- preserve whitespace flag s not working? HOT 1
- How to find file from zoxide result ? HOT 1
- Broken zsh shell integration on 0.51+ HOT 1
- last commit broke fzf.vim integration HOT 1
- code **<TAB> doesn't execute fzf HOT 4
- execute(echo {}) does not work with tmux integration on v0.53.0 HOT 2
- Divide by zero with --tiebreak=end for long-line inputs HOT 1
- Windows: Mouse-clicking doesn't work properly in bash HOT 1
- Merge fish history before showing history widget HOT 3
- Vi-mode for input field navigation and editing. Maybe by introducing readline support? HOT 1
- Ability to control search order (or have `--nth` respect it) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fzf.