node-fzf's People
node-fzf's Issues
Select the mode at the very beginning
Just a question.
Is it possible to select the mode when you call node-fzf. I mean, I would like to have a normal mode (not fuzzy) at the very beginning. Or the only option to switch the mode is to press the hotkey Cntrl+S
?
Is there a way to format the output and/or only search over part of each line?
For example, I'm making a repo search thing for navigating my local file system, and I have a lot of entries like:
NullVoxPopuli/project-a
NullVoxPopuli/project-b
NullVoxPopuli/project-c
tmp/project-d
and I'd like to be able to ignore everything left of the first /
-- is that possible?
Is there a way to pass initial text and/or immediately return when there is one result?
For example, with the bash version of fzf, I can do this:
selected_repo=$(print_repos | fzf \
-1 \
--with-nth=1 \
$QUERY \
| cut -f2 \
)
the options in particular I'm after are -1
and -with-nth=1
Preprinted text is overwritten by node-fzf
I often need to print some text choosing an option in node-fzf
. But if there are a lot of lines there, node-fzf
will hide some of them.
Example:
const arr = [];
for(let i = 0 ; i < 40; i++ ) {
console.log(i);
if ( i < 10 ) {
arr.push('s' + i);
}
}
const nfzf = require( 'node-fzf' )
const opts = {
list: arr
}
const result = await nfzf( opts )
Here I print 40 lines of the text. And after that, I call node-fzf
with 10 options. As a result, it shows only 30 lines of the preprinted text.
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.