Giter VIP home page Giter VIP logo

Comments (5)

cole-h avatar cole-h commented on May 25, 2024 1

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.

cole-h avatar cole-h commented on May 25, 2024

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.

ryantm avatar ryantm commented on May 25, 2024

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.

ryantm avatar ryantm commented on May 25, 2024

I guess you could also try to see if EDITOR is a binary and if that fails, split it.

from agenix-cli.

cole-h avatar cole-h commented on May 25, 2024

Fixed in 90dc2ea.

from agenix-cli.

Related Issues (9)

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.