3 Commits

Author SHA1 Message Date
Vitaly Zdanevich
5478f290a1 README.org: fzf example: preview window make bigger
Was 50%:50% and by UX we do not need the half of the screen for the dictionary name.
2025-10-07 23:44:02 +03:00
Evgeniy A. Dushistov
9c77e91006 fix: include stdio for popen 2025-08-17 14:29:03 +03:00
Evgeniy A. Dushistov
b74bc2478a chore: document integration with readline
fixes #27
2025-08-17 14:22:40 +03:00
2 changed files with 21 additions and 11 deletions

View File

@@ -21,17 +21,6 @@ make install
#+END_SRC
you can use "DESTDIR" variable to change installation path
* Integration with [[https://github.com/junegunn/fzf][fzf]]
Useful when you have multiple dictionaries
#+BEGIN_SRC sh
fzf --prompt="Dict: " \
--phony \
--bind "enter:reload(sdcv {q} -n --json | jq '.[].dict' -r)" \
--preview "sdcv {q} -en --use-dict={}" \
--preview-window=wrap \
< <(echo)
#+END_SRC
* Documentation
See sdcv man page for usage description.
@@ -40,6 +29,26 @@ To report bugs use https://github.com/Dushistov/sdcv/issues ,
if it is not possible you can report it via email to dushistov at mail dot ru.
Be sure to include the word "sdcv" somewhere in the "Subject:" field.
* Integration with [[https://github.com/junegunn/fzf][fzf]]
Useful when you have multiple dictionaries
#+BEGIN_SRC sh
fzf --prompt="Dict: " \
--phony \
--bind "enter:reload(sdcv {q} -n --json | jq '.[].dict' -r)" \
--preview "sdcv {q} -en --use-dict={}" \
--preview-window=right:70%:wrap \
< <(echo)
#+END_SRC
* Integration with readline
This lines can be added to inputrc file (~/.inputrc, /etc/inputrc),
to abort multiply usage with ESC:
#+begin_src
$if sdcv
"\e\e": "-1\n"
$endif
#+end_src
* Notes to developer
** make source code release
#+BEGIN_SRC sh

View File

@@ -23,6 +23,7 @@
#endif
#include <cstring>
#include <cstdio> //for popen
#include <map>
#include <memory>