Code Monkey home page Code Monkey logo

Comments (4)

GiselleSerate avatar GiselleSerate commented on September 26, 2024

Possible forms:

alias pies='commands and stuff'
addalias limes="more commands"
alias 'dadhats'="do stuff"
addalias "snapbacks"='wow this is exciting'

Structure

call: lower/upper alphabetic
space: at least one
nickname: bookended by matching ' or ", lower/upper alphanumeric and underscore
=: match identically
commands: bookended by matching ' or ", some combination of any characters (.*)

Edge cases to be concerned about:

  • What if quotes are in the commands?

Figure out:

How do you use k regex anyhow?

from myaliases.

GiselleSerate avatar GiselleSerate commented on September 26, 2024

Now that we are using the altalias strategy as referenced in #46, things have changed.

  • What happens if alias can't handle what it's given? It should echo out an error message. That's okay.
  • What happens if an alias is not able to be defined and we barrel ahead and expect alias to give us an output we can write to .usr_aliases? What will alias return and what gets written to file?

from myaliases.

GiselleSerate avatar GiselleSerate commented on September 26, 2024

I put garbage in and it says:

1
-bash: alias: erwiojgklelkmw: not found
Creating new permanent alias: alias aha='new command'

Then it dumps the current aliases into the terminal, which isn't, like, awful.
(I need to get rid of that number, btw, wherever that's coming from, and I don't know what permanent alias it's trying to make with aha='new command'.)

from myaliases.

GiselleSerate avatar GiselleSerate commented on September 26, 2024

Fixed as of commit 9cd23c9.

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.