ARIFY(1)
π arify β¨ β execute program with input methods π
okay so bestie, this page is literally from the ARIF User Manual (the ARIFY(1) page, no cap), and it's all about arify β a little icon that runs your program and hooks it up to input method engines. Let's get into it π«Ά
πΈ NAME πΈ
arify β execute program with input methods β¨
π SYNOPSIS π
arify [options] pathname [args]
π¦ DESCRIPTION π¦
So it executes the program referred to by pathname, passing args as its command-line arguments. Periodt.
If the program uses a line editor supported by ARIF, it will be provided with the ability to interact with input method engines. The exact behaviour depends on the frontend specified π.
β¨ OPTIONS β¨
-eengines β Overrides theARIFY_ENGINESenvironment variable with engines.
If multiple -e options are provided, the resulting value is a concatenation of each engines, with an ASCII Space character as separator.
-ffrontend β Overrides theARIFY_FRONTENDenvironment variable with frontend.-llog-file β Overrides theARIFY_LOG_FILEenvironment variable with log-file.-npage-size β Overrides theARIFY_PAGE_SIZEenvironment variable with page-size.-ppreload-library β Path to the preload library (e.g."/usr/local/lib/libarify.so").
Default value depends on the specified install directory when building ARIF.
-Vβ Prints the version number of ARIF, and then exits.
π EXIT STATUS π
If an error occurs before pathname is executed, the program exits with status 1. Otherwise, the exit status equals to that program's exit status.
π ENVIRONMENT π
ARIFY_FRONTENDβ The frontend program to use.
If the variable is unset or empty, value "readline" will be used.
To use the Readline frontend, key bindings should be configured. See the "Readline key bindings" subsection in NOTES for details.
ARIFY_ENGINESβ Comma-separated list of input method engines to use. At least one engine should be specified.
See the "Engine names" subsection in NOTES for engine name format.
ARIFY_LOG_FILEβ Path to the file where error logs (and debug logs, if enabled) will be written to.
If the variable is unset or empty, logs will not be printed.
ARIFY_PAGE_SIZEβ Maximum number of candidates per page (at most20).
If the variable is unset or empty, value 5 will be used.
π Readline-only environments: π
ARIFY_RL_NO_AUTO_UNSETENVβ By default, whenarifyis enabled for the first time (by invoking thearify-toggleReadline command), environment variables related toarifyare unset, so that it won't be initialized in child processes.
This behavior can be disabled by setting this variable to any non-empty value.
ARIFY_RL_WORD_BREAK_CHARSβ List of characters that are supposed to signal a word break. Overridesrl_completer_word_break_characterswhenarifyis enabled.
If the variable is unset or empty, value " \t\n" will be used.
Note that the list should contain the actual characters (i.e., escape sequences would not work).
π§ NOTES π§
πΈ Engine names πΈ
Each engine name in the ARIFY_ENGINES list should comply with the following format:
$var_name:$symbol_name
The $var_name is the path to the shared library file containing the engine implementation. This name is used as the first argument to pass to dlopen(3).
The $symbol_name is the name of the struct arif_engine where the engine is implemented (see arif_set_engine(3)). This name is used as the second argument to pass to dlsym(3).
If the two names match the following pattern, a short_name can be used instead of the full name:
$libdir/arif/$short_name$shlib_suffix:arif_$short_name_engine
Where $shlib_suffix is the common name suffix for shared library files on the current platform (e.g., ".so" on GNU/Linux).
π¦ Readline key bindings π¦
If using the Readline frontend, extra key bindings need to be configured in ~/.inputrc:
arify-toggleβ Turn on/off input method engine.
When turned on, Readline's completion functions will be replaced by those provided by ARIF. When turned off, the previously saved completion functions will be restored.
arify-engine-infoβ Prints information regarding the currently active engine.arify-next-engineβ Switch to the next loaded engine. If there are no more available engines, switch back to the first engine.arify-page-up,arify-page-downβ Switch to previous/next page of candidates, and display them.
See EXAMPLES for an example configuration.
π EXAMPLES π
π Example Readline configuration π
The following is a simple ~/.inputrc snippet which configures key bindings for arify when working with rlexec(1).
$if rlexec
"\e ": arify-toggle
"\e\\": arify-next-engine
"\e[5;3~": arify-page-up # M-PgUp
"\e[6;3~": arify-page-down # M-PgDn
$endif
π₯ BUGS π₯
Theoretically arify should work with most programs with a supported frontend. However, there are situations where it may not work as expected:
- When
LD_PRELOADis not functioning,arifydoes not work. - When a Readline program does fancy things with the Readline API (e.g., change handler functions during user input),
arifymay also fail to work, since it may break the internal statesarifymaintains.
Meanwhile, adding support for more frontends may not be as simple (or even possible) as with Readline, due to the way how arify works.
π COPYRIGHT π
Copyright (C) 2023 CismonX <admin@cismon.net>
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
You should have received a copy of the license along with this document. If not, see https://www.gnu.org/licenses/fdl-1.3.html.
β SEE ALSO β
rlexec(1), arif_set_engine(3), dlopen(3), dlsym(3), readline(3), ld.so(8)
π Okay that's the whole vibe from the ARIF User Manual β version 0.1.0, dated Jan 02, 2023. Bye bestie, go make your input methods slay! π«Άβ¨
π¦ where this page comes from
- alpine 3.24: arif-doc 0.3.0-r1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms