Open GijsTimmers opened 9 years ago
Yep this could be useful indeed. I have been thinking about this for a while.
I think the best option is to first support the bash/zsh
style alias syntax
alias key='value with spaces'
instead of the - easier to parse - jsh
style:
alias key "value with spaces"
Once that's done, users could have one single .shell_aliases
file that is source
d from .bashrc
as well as .zshrc
as well as .jshrc
. Such a scheme would be more flexible than 'just' importing aliases on jsh installation, as having all aliases in a central place allows editing them in a central place too.
Of course, once the syntax thing is implemented, with some sh
script hacking, implementing your proposal shouldn't be to hard too.
The installer should check for files like:
.bashrc
.zshrc
.bash_aliases
.zsh_aliases
If those files contain aliases, the installer should ask to put them in
.jshrc
. For example:(if the user presses YES here, go to the
.jshrc
editing dialog, which pops up somewhere in the installer anyway)(The installer now shows the stuff that's inside
.jshrc
)