Skip to content
Myr

Display 'gem install curses' when curses cannot be loaded

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 22989b0 · Browse files · 2 files+9 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−4 removed

  • other:+9 added−4 removed

2 files+9 added−4 removed

modified:fzf+7 added-2 removed
5 unmodified lines
6# / /_/_ / / /_7# / __/ / /_/ __/8# /_/ /___/_/ Fuzzy finder for your shell9#10# Version: 0.8.7 (Jul 18, 2014)10# Version: 0.8.7 (Jul 27, 2014)11#12# Author: Junegunn Choi13# URL: https://github.com/junegunn/fzf14# License: MIT
20 unmodified lines
35# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION36# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION37# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.3839begin40 require 'curses'41rescue LoadError42 $stderr.puts 'curses gem is not installed. Try `gem install curses`.'43 exit 144end45require 'thread'40require 'curses'46require 'set'4748unless String.method_defined? :force_encoding49 class String
1216 unmodified lines
modified:install+2 added-2 removed
27 unmodified lines
28else29 echo "Not found"30 echo "Installing 'curses' gem ... "31 if (( EUID )); then32 /usr/bin/env gem install curses -v 1.0.0 --user-install32 /usr/bin/env gem install curses --user-install33 else34 /usr/bin/env gem install curses -v 1.0.034 /usr/bin/env gem install curses35 fi36 if [ $? -ne 0 ]; then37 echo38 echo "Failed to install 'curses' gem."
339 unmodified lines