Comments (5)
readme mistake
You're right, this is a typo on my part.
python-like
Yes, admittedly this is not 100% the way python list slices work. Originally exclusivity was default but I found that over and over as I developed and used choose
that my mind would assume inclusivity and I wanted to provide defaults that would be commonly appreciated. I plan on adding the ability to specify exclusivity with an environment variable, which it seems you will appreciate given your alias.
empty results when using -x
Astute observation, you have indeed uncovered a bug.
I am going to open separate issues for each of these items.
from choose.
Cool, thanks for the quick response.
Regarding the difference from the Python behavior - I think it would be nice if this was explicitly mentioned in the README. Either the exact difference or just mentioning that it's "mostly like-python".
Regarding the env variable - I'm actually personally against an environment variable for exclusivity. It might cause confusion/surprising behavior since it is usually hidden from view - an explicit, visible flag is essential in this case (my alias is an exception to that idea because I only use it in my personal command line / scripts).
from choose.
I think that the environment variable would effectively achieve the same result as your alias. This would be something that should be set in one's shell rc, NOT in one's profile, so it would apply to a shell but not to your whole environment, so if it were used in a script it wouldn't apply.
That being said, I don't think this tool should be used in scripts (bar trivial ones, maybe), just as you wouldn't use rg
over grep
or bat
over cat
in a script.
from choose.
I think that the environment variable would effectively achieve the same result as your alias. This would be something that should be set in one's shell rc, NOT in one's profile, so it would apply to a shell but not to your whole environment, so if it were used in a script it wouldn't apply.
Fair enough.
That being said, I don't think this tool should be used in scripts (bar trivial ones, maybe), just as you wouldn't use
rg
overgrep
orbat
overcat
in a script.
For now yes, but when Rust takes over the world and replaces all basic unix tools with their Rust equivalents, you'll regret this decision! /s
from choose.
Perhaps someday my friend. And on that day we will probably determine if we are being invoked from a script or a terminal and ignore env vars accordingly!
from choose.
Related Issues (20)
- Cannot use newline as an output separator. HOT 2
- Whitespace not preserved between source and output HOT 2
- Debian package HOT 1
- musl binary for linux HOT 4
- Error message after existing `less` HOT 4
- Can't pipe to head HOT 3
- Crash from empty input and negative choice HOT 4
- Feature request, select by lines too HOT 1
- [Request] Support Escape Character HOT 2
- Unexpected result encountered for X:-Y case HOT 3
- May have Window Version? HOT 4
- How to replace awk split HOT 1
- feature request: align columns HOT 1
- feature request: match columns by name HOT 5
- `--field-separator` does not work correctly if no newline at EOF HOT 3
- Select field from a multiline HOT 1
- I added tab completions for fish shell HOT 3
- Packaging choose to debian HOT 3
- [feature req] choose print text between or after matches HOT 1
- Question: library with similar functionality
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from choose.