Pass the output of french-conjugator (verbiste’s cli) to less
This function will pass the output of french-conjugator to less:
# pass output of french-conjugator to less
function con() { # define function 'con'
french-conjugator "$@" \ # pass the argument '$@' to the command 'french-conjugator'
2>&1 \ # redirect standard error, i.e. 2, to standard output, i.e. 1
| \ # sends the output of the command 'french-conjugator' (to less)
less --quit-if-one-screen # prints input to less; the option causes less to exit if output can be display on the first screen
}
You can copy this to .bashrc
:
# pass output of french-conjugator to less
function con() {
french-conjugator "$@" 2>&1 | \
less --quit-if-one-screen
}
Now, run $ con verb
to display conjugation.
To install french-conjugator run:
$ sudo apt install verbiste
personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki verbiste offline