rauchg / spot Goto Github PK
View Code? Open in Web Editor NEWTiny file search utility (bash)
Tiny file search utility (bash)
Hi, I created Awesome package manager and I can install your repo using it.
After installing the Awesome:
awesome -i rauchg/spot
If you can put it in your README, it will be awesome.
Thanks.
Shin
Not only .svn, .git, if there is an option to exclude a given directories, it will be nicer.
grep
has -A
and -B
to show lines after & before the search result. This would be great for spot
.
Hi, thanks for writing this! I'm trying to package the script for Debian and was advised to run shellcheck (http://hackage.haskell.org/package/ShellCheck) on the script before going further. It reports some thngs that you might want to fix.
In spot.sh line 31:
cyan=`echo -e '\033[96m'`
^-- SC2006: Use $(..) instead of deprecated `..`
In spot.sh line 32:
reset=`echo -e '\033[39m'`
^-- SC2006: Use $(..) instead of deprecated `..`
In spot.sh line 115:
dir=`echo $1 | sed "s/\/$//"`
^-- SC2006: Use $(..) instead of deprecated `..`
^-- SC2001: See if you can use ${variable//search/replace} instead.
^-- SC2086: Double quote to prevent globbing and word splitting.
In spot.sh line 155:
if [ $filename ]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
In spot.sh line 160:
eval "find "$dir" $findopt -type f $exclude -print0" \
^-- SC2027: The surrounding quotes actually unquote this. Remove or escape them.
^-- SC2086: Double quote to prevent globbing and word splitting.
In spot.sh line 161:
| GREP_COLOR="1;33;40" xargs -0 grep $grepopt -e "`echo $@`" \
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
^-- SC2006: Use $(..) instead of deprecated `..`
^-- SC2068: Double quote array expansions, otherwise they're like $* and break on spaces.
In spot.sh line 165:
| awk -v linenums=$linenums -v reset=`tput sgr0` -v colors=$colors -v mline=$mline '{
^-- SC2046: Quote this to prevent word splitting.
^-- SC2006: Use $(..) instead of deprecated `..`
As you can see it's rather minor things, but there are some quoting warnings that might cause problems in the future. I'll submit a pull request when I get some time, hope you can begin fixing this in the meantime! By the way, the request for packaging is at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688866 and any help is welcome.
Thanks again
I installed via the curl option.
When I run spot something:
root@server:# spot 8088
root@server#
It justs returns a new line and stops (instantly)
I can run spot -h and everything perfectly.
When trying spot --update
root@server# spot --update
... updating
Cloning into 'spot'...
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 9 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (9/9), 4.80 KiB | 0 bytes/s, done.
Checking connectivity... done.
cp spot.sh /usr/local/bin/spot
cp spot.1 /usr/local/share/man/man1/spot.1
cp: cannot create regular file '/usr/local/share/man/man1/spot.1': No such file or directory
Makefile:12: recipe for target 'install' failed
make: *** [install] Error 1
This is on ubuntu server 16.04.
Biggest annoyance by far.
It would be nice to do a search and not recurse into node_modules/.
Would be nice if it didn't search in *~
files and .*.swp
files (and any other temporary/backup files). I'll send a pull request if I have time.
Leaving this as a reminder for myself.
I intend to package spot for Debian and derivatives. A Request For Packaging has been filed at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688866
Of course, any help is welcome.
Aids with double click selection
Using the provided CURL instruction renders an error for me... (OS X 10.7.4). Same result with sudo or without sudo.
May I suggest making a Homebrew package for this?
sudo curl https://raw.github.com/guille/spot/master/spot.sh -o ~/usr/local/bin/spot && chmod +x ~/usr/local/bin/spot
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file /Users/hced/usr/local/bin/spot: No such
Warning: file or directory
100 2519 100 2519 0 0 2172 0 0:00:01 0:00:01 --:--:-- 4403
curl: (23) Failed writing body (0 != 2519)
hced@hced ~ % which curl && curl --version
/usr/bin/curl
curl 7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM SSL libz
spot xxx-yyy
should work fine
I'd like some way to ignore node_module directories. Thoughts?
Breaks double click to select for quick copy and paste :D
Hell breaks loose basically.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.