ARIFY(1)

πŸ“¦ version 0.3.0, in alpine 3.24

πŸ’… 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 ✨

  • -e engines β€” Overrides the ARIFY_ENGINES environment 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.

  • -f frontend β€” Overrides the ARIFY_FRONTEND environment variable with frontend.
  • -l log-file β€” Overrides the ARIFY_LOG_FILE environment variable with log-file.
  • -n page-size β€” Overrides the ARIFY_PAGE_SIZE environment variable with page-size.
  • -p preload-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 most 20).

If the variable is unset or empty, value 5 will be used.

πŸ’– Readline-only environments: πŸ’–

  • ARIFY_RL_NO_AUTO_UNSETENV β€” By default, when arify is enabled for the first time (by invoking the arify-toggle Readline command), environment variables related to arify are 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. Overrides rl_completer_word_break_characters when arify is 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_PRELOAD is not functioning, arify does not work.
  • When a Readline program does fancy things with the Readline API (e.g., change handler functions during user input), arify may also fail to work, since it may break the internal states arify maintains.

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 (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