Giter Site home page Giter Site logo

with's Introduction

with

Join the chat at https://gitter.im/with-tool/with Program prefixing for continuous workflow using a single tool.

Usage

with <program>

Starts an interactive shell with where every command is prefixed using <program>.

For example:

$ with git
git> add .
git> commit -a -m "Commited"
git> push

Can also be used for compound commands.

$ with java Primes
java Primes> 1
2
java Primes> 4
7

And to repeat commands:

$ with gcc -o output input.c
gcc -o -output input.c>
<enter>
Compiling...
gcc -o -output input.c>

To execute a shell command proper prefix line with :.

git> :ls

You can also drop, add, and replace different commands.

git> +add
git add> <some file>
git add> !commit
git commit> <arguments and message>
git commit> -
git>

To exit use either :q or :exit.

Installation

With apt-get:

sudo add-apt-repository ppa:mchav/with && sudo apt-get update && sudo apt-get install with

With bpkg:

bpkg install mchav/with -g

With FreeBSD pkg:

pkg install with

With FreeBSD ports

cd /usr/ports/misc/with && make install clean

With rawgit:

curl -sLo- https://cdn.rawgit.com/mchav/with/master/install | bash

or:

curl -s https://raw.githubusercontent.com/mchav/with/master/install | bash

Currently supports command history and limited completions.

with's People

Contributors

0mp avatar acader avatar alexchesters avatar cchan avatar chotiwat avatar desyncr avatar dragonator avatar gitter-badger avatar jdloft avatar jwerle avatar keller00 avatar mchav avatar qw3rtman avatar tomnomnom 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

with's Issues

sed -r not supported on on osx

Running with gives

sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

Correct readme

Readme says states that ':q' or ':exit:' will exit

Entering git> :exit: command gives error but git> :exit works?

colours get lost

with with ls i don't see the coloured folders. it'd be nice to somehow retain the colouring.

Syntax error on Linux Ubuntu with #!/usr/bin/env sh

Hi, on Ubuntu 14.04 LTS when I try to use with I obtain the following syntax error:
with: 12: with: Syntax error: "(" unexpected (expecting "fi")
If I try to replace #!/usr/bin/env sh with #!/usr/bin/env bash all the troubles go away.
I think I obtain that error because on Ubuntu sh is a link to dash shell.

with --help: print_help command not found

The -h/--help flag is broken:

$ with -h
/usr/bin/with: line 46: print_help: command not found
error: "-h" is not a valid executable

Looking at the source, I believe that line 46 should be calling print_usage and/or print_options, not print_help (which doesn't exist).

Installation with zsh

Hello,
This tool seems awesome but I can't install it on zsh. Can you help me with that?

Configure for windows bash

Bash has different absolute paths for things like tmp and completion. Fixing this would entail finding out if we are in linux bash or windows bash...now sure how this is possible for now.

Shellcheck

Please use https://github.com/koalaman/shellcheck on this script. It points some nasty things like:

In with line 35:
          ${prefix[@]} ;;
          ^-- SC2068: Double quote array expansions to avoid re-splitting elements.
          ^-- SC2039: In POSIX sh, array references are undefined.

It's just the single warning, full list have more than 10 of them.

doesn't quit with ^D, ^C cancels process instead of current line

Currently ^D will send the current line if it's not-empty, but when used on an empty line it prints the prompt right after the current.

^C seems to always quit the with prompt rather than starting a new prompt line.

I'm not sure if this is desired/intended behavior, but in my experience most/all interactive shells seem to respond this way.

Program not installed

On my Debian 8.6, with would not work on any program, giving the error: Program is not installed message. This happened on both bash and fish shells.

It seems that you missed a "$@" in the last line, and parameters are not passed to your script.

I changed the last line from main to main "$@" and things started working again. I am not sure if there are side-effects, as a result I posted this as an issue so more people could help.

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.