Commit Graph

21 Commits

Author SHA1 Message Date
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Bernardo Meurer
363ef08971
Merge pull request #155162 from ZenithalHourlyRate/command-not-found-interactive
command-not-found: add interactive option for auto run
2022-02-08 15:30:05 -08:00
Zenithal
0358703df2
command-not-found: add interactive option for auto run 2022-01-16 07:54:04 +08:00
Zenithal
d046fcf4b1
command-not-found: make NIX_AUTO_RUN work when multiple choices 2022-01-16 07:34:03 +08:00
Bernardo Meurer
c301c1995e
command-not-found: remove NIX_AUTO_INSTALL 2021-10-04 12:43:39 -07:00
Anders Kaseorg
d8ef13fc13 modules/programs/command-not-found: Fix ShellCheck warnings
https://github.com/koalaman/shellcheck/wiki/SC2086
Double quote to prevent globbing and word splitting.

https://github.com/koalaman/shellcheck/wiki/SC2166
Prefer `[ p ] && [ q ]` as `[ p -a q ]` is not well defined.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-09-06 08:49:34 +09:00
rnhmjoj
61b7cab481
treewide: use perl.withPackages when possible
Since 03eaa48 added perl.withPackages, there is a canonical way to
create a perl interpreter from a list of libraries, for use in script
shebangs or generic build inputs. This method is declarative (what we
are doing is clear), produces short shebangs[1] and needs not to wrap
existing scripts.

Unfortunately there are a few exceptions that I've found:

  1. Scripts that are calling perl with the -T switch. This makes perl
  ignore PERL5LIB, which is what perl.withPackages is using to inform
  the interpreter of the library paths.

  2. Perl packages that depends on libraries in their own path. This
  is not possible because perl.withPackages works at build time. The
  workaround is to add `-I $out/${perl.libPrefix}` to the shebang.

In all other cases I propose to switch to perl.withPackages.

[1]: https://lwn.net/Articles/779997/
2021-03-31 21:35:37 +02:00
Sheena Artrip
52fc21b10f command-not-found: fix zsh exit code 2021-01-24 20:14:16 +01:00
Eelco Dolstra
dd23fc0ca2
Typo 2021-01-04 12:44:03 +01:00
Bernardo Meurer
e4cd9a8f04
nixos/command-not-found: don't use fancy quotes 2021-01-01 20:04:28 -08:00
Bernardo Meurer
88632b7801
nixos/command-not-found: don't suggest nix-env 2021-01-01 16:29:05 -08:00
volth
bb9557eb7c lib.makePerlPath -> perlPackages.makePerlPath 2018-12-15 03:50:31 +00:00
Eelco Dolstra
9df79de1a1
Enable command-not-found
5a5db609e5 disabled it by default, which
may have been unintentional. mkEnableOption considered harmful.
2017-10-10 12:26:24 +02:00
Matt McHenry
48a3e1a88d fix 'command-not-found: is a directory' error 2017-04-28 23:11:21 -04:00
makefu
5a5db609e5
command-not-found: add options
add option to disable command-not-found as well as option to define dbPath.
Disabling this may remove the perl dependency for bash/zsh prompts
2017-04-17 16:48:47 +02:00
Arda Xi
e60c4995fd command-not-found: pass all of argv to helper 2015-12-28 15:09:48 +01:00
Nathan Zadoks
254eebd8a0 command-not-found: add NIX_AUTO_RUN 2015-12-28 15:09:48 +01:00
Eelco Dolstra
c090efb9d8 command-not-found: Fix nix-env invocation 2015-09-02 19:49:34 +02:00
Eelco Dolstra
13532ee161 command-not-found: Use attribute name 2015-09-02 17:40:19 +02:00
Spencer Whitt
6cba6dc61b command-not-found: Add ZSH Support 2015-01-12 03:45:48 -05:00