You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the jsh code base is growing, we should think more about structuring. Currently the code is far from cohesive. This of course limits readability and makes adding new features harder.
Ideally, the code should be divided into small cohesive 'modules', communicating via C header interfaces. Just like the alias.c & alias.h files now. I therefore drafted out a first idea on paper:
Sorry for the crappy quality ;-) Also, don't worry about the arrows to much. Most of them are just #includes for jsh-common.h, containing some helper functions. I marked the important relationships in green. Since all functionality in a shell is related, I think the coupling will never be very satisfying, but at least this way it's more controlled.
As you can see, functionality is divided in different header files. This will make adding new features (e.g. new autocompleters, new built_ins, grammar enhancement, prompt customizing, ...) more local and thus also easier. Separating the command line interface in particular, will allow implementing a alternative simpler 'fall-back' modus for readline. Being more independent from readline can be nice, I think ;-) Especially if we want to port to Android, see issue #23 .
Drop your thoughts! However, since jsh is not a master-thesis, I started a zero-code policy till Thursday so I won't be starting on this yet... ;-)
The text was updated successfully, but these errors were encountered:
Since the
jsh
code base is growing, we should think more about structuring. Currently the code is far from cohesive. This of course limits readability and makes adding new features harder.Ideally, the code should be divided into small cohesive 'modules', communicating via C header interfaces. Just like the
alias.c & alias.h
files now. I therefore drafted out a first idea on paper:Sorry for the crappy quality ;-) Also, don't worry about the arrows to much. Most of them are just
#includes
forjsh-common.h
, containing some helper functions. I marked the important relationships in green. Since all functionality in a shell is related, I think the coupling will never be very satisfying, but at least this way it's more controlled.As you can see, functionality is divided in different header files. This will make adding new features (e.g. new autocompleters, new built_ins, grammar enhancement, prompt customizing, ...) more local and thus also easier. Separating the command line interface in particular, will allow implementing a alternative simpler 'fall-back' modus for
readline
. Being more independent fromreadline
can be nice, I think ;-) Especially if we want to port to Android, see issue #23 .Drop your thoughts! However, since
jsh
is not a master-thesis, I started a zero-code policy till Thursday so I won't be starting on this yet... ;-)The text was updated successfully, but these errors were encountered: