What is supported

What luish-extra completes now, by plugin. Commands done and planned lists the commands that are done and those planned, and completion-todo.md has a box for each tool, with the version that each ticked one was checked against.

297 commands are completed so far, by 260 tools (a tool can bring several commands: BLAST+ is blastn, blastp, makeblastdb and 16 others):

Plugin

Commands

Tools done / listed

bio

182

173 / 772

science

42

26 / 68

gui

49

40 / 40

dev

12

10 / 88

system

4

3 / 4

media

1

1 / 15

hpc

7

7 / 14

Total

297

260 / 1001

Commands are completed by the name you type, not the name of their Bioconda package (STAR, not star; featureCounts, not subread). Commands that std’s completion plugin already covers (rg, fd, jq, uv, pixi, conda, docker, …) are left to it.

Programs that complete themselves

Some programs know their own completions, and are asked rather than described here:

  • Python programs built with Click (multiqc, cooler, nf-core, proksee, …) go through std’s Click bridge. Each Tab runs the program, so only those that answer in under a second are registered; a slower one (cooltools, genomad, iphop, planemo, …: 1.4 to 5 s) can be added with complete-click PROG if you accept the wait.

  • Go programs built with Cobra (seqkit, csvtk, taxonkit, apptainer) go through std’s Cobra bridge.

  • aws is asked through its own aws_completer.

If such a program isn’t installed, or doesn’t answer, Tab offers filenames.

A few programs have their options read from the installed version when Tab is pressed, so that they follow it: mmseqs, xsv, qsv, ruff, codex and claude (from their -h), mpv (--list-options), inkscape’s actions, and the private options of the codecs, formats and filters of ffmpeg (-h encoder=libx264).

bio

Options, subcommands, and values by kind: FASTA, FASTQ, BAM, BED, … files by extension; reference names for regions, from a .fai or a BAM header; presets and output formats.

Done: ngless, SemiBin2 / SemiBin, macrel, argnorm; samtools, bcftools, bedtools, tabix, bgzip, htsfile, sambamba, bamtools, samblaster, mosdepth, cramino, vcftools; bwa, bwa-mem2, bowtie2, hisat2, minimap2, STAR, kallisto, featureCounts; BLAST+ (blastn and the rest), diamond, mmseqs, HMMER; vsearch, cd-hit (and cd-hit-est, …); fastp, fastqc, falco, cutadapt, trimmomatic (its steps, and the adapter files that come with it), trim_galore, fastq_screen, seqtk, filtlong, chopper, nanoq, rasusa, porechop, NanoPlot, NanoFilt, NanoStat; assembly and annotation (spades.py, megahit, flye, quast, busco, prodigal, pyrodigal, prokka, bakta, barrnap, eggnog-mapper’s emapper.py and its scripts); profiling of metagenomes (kraken2, bracken, krakenuniq, centrifuge, kaiju, metaphlan, humann, motus); binning and MAGs (metabat2, concoct, run_MaxBin.pl, vamb, DAS_Tool, checkm, checkm2, gunc, gtdbtk, dRep, coverm); rgi, amrfinder (the taxonomy groups of its database, for --organism); seqkit, csvtk and taxonkit (which complete themselves, as Cobra programs); and, through the Click bridge, multiqc, peddy, genmod, plassembler, cooler, pairtools, checkv, virsorter, metacoag, harpy, defense-finder, dnaapler, genomepy, freyja, fastq-dl and biom. completion-todo.md has the tool versions they were checked against.

science

Workflows, writing, Python and R, tabular data and a few command-line utilities. Some of it reads the project you are in: the rules and included files of a Snakefile (targets, -R, --until), the profiles of a nextflow.config, the runs of .nextflow/history, the downloaded Nextflow projects, the parameters of an nf-core pipeline’s nextflow_schema.json; and the installed program: pandoc’s formats and extensions, Miller’s separator names, the commands of xsv and qsv and their options (read from their -h), the jupyter-* programs in PATH.

Done: jug, snakemake, nextflow, nf-core, nf-test, cwltool; quarto, pandoc, latexmk, pdflatex, xelatex, lualatex, bibtex; ipython, jupyter, Rscript and R; gnuplot, datamash; mlr, xsv, qsv, duckdb; parallel, aria2c, pigz, apptainer (Cobra; singularity is registered the same way, but was not run), aws.

gui

Desktop programs. It reads the installed LibreOffice’s filter registry (found from the soffice in PATH): the formats of --convert-to (pdf, docx, …) and, after EXT:, the filters that write them (pdf:writer_pdf_Export), and the input filters of --infilter=; and CUPS’s printers (lpstat -e) for --pt and --printer-name. mpv’s options are read from the installed mpv (--list-options), with the values of its choices and the video outputs, filters, profiles and audio devices it lists; and Inkscape’s actions (--actions) from inkscape --action-list, and the object IDs of --export-id, --query-id and --select from the SVG files on the command line. It also reads kate’s sessions, GIMP’s session files, and OBS’s profiles, scene collections and scenes (of the collection given or the current one); Firefox’s and Thunderbird’s profiles (-P) and Chrome’s (--profile-directory); VS Code’s installed extensions and profiles, and the subcommands of code tunnel, code serve-web and code agent from their help; Krita’s workspaces, window layouts and sessions; xrandr’s outputs and modes, gsettings’s schemas, keys and the values of enum and boolean keys, dconf’s keys and directories, and wmctrl’s windows. xdotool’s commands are completed as they are chained (xdotool search --name x windowactivate).

Done: firefox, thunderbird, chromium, google-chrome; libreoffice and soffice, evince, okular, zathura, xdg-open; code, meld, gedit, kate; vlc (and cvlc), mpv, gimp, inkscape, krita, blender, obs, audacity, eog; cytoscape (and Cytoscape, cytoscape.sh), jalview, Artemis (art, act, bamview, dnaplotter), tablet, BandageNG, proksee (Click), pymol, chimerax, vmd; xrandr, gsettings, dconf, notify-send, wmctrl, xdotool, swaymsg, hyprctl.

dev

Python tooling, coding agents and command-line utilities, beyond what std’s completion plugin covers. It reads the project: the tests of a test file for pytest (test_x.py::TestY::test_z), the markers its configuration files register (-m), the groups, extras, dependencies, scripts and sources of pyproject.toml and the packages of poetry.lock for poetry, the repositories of ~/.pypirc for twine; and the installed program: ruff’s options, linters and rule codes (--select F4 offers F401, …), bat’s languages and themes, the options and commands of claude and codex (with the agents of .claude/agents for claude --agent, and the profiles of $CODEX_HOME for codex --profile).

Done: pytest (with the options of pytest-xdist and pytest-cov), ruff, mypy (its error codes, and the inverses of its flags), poetry, twine; claude, codex, opencode; fzf, bat (and batcat).

system

Done: borg (repositories, and ::ARCHIVE with BORG_REPO; compression specs), fusermount and fusermount3 (the FUSE mount points, for -u), git-annex and git annex (which completes itself: its commands, options, remotes and backends).

media

ffmpeg, whose options depend on where they are: those of an input before the first -i, those of an output after it, and the private options of the codecs and the format chosen for the same input or output (-c:v libx264 -preset, -f mp4 -movflags). An option takes a stream specifier (-c: offers -c:v, -c:a, …; -metadata:s:a), and -c:v offers video encoders (or decoders, for an input). The codecs, formats, filters, pixel formats, sample formats, channel layouts, bitstream filters and hardware accelerations are read from the installed ffmpeg. The values of -vf, -af and -filter_complex are filtergraphs (filters, their options, and the constants of these: scale=w=1280:in_range=full); flags combine (-movflags +faststart+frag_keyframe); and -map offers the streams of the inputs, read with ffprobe, and the outputs of -filter_complex.

Done: ffmpeg.

hpc

Slurm’s commands, with all their options (also those that --help leaves out, such as sbatch --test-only), and the values that the cluster knows, asked of it when Tab is pressed: partitions (sbatch -p offers them with their time limits), accounts, QOS, clusters, nodes, node features (for -C, after & or |), GRES (--gres=gpu:a100), licenses, reservations and the user’s jobs (for scancel, --jobid, squeue -j and --dependency=afterok:). Lists are completed after a comma (--mail-type=BEGIN,END, squeue --states=PENDING,RUNNING, sacct --format=JobID,MaxRSS). The command that srun and salloc run is completed by its own completer (srun -n 4 python3 -). The cluster’s commands run under timeout, so a controller that doesn’t answer makes Tab offer nothing after 3 seconds rather than hang.

Done: sbatch, salloc, srun, squeue, scancel, sinfo, sacct.

When Tab doesn’t offer what you expect

  • plugin list-loaded lists the plugins that are loaded. With all, it shows extra/completion/bio, extra/completion/science, … (with the name you gave the source), extra/completion/extra-lib and std/completion.

  • __luish_internal list-completions lists the commands that have a completer, each with the plugin that registered it (__luish_internal list-completions | grep samtools shows that bio completes samtools). A command that isn’t listed gets luish’s default completion, which is filenames.

  • __luish_internal complete LINE prints what Tab offers at the end of LINE, one match per line (the text that replaces the word, a tab, then the description): __luish_internal complete 'samtools sort -O ' prints BAM, CRAM and SAM.

  • A program that completes itself (Click, Cobra, aws, git-annex), or whose options are read from it when Tab is pressed (mmseqs, ruff, mpv, ffmpeg’s codecs, …), has to be installed. Tab offers only filenames, or only what doesn’t come from the program, when the program isn’t in PATH, fails, or doesn’t answer in time. A Click program that takes more than a second to answer isn’t registered at all: complete-click PROG adds it, if you accept the wait.

  • What is read from a program is kept for up to five minutes, or until a command line names that program. Slurm’s jobs are kept for 5 seconds, and its nodes and licenses for 30. After you upgrade a program, run it once (ffmpeg -version) to have Tab read it again.

  • What is read from the project is read line by line, not parsed:

    • a Snakefile’s rules are the rule and checkpoint lines at the start of a line, in the Snakefile and in the files it include:s, so rules made by use rule ... from MODULE as ... aren’t offered;

    • pytest’s tests are the test* functions and Test* classes that pytest collects by default, so those that a configuration selects with other python_files, python_classes or python_functions, and the IDs of parametrized tests (test_x[case1]), aren’t offered;

    • Nextflow’s profiles are the blocks directly inside the profiles { ... } of nextflow.config (and of the files given with -c), found by counting braces, so profiles in files that it reads with includeConfig aren’t offered.