Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cheat cannot perform searches within programming languages #43

Closed
1 of 4 tasks
alexanderepstein opened this issue Jul 8, 2017 · 1 comment
Closed
1 of 4 tasks

Comments

@alexanderepstein
Copy link
Owner

alexanderepstein commented Jul 8, 2017

Issue Label:

  • Bug
  • New feature
  • Enhancement
  • New component

Description:
I am curling the link that is provided by cheat.sh/:help. Both curl -A curl -s cheat.sh/scala/~closure and curl -A curl -s cheat.sh/scala/~closure/irb return nothing.

However searches such as curl -A curl -s cheat.sh/~java/rrb does what it is supposed to and brings me to the javascript cheatsheet.

The output below can be recreated by running bash -x cheat -i -r -b scala closure.

+ currentVersion=1.10.1
+ configuredClient=
+ search=0
+ insensitive=
+ recursive=
+ boundry=
+ getConfiguredClient
+ command -v curl
+ configuredClient=curl
+ checkInternet
+ nc google.com 80
+ echo -e 'GET http://google.com HTTP/1.0\n\n'
+ '[' 0 -eq 0 ']'
+ return 0
+ getopts ribuvhis opt
+ case $opt in
+ insensitive=i
+ search=1
+ getopts ribuvhis opt
+ case $opt in
+ recursive=r
+ search=1
+ getopts ribuvhis opt
+ case $opt in
+ boundry=b
+ search=1
+ getopts ribuvhis opt
+ for arg in '"$@"'
+ [[ -i != \-\r ]]
+ [[ -i != \-\s ]]
+ [[ -i != \-\b ]]
+ [[ -i != \-\i ]]
+ for arg in '"$@"'
+ [[ -r != \-\r ]]
+ for arg in '"$@"'
+ [[ -b != \-\r ]]
+ [[ -b != \-\s ]]
+ [[ -b != \-\b ]]
+ for arg in '"$@"'
+ [[ scala != \-\r ]]
+ [[ scala != \-\s ]]
+ [[ scala != \-\b ]]
+ [[ scala != \-\i ]]
+ '[' -z ']'
+ arg1=scala
+ '[' '!' -z x ']'
+ arg2=scala
+ for arg in '"$@"'
+ [[ closure != \-\r ]]
+ [[ closure != \-\s ]]
+ [[ closure != \-\b ]]
+ [[ closure != \-\i ]]
+ '[' -z x ']'
+ '[' '!' -z x ']'
+ arg2=closure
+ checkSpecialPage scala 1
+ temp=scala
+ [[ scala == \l\i\s\t ]]
+ [[ scala == \l\e\a\r\n ]]
+ [[ scala == \s\t\y\l\e\s ]]
+ [[ 1 == \1 ]]
+ arg1=scala
+ checkSpecialPage closure 2
+ temp=closure
+ [[ closure == \l\i\s\t ]]
+ [[ closure == \l\e\a\r\n ]]
+ [[ closure == \s\t\y\l\e\s ]]
+ [[ 2 == \1 ]]
+ arg2=closure
+ [[ 5 == 0 ]]
+ [[ -i == \u\p\d\a\t\e ]]
+ [[ -i == \h\e\l\p ]]
+ [[ -i == \:\h\e\l\p ]]
+ [[ scala != closure ]]
+ getCheatSheet scala closure
+ [[ 2 == 1 ]]
+ link=cheat.sh/scala
+ [[ 2 == 2 ]]
+ [[ 1 == \1 ]]
+ link+=/~closure
+ [[ i != '' ]]
+ link+=/bir
+ httpGet cheat.sh/scala/~closure/bir
+ case "$configuredClient" in
+ curl -A curl -s cheat.sh/scala/~closure/bir
+ exit 0

Bug is existent on all platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant