fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
13edce367
master
1function __findstr_generate_args --description'Function to generate args' 2set --local current_token( commandline --current-token --cut-at-cursor) 3switch $current_token 4case '/a:*' 5echo -e'0\tBlack 61\tBlue 72\tGreen 83\tAqua 94\tRed 105\tPurple 116\tYellow 127\tWhite 138\tGray 149\tLight blue 15A\tLight green 16B\tLight aqua 17C\tLight red 18D\tLight purple 19E\tLight yellow 20F\tBright white' | awk -F'\t' "{ printf \" $current_token %s\t%s\n\", \$1, \$2 }" 21case '*' 22echo -e'/b\tMatch at the beginning of the line 23/e\tMatch at the end of the line 24/l\tUse literal strings 25/r\tUse regular expressions 26/s\tSearch a current directory and all subdirectories 27/i\tIgnore case 28/x\tMatch exactly 29/v\tInvert match 30/n\tPrint line numbers 31/m\tPrint only the file name with matching lines 32/o\tPrint character offset 33/p\tSkip files with non-printable characters 34/off\tDon\'t skip files that have the offline attribute set 35/offline\tDon\'t skip files that have the offline attribute set 36/f:\tRead a file list from file 37/c:\tSpecify a literal search string 38/g:\tRead literal search strings from file 39/d:\tSpecify the search list of directories 40/a:\tUse color attributes with two hexadecimal digits 41/?\tShow help' 42end 43end 44 45complete --command findstr --no-files --arguments'(__findstr_generate_args)'