Code Monkey home page Code Monkey logo

fish-nuggets's Introduction

Fish nuggets

The fish nuggets project contains various completions and functions for the amazing Fish shell.

Git features

  • Provides completion for git commands (eg. git ch completes for you)
  • Provides completion of branch names for git branch

Rake features

Completion of rake tasks with task description. The first time you type rake we will create a file containing the rake tasks in /tmp giving you tab completion of rake tasks. This supports several Rakefile locations, so you can use it for different projects.

Capistrano features

Like Rake, lets you use tab completion for Capistrano tasks.

Rubygems features

  • edit_gem with tab completion for gem name lets you view the source for installed gems
  • gem_doc with tab completion for gem name lets you view Rdoc for installed gems

Installation

cd ~/.config/fish git init git add . git remote add github git://github.com/eventualbuddha/fish-nuggets.git git pull github master

Go into ~/.config/fish and add this repository, then pull. This will add the scripts in this projects for you to use.

Credits

Thanks to Lachie Cox for the initial rvm scripts (http://github.com/lachie/dotfiles).

fish-nuggets's People

Contributors

augustl avatar codahale avatar codinganarchy avatar danielpclark avatar develop7 avatar drbig avatar ecerulm avatar elektronaut avatar eventualbuddha avatar gvkhna avatar jasiek avatar jbruggem avatar jdelstrother avatar js avatar k13n avatar khoyee avatar lucas-clemente avatar lunks avatar rubycut avatar shortcut-kinder avatar stragu avatar sunaku avatar tiagofernandez avatar yookoala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fish-nuggets's Issues

Incorrect color code passing from bash to fish

OSX 10.8.3, fish 2.0 open beta r2, rvm 1.19.1

In rvm.fish, the output of env contains several lines like rvm_notify_clr=<code> where rvm stores color codes for different messages. When passed to $env_file, they are rendered as ^[[..., and when fish tries to evaluate this (sed'ed) file, the unmatched parentheses produce an error like

fish: Tokenizer error: 'Unexpected end of string, parenthesis do not match'

Probable solution would be to encode color codes so that fish would understand them, or at least strip them during the creation of $env_file. Unfortunately, I do not know about bash and fish enough to fix it myself. I tried removing color codes with sed as

sed "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"

but it did not seem to work. Any ideas?

RVM doesn't work under Alpine Linux

Hi!
I noticed that RVM function doesn't work under Alpine Linux due to a missing argument in the grep execution.

To make it work, simply change line 7 of file fish-nuggets/functions/rvm.fish to this:

and eval (grep -E '^rvm|^[^=]*PATH|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//')

Hope this helps!
Paolo

rvm function messes with my `GOPATH` variable

I have installed the rvm function this April. And I found that rvm would mess up my variables unrelated to Ruby installation.

Here is the simplest form of my problem:

$ set -xg GOPATH /home/foobar/foo:/home/foobar/bar
$ echo $GOPATH
/home/foobar/foo:/home/foobar/bar
$ rvm use default
Using /home/foobar/.rvm/gems/ruby-2.4.1
$ echo $GOPATH
/home/foobar/foo /home/foobar/bar

Seems rvm swaps the colon : with \x1E. Unfortunately, Golang's toolchain needs the variable in its raw form. The rvm function should not assume that all *PATH variables need to be converted to fish native array.

Also reported here: fish-shell/fish-shell#4039

`cd -` doesn't work

I followed the instructions on the RVM website for installing rvm with fish. After doing this, the cd - command, which normally changes the working directory to the previous directory I was in, no longer works. Instead I get this error:

cd: The directory '-' does not exist

Any idea why or how I can fix this?

Fish 2.3 - Warning! PATH is not properly set up,

After updating fish to version 2.3 this warning is popping up when call the first time rvm use ruby-2.3.0. Future rvm calls are working properly.

Warning! PATH is not properly set up, '/home/lho/.rvm/gems/ruby-2.3.0/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.3.0'.

I added also set -g -x PATH $HOME/.rvm/bin $PATH to config.fish

PATH issue

Basically this destroys custom user supplied paths in ~/.config/fish/config.fish.
The quick fix for this is to set PATH after that eval.
Please fix this so that if looks something like that:

set PATH $rvm_paths $PATH

rvm function stripping parentheses from "Program Files (x86)"

I'm using fish in Cygwin, so that PATH variable contains paths with "Program Files (x86)" directory. The issue is that sed invocation in 8th line of rvm function is stripping parenthesis from paths, which makes them invalid.

My quick and dirty workaround was to change this line to:

and eval (grep -E '^rvm|^PATH|^GEM_PATH|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//' | string replace "Program Files x86" "Program Files (x86)")

I'm not sure why you are stripping parentheses (fa28b00), but if that isn't necessary then solution would be to just don't ;) (that is, remove s/(//; s/)// part of sed script)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.