mchav / with Goto Github PK
View Code? Open in Web Editor NEWCommand prefixing for continuous workflow using a single tool.
License: Other
Command prefixing for continuous workflow using a single tool.
License: Other
Hello,
This tool seems awesome but I can't install it on zsh. Can you help me with that?
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.
For example:
git> +add
git add> -
git>
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.
with with ls
i don't see the coloured folders. it'd be nice to somehow retain the colouring.
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.
Example:
▶ with grep
grep> +foo *
grep foo LICENSE.txt README.md with>
@joaquin-v has a PR for this. I think this warrants some discussion though.
Readme says states that ':q' or ':exit:' will exit
Entering git> :exit:
command gives error but git> :exit
works?
Bash works fine, using sh does not.
/usr/bin/with: 12: /usr/bin/with: Syntax error: "(" unexpected (expecting "fi")
As mentioned in #15
Run shell check with environment set to sh for specifics on what needs to go.
Running with gives
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
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).
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.
Using appveyor and/or travis.
I downloaded the script, run it on my Ubuntu 16.04 laptop and get
$ with ls
/home/ulysses/bin/with: 12: /home/ulysses/bin/with: Syntax error: "(" unexpected (expecting "fi")
> : echo 1 | cat
1 | cat
> : echo 1 && echo 2
1 && echo 2
Expected output:
> : echo 1 | cat
1
> : echo 1 && echo 2
1
2
When use with programs with slashes in their parameters. Something like with curl 'https://google.com'
Been trying to do this for a while to no avail.
http://stackoverflow.com/questions/4726695/bash-and-readline-tab-completion-in-a-user-input-loop
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.
Pretty straight forward.
javac> Utility.java
Should go into main history as:
javac Utility.java
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.