mirror of
https://github.com/sharkdp/bat
synced 2026-06-09 10:03:18 +00:00
Add syntax detection for files with ksh shebang lines
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
[3;38;2;124;120;101m#[0m[3;38;2;124;120;101m!/bin/ksh[0m
|
||||
[3;38;2;124;120;101m#[0m
|
||||
[3;38;2;124;120;101m#[0m[3;38;2;124;120;101m https://www.qnx.com/developers/docs/6.4.0/neutrino/user_guide/scripts.html[0m
|
||||
[3;38;2;124;120;101m#[0m[3;38;2;124;120;101m tfind:[0m
|
||||
[3;38;2;124;120;101m#[0m[3;38;2;124;120;101m script to look for strings in various files and dump to less[0m
|
||||
|
||||
[38;2;249;38;114mcase[0m[38;2;255;255;255m [0m[38;2;255;255;255m$[0m[38;2;255;255;255m#[0m[38;2;255;255;255m [0m[38;2;249;38;114min[0m
|
||||
[38;2;255;255;255m1[0m[38;2;249;38;114m)[0m
|
||||
[38;2;255;255;255m [0m[38;2;255;255;255mfind[0m[38;2;255;255;255m .[0m[3;38;2;253;151;31m -[0m[3;38;2;253;151;31mname[0m[38;2;255;255;255m [0m[38;2;255;255;255m'[0m[38;2;230;219;116m*.[ch][0m[38;2;255;255;255m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;255;255;255mxargs[0m[38;2;255;255;255m grep [0m[38;2;255;255;255m$[0m[38;2;255;255;255m1[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;255;255;255mless[0m
|
||||
[38;2;255;255;255m [0m[38;2;102;217;239mexit[0m[38;2;255;255;255m 0 [0m[3;38;2;124;120;101m#[0m[3;38;2;124;120;101m good status[0m
|
||||
[38;2;249;38;114mesac[0m
|
||||
|
||||
[38;2;102;217;239mecho[0m[38;2;255;255;255m [0m[38;2;255;255;255m"[0m[38;2;230;219;116mUse tfind stuff_to_find [0m[38;2;255;255;255m"[0m
|
||||
[38;2;102;217;239mecho[0m[38;2;255;255;255m [0m[38;2;255;255;255m"[0m[38;2;230;219;116m where : stuff_to_find = search string [0m[38;2;255;255;255m"[0m
|
||||
[38;2;102;217;239mecho[0m[38;2;255;255;255m [0m[38;2;255;255;255m"[0m[38;2;230;219;116m [0m[38;2;255;255;255m"[0m
|
||||
[38;2;102;217;239mecho[0m[38;2;255;255;255m [0m[38;2;255;255;255m"[0m[38;2;230;219;116me.g. tfind console_state looks through all files in [0m[38;2;255;255;255m"[0m[38;2;255;255;255m [0m
|
||||
[38;2;102;217;239mecho[0m[38;2;255;255;255m [0m[38;2;255;255;255m"[0m[38;2;230;219;116m the current directory and below and displays all [0m[38;2;255;255;255m"[0m
|
||||
[38;2;102;217;239mecho[0m[38;2;255;255;255m [0m[38;2;255;255;255m"[0m[38;2;230;219;116m instances of console_state.[0m[38;2;255;255;255m"[0m
|
||||
[38;2;102;217;239mexit[0m[38;2;255;255;255m 1 [0m[3;38;2;124;120;101m#[0m[3;38;2;124;120;101m bad status[0m
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# https://www.qnx.com/developers/docs/6.4.0/neutrino/user_guide/scripts.html
|
||||
# tfind:
|
||||
# script to look for strings in various files and dump to less
|
||||
|
||||
case $# in
|
||||
1)
|
||||
find . -name '*.[ch]' | xargs grep $1 | less
|
||||
exit 0 # good status
|
||||
esac
|
||||
|
||||
echo "Use tfind stuff_to_find "
|
||||
echo " where : stuff_to_find = search string "
|
||||
echo " "
|
||||
echo "e.g. tfind console_state looks through all files in "
|
||||
echo " the current directory and below and displays all "
|
||||
echo " instances of console_state."
|
||||
exit 1 # bad status
|
||||
Reference in New Issue
Block a user