Comments (6)
I think the percent sign appearing unexpectedly is more than likely caused by a mismatch between user expectation and the default behaviour of pass-rs
. Most programs are expected to give output with a newline by default, but pass-rs
requires this to be explicitly stated (see: -n
argument), which ZSH doesn't like (links to StackOverflow post with comments detailing the purpose of ZSH's highlighted percent sign, which simply appears when a program does not produce a newline).
From a developer standpoint, the best course of action would be to invert the current newline handling behaviour (see: echo
output in ZSH below and note the opposite behaviour is true for pass-rs
), and the -n
argument along with it.
# using full path to echo b/c zsh has its own version of echo that may be inconsistent w/the GNU impl:
# "which echo" => "echo: shell built-in command"
$ /usr/bin/echo password
password
$ /usr/bin/echo -n password
password%
$ pass-rs
6V4ioiG1BhBmfE5k5N3Jvjy5kDvv3EBZxF34CS%
$ pass-rs -n
z7Zb4mEgaDb571JSVBQKtCxq0P7tWEng4S8NzT
PS: I apologize for the necro, but I assumed it was fine given the fact that this issue is still open over a year later.
PPS: Jarusk, thanks for the cool CLI tool!
from pass-rs.
I think the percent sign appearing unexpectedly is more than likely caused by a mismatch between user expectation and the default behaviour of
pass-rs
. Most programs are expected to give output with a newline by default, butpass-rs
requires this to be explicitly stated (see:-n
argument), which ZSH doesn't like (links to StackOverflow post with comments detailing the purpose of ZSH's highlighted percent sign, which simply appears when a program does not produce a newline).From a developer standpoint, the best course of action would be to invert the current newline handling behaviour (see:
echo
output in ZSH below and note the opposite behaviour is true forpass-rs
), and the-n
argument along with it.# using full path to echo b/c zsh has its own version of echo that may be inconsistent w/the GNU impl: # "which echo" => "echo: shell built-in command" $ /usr/bin/echo password password $ /usr/bin/echo -n password password% $ pass-rs 6V4ioiG1BhBmfE5k5N3Jvjy5kDvv3EBZxF34CS% $ pass-rs -n z7Zb4mEgaDb571JSVBQKtCxq0P7tWEng4S8NzTPS: I apologize for the necro, but I assumed it was fine given the fact that this issue is still open over a year later. PPS: Jarusk, thanks for the cool CLI tool!
Thanks for the info @jett06 , definitely makes sense! I'll look into making that tweak and cutting a release. Newline by default used to be the only option, then that flag was added.
from pass-rs.
Works as expected with the new commit :)
$ pass-rs
eP98seS1iX68p7a260GYsZo7iWsk35mxX3kCaw
$ pass-rs -n
u0maIujnRIP5usSXK8V051frPPxlofO4HGO78V%
Thanks!
from pass-rs.
Works as expected with the new commit :)
$ pass-rs eP98seS1iX68p7a260GYsZo7iWsk35mxX3kCaw $ pass-rs -n u0maIujnRIP5usSXK8V051frPPxlofO4HGO78V%Thanks!
Glad to hear! Thanks for the help!
from pass-rs.
I don't have a Mac to test anymore, but can take a look!
from pass-rs.
Hey @YOKAICODE , I just released version v0.3.3. I don't have a Mac to test, so would you be able to confirm that the issue still impacts you?
I've added a test matrix and if this is still an issue I'll add better coverage and try to replicate the issue in tests. Thanks!
from pass-rs.
Related Issues (5)
- Add a CI Pipeline HOT 1
- Onboard onto Renovate HOT 1
- Publish Docker image on release HOT 1
- Add tests HOT 1
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 pass-rs.