Home

Awesome

Minimalist selector in shell, à la fzf

screenshot

test

what's it for ?

You need to:

Just copy the fsh function in your script.

usage example

$ echo -e 'Hello, world!\n¡Hola, mundo!\nBonjour, le monde !\nHallo, Welt!' | ./fsh
<details> <summary> ... </summary>
Hello, world!
¡Hola, mundo!
Bonjour, le monde !
Hallo, Welt!

> 

type your text

Hallo, Welt!

> hall

Press enter

Hallo, Welt!
</details>

limitations

variables reference

<details> <summary>You can customize the behavior of fsh by setting the following variables:</summary>
VariableDescriptionDefault value
FSH_SELECTOR_COLORthe color line currently highlighted40
FSH_FRAME_COLORthe color of the frame30
FSH_PROMPT_COLORthe color used for the prompt34
FSH_SELECT_COLORthe color of the sign before the line currently selected31
FSH_TEST_INPUTthe simulated user input given as a string, one character at a time. first character will be ignored. if set the script will not read from stdin""
FSH_HEADERa name to display beofre the prompt to give context on what is expected""
FSH_VIM_MODE(not implemented) set this variable to support vim normal mode""
FSH_PERFif this variable is set, will display the time it took to draw the interface""
FSH_NO_FUZZYif this variable is set, will not use fuzzy search, instead will do a pattern match""
FSH_LINESthe height of the terminal (used for testing, otherwise will be set by tput)$t_lines
FSH_COLUMNSthe width of the terminal (used for testing, otherwise will be set by tput)$t_cols
FSH_SCREENSHOTif this variable is set, will write a screenshot of the terminal at each iteration and generate an animation at the end""
</details>