Comments (5)
FWIW, checking if the EDITOR is a binary would be somewhat more involved, because we'd have to resolve it with PATH and then check if it's an executable (if it resolves at all). I don't remember if there's an easy way to resolve it and get the path back, but I think it's fine to not do that for now.
from agenix-cli.
I'm not sure the best way to solve this.
I could just split the EDITOR
on whitespace and set everything after the first "group" as an argument, but what about the (extremely niche, probably never happens, and even less likely they use this project) case where somebody's editor binary is actually some cool editor
(spaces and all)?
What I've seen suggested in other communities is making a wrapper script for this case -- e.g. pkgs.writeShellScriptBin "emt" ''${pkgs.emacs}/bin/emacsclient -t "$@"''
.
To be honest, I don't have any qualms about breaking the "editor with space in filename" situation if you don't want to make a wrapper script, but it's easily avoided by just not having a space in your EDITOR
in the first place ;)
from agenix-cli.
Probably I should make a wrapper script to work around issues like this, but I think it is a common enough recommendation that probably it should split on the string, or use some higher-level process execution API that takes a string.
https://www.emacswiki.org/emacs/EmacsClient for example recommends what I'm doing.
from agenix-cli.
I guess you could also try to see if EDITOR is a binary and if that fails, split it.
from agenix-cli.
Fixed in 90dc2ea.
from agenix-cli.
Related Issues (9)
- nix run can't find "rust_agenix" HOT 1
- --rekey should accept list of files or only change files that need to be updated HOT 2
- Passphrase encrypted rsa or ed25519 default keys complicates the usability HOT 2
- Rust overlay seems busted with how we use it
- Traverse from specified secret file instead of from cwd
- Build fails under latest unstable-small branch HOT 3
- Support rekeying all paths
- Paths may be duplicated HOT 3
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 agenix-cli.