How to find fuzzy matched commands in bash

eleanora

In bash when I type

icc

I get

No command 'icc' found, but there are 27 similar ones

How do I find these 27 similar commands?

Mustafa DOGRU

the max limit is 15, you can temporary change this as below;

find CommandNotFound.py

sudo find / -name "CommandNotFound.py"

open this file with root privilege;

sudo gedit /usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py

change max_len 15 to 150 ;

def print_spelling_suggestion(self, word, min_len=3, max_len=150): 

or change as below;

...
 #if len(possible_alternatives) > max_len:
 #    print(_("No command '%s' found, but there are %s similar ones") % (word, len(possible_alternatives)), file=sys.stderr)
 #elif len(possible_alternatives) > 0:
 if len(possible_alternatives) > 0:
            print(_("No command '%s' found, did you mean:") % word, file=sys.stderr)
            for (w, p, c) in possible_alternatives:
                print(_(" Command '%s' from package '%s' (%s)") % (w, p, c), file=sys.stderr)
...

test

$ icc
No command 'icc' found, did you mean:
 Command 'hcc' from package 'uhexen2' (multiverse)
 Command 'hcc' from package 'lam4-dev' (universe)
 Command 'kcc' from package 'kcc' (universe)
 Command 'fcc' from package 'fcc' (universe)
 Command 'ico' from package 'x11-apps' (main)
 Command 'zcc' from package 'z88dk-bin' (universe)
 Command 'gcc' from package 'gcc' (main)
 Command 'cc' from package 'clang-3.4' (universe)
 Command 'cc' from package 'clang-3.5' (universe)
 Command 'cc' from package 'tcc' (universe)
 Command 'cc' from package 'clang-3.3' (universe)
 Command 'cc' from package 'gcc' (main)
 Command 'ecc' from package 'ecere-dev' (universe)
 Command 'rcc' from package 'qtchooser' (main)
 Command 'iac' from package 'libpolyorb2-dev' (universe)
 Command 'xicc' from package 'xicc' (universe)
 Command 'inc' from package 'nmh' (universe)
 Command 'inc' from package 'mailutils-mh' (universe)
 Command 'tcc' from package 'tcc' (universe)
 Command 'ick' from package 'intercal' (universe)
 Command 'ucc' from package 'exult-studio' (multiverse)
 Command 'bcc' from package 'bcc' (main)
 Command 'icp' from package 'renameutils' (universe)
 Command 'ica' from package 'italc-client' (universe)
 Command 'irc' from package 'epic5' (universe)
 Command 'irc' from package 'epic4' (universe)
 Command 'irc' from package 'ircii' (universe)
 Command 'imc' from package 'italc-management-console' (universe)
 Command 'ncc' from package 'tinyos-tools' (universe)
 Command 'scc' from package 'scheme2c' (universe)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

In python: How to find match of string in same row, compare part of (fuzzy) matched string to list?

From Dev

Bash: how would I combined these two find commands into one?

From Dev

How can I use two bash commands in -exec of find command?

From Dev

How can I use bash's if test and find commands together?

From Dev

How are double quotation marks in bash matched (paired)?

From Dev

How to find by array and return nil if not matched?

From Dev

Determining which words were matched in a fuzzy search

From Dev

Windows Git Bash shell cannot find commands?

From Dev

How to fuzzy complete filenames in bash like vim's ctrlp plugin?

From Dev

How to timeout a group of commands in Bash

From Dev

How to run bash commands in gulp?

From Dev

How to nest quotes in bash commands

From Dev

How to swap two commands in bash?

From Dev

How does bash execute commands

From Dev

Bash: how to pass commands to a function

From Dev

How do I find fuzzy duplicates from this php array?

From Dev

How can I find the best fuzzy string match?

From Dev

how to use Fuzzy look up to find the sentence in SQL?

From Dev

How to find commands associated to a package?

From Dev

How to find matched rows by skipping certain column(s)?

From Dev

vim find command: how to list all matched files

From Dev

Drools- how to find out which all rules were matched?

From Dev

SQL - Find duplicate fields and count how many fields are matched

From Dev

How to find two matched ID in two files, and then use their values to calculate

From Dev

Meteor: How to find array of object with matched array of selector?

From Dev

how do i find the location where a Spirit parser matched?

From Dev

How can I find position of matched regex of a single string in Perl?

From Dev

how to find all result with any keyword matched in mysql

From Dev

find + how to print the file name when grep is matched

Related Related

  1. 1

    In python: How to find match of string in same row, compare part of (fuzzy) matched string to list?

  2. 2

    Bash: how would I combined these two find commands into one?

  3. 3

    How can I use two bash commands in -exec of find command?

  4. 4

    How can I use bash's if test and find commands together?

  5. 5

    How are double quotation marks in bash matched (paired)?

  6. 6

    How to find by array and return nil if not matched?

  7. 7

    Determining which words were matched in a fuzzy search

  8. 8

    Windows Git Bash shell cannot find commands?

  9. 9

    How to fuzzy complete filenames in bash like vim's ctrlp plugin?

  10. 10

    How to timeout a group of commands in Bash

  11. 11

    How to run bash commands in gulp?

  12. 12

    How to nest quotes in bash commands

  13. 13

    How to swap two commands in bash?

  14. 14

    How does bash execute commands

  15. 15

    Bash: how to pass commands to a function

  16. 16

    How do I find fuzzy duplicates from this php array?

  17. 17

    How can I find the best fuzzy string match?

  18. 18

    how to use Fuzzy look up to find the sentence in SQL?

  19. 19

    How to find commands associated to a package?

  20. 20

    How to find matched rows by skipping certain column(s)?

  21. 21

    vim find command: how to list all matched files

  22. 22

    Drools- how to find out which all rules were matched?

  23. 23

    SQL - Find duplicate fields and count how many fields are matched

  24. 24

    How to find two matched ID in two files, and then use their values to calculate

  25. 25

    Meteor: How to find array of object with matched array of selector?

  26. 26

    how do i find the location where a Spirit parser matched?

  27. 27

    How can I find position of matched regex of a single string in Perl?

  28. 28

    how to find all result with any keyword matched in mysql

  29. 29

    find + how to print the file name when grep is matched

HotTag

Archive