Git Product home page Git Product logo

Comments (7)

b3nj5m1n avatar b3nj5m1n commented on August 18, 2024 1
➜ apply_shell_expansion "\$XDG_CONFIG_HOME"
 /home/b3nj4m1n/.config

from xdg-ninja.

apprehensions avatar apprehensions commented on August 18, 2024

i can't really optimize xdg-ninja without a clear understanding of apply_shell_expansion() and decode_string(), i thought doing something like this wouldn't be so hard. but so far i've reached 80 SLOC

from xdg-ninja.

b3nj5m1n avatar b3nj5m1n commented on August 18, 2024

Sorry, but I won't remove the markdown.

What exactly are you trying to optimise?

from xdg-ninja.

apprehensions avatar apprehensions commented on August 18, 2024

Sorry, but I won't remove the markdown.

Okay. i guess i will try to add it in my optimized version.

What exactly are you trying to optimise?

Everything. There is many duplicate lines and ton's of complicated scripting that could have been so simple, i can show you how it looks so far but it doesn't work as i completely removed the markdown rendering as that could make the script much more simpler and easier to manage.

it also does not work due to my previous comment, generally, it is also unsafe to use eval, so please tell me how it works.

from xdg-ninja.

b3nj5m1n avatar b3nj5m1n commented on August 18, 2024

apply_shell_expansion expands environment variables in strings,decode_string does what the comment says: Replace \n with literal newline and " with ", normalize number of trailing newlines to 2.

from xdg-ninja.

apprehensions avatar apprehensions commented on August 18, 2024

expands environment variables in strings

Example?

from xdg-ninja.

apprehensions avatar apprehensions commented on August 18, 2024

Hmm. Okay. i will soon open a PR and explain each change i did.

from xdg-ninja.

Related Issues (20)

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.