1

I created a command line ruby gem and would like to have bash or zsh completion. I created and versionned them, but I have to source them manually.

Is there a common way to execute scripts after the gem install, for example to edit the bashrc or zshrc and add the source command?

tshepang
  • 12,111
  • 21
  • 91
  • 136
reaper
  • 398
  • 3
  • 15

1 Answers1

0

If you are using ruby gems:

After installation your script, that placed in ./bin/ folder should automatically appeared in /usr/bin/ folder.

zsh and bash on OS X automatically suggest me competition for all commands, that placed in /usr/bin/ directory.

Possible problems, that can prevent code completions for your gem:

  • check, that your gem-file is executable (chmod +x file)
  • after installation open new terminal window to update shell settings.
skywinder
  • 21,291
  • 15
  • 93
  • 123