Code Monkey home page Code Monkey logo

Comments (3)

GiselleSerate avatar GiselleSerate commented on June 17, 2024
  • @, #, ^, *, -, _, +, ,, ., ?, {, }, [, ] get saved. Permissible characters. Don't remove these.
  • ', " don't get saved, but calling the alias with quotes in it preserves behavior as long as there are matching quotes within the alias. Can be handled if left in, or not.
  • \ doesn't get saved, but if you call alias with \ the line it returns can be handled properly. Can be handled if left in, or not.
  • !, &, (, ), =, /, :, ;, <, >, | break the normal alias command, so we can call those undefined behavior. Don't worry about these characters.
  • $ substitutes in the variable that bash thinks follows $. This is a problem.

Strategy: stop sanitizing, it's fine. The only problem is substituting in variable names.

EDIT: It's actually not a problem. If someone wants a $ in their alias, they need to quote it.

from myaliases.

aryarm avatar aryarm commented on June 17, 2024

And alias doesn't allow $ signs in nickname, I think.
"The characters /, $, `, = and any of the shell metacharacters or quoting characters listed above may not appear in an alias name." (according to the manual?)
So alias 'hi$bro'='desk' won't work.

from myaliases.

GiselleSerate avatar GiselleSerate commented on June 17, 2024

Yeah, I think the only thing that we might need to worry about are variable substitutions.

from myaliases.

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.