Code Monkey home page Code Monkey logo

tmux-version-switcher's Introduction

Select several interpreter versions in tmux panes automatically.

  • perlbrew
  • plenv
  • rbenv
  • pyenv

Usage

$tool shell v1 v2 ...

Opens tiled panes and selects the specified versions. Activates synchronize-panes.

$tool run '$x = 23' v1 v2 ...

Does what shell does and runs the specified command in your interpreter.

$tool exec 'perl myapp.pl' v1 v2 ...

Does what shell does and runs the specified command.

Installation

% git clone https://github.com/perlpunk/tmux-version-switcher.git
# or
% git hub clone perlpunk/tmux-version-switcher
# put this in your .bashrc/.zshrc:
% source /path/to/tmux-version-switcher/init

Examples

% tmux-perlbrew-switcher shell perl-5.22.0 perl-5.24.0
# tmux opens with two tiled panes, with the specified versions

% tmux-perlbrew-switcher run '$x = 23' perl-5.22.0 perl-5.24.0
# tmux opens with two tiled panes and runs `perl -wE'$x = 23'`

% tmux-perlbrew-switcher exec 'perl myapp.pl' perl-5.22.0 perl-5.24.0
# tmux opens with two tiled panes and runs `perl myapp.pl`

Shell Tab Completion

There is tab completion available for bash and zsh. Sourcing the init script should set it all up for you. The files are in the share/bash and share/zsh folders.

Note for zsh users: Sourcing the init script should happen before the compinit call.

Then you will be able to do:

% $tool <TAB> # shell, run, exec
% $tool shell <TAB> # list versions

Requirements

  • bash
  • tmux
  • perlbrew, plenv, ...
  • sed (used in completion)

tmux-version-switcher's People

Contributors

perlpunk avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.