-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
history command idea #60
Comments
Resources
|
Proposed InterfaceWe can use alias with a new problems that might arise:
Perhaps we might also want to add functionality for editing the alias using the user's default editor? This might be useful, especially since I can imagine some of these aliases becoming really long. In this case, would it be better to store these aliases as bash scripts so that they can be easily edited without having to re-parse the alias as a single line? Might this also allow for advanced functionality whereupon the user can specify their own custom arguments and options? @GiselleSerate what are your thoughts on all of this? |
@aryam7 are you working on myaliases on your lunch break? xD EDIT: I realized it's Saturday, never mind me |
I think we can use altalias in I think writing these as bash scripts would be most optimal, because then our aliases could just call the applicable script. Then we'd have to figure out where the scripts are stored globally . . . likely we would want to put something in a folder elsewhere (like bin or something) that wouldn't get moved or installed in a different place relative to root. Also then we don't have to worry about multiple lines. I don't know what you're suggesting about editing the alias using the default editor (honestly giving them the filepath might be the best thing, unless you want to have a certain command that will be aliased to look in the folder and open it using their default editor). |
Cool, I agree with all of the bullet points. But I think recursive aliasing probably falls under the category of undefined behavior, along with referencing variables/functions/files that aren't loaded into the global environment on startup and all of the other crap that the user could throw at us. The original Yeah, I think using bash scripts would be pretty neat. That route would also really maximize the flexibility of this command (ie the user could pass arguments to their scripts and do all of the complicated stuff that a script has the power to do). I also like the idea of creating aliases that call the scripts; we could use this to add the scripts to the global environment and it wouldn't require us messing with Yes, I was thinking we could store these bash scripts in a folder inside Let me know what you think! |
Cool, I'm always down for leaving it as undefined behavior. I guess it could fail pretty badly if people really wanted to give us bad input. We probably want to delete the script itself when we unalias, because I don't want to be littering the system with garbage files. I think editing should happen in post. I think it's reasonable to have a Do we have a path to the Also, I've been looking into stuff and probably it's better to use |
I found a utility that turns shell script into C code, but I'm not sure that's really what we want. |
Ok. sounds good! |
Yeah, we can probably error out, that shouldn't be too much of a problem. I think we should probably do it explicitly, because if we leave it as undefined behavior then what we'll get is a usage error. |
About
|
We've had a new idea for a command that aliases a bunch of your prior commands together into a single command. It will probably use bash history. It will be written in c because c is so much easier.
The text was updated successfully, but these errors were encountered: