Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: frimical on March 14, 2011, 12:43:20 PM

Title: [ ab ] suggested additions of some useful existing features.
Post by: frimical on March 14, 2011, 12:43:20 PM
ab is very helpful fast ans concise, I suggest adding these existing features, like displaying:

- tree,
- size
- info if needed again; ( that helped making the 'default' menu option to redisplay the menu choices instead of displaying the info again and again ).
- some screen 'clear'-ing for readability
 
here is a suggested diff:

--- old ab
+++ new ab
@@ -6,0 +7 @@
+  clear
@@ -13,0 +15 @@
+  clear
@@ -36,0 +39,9 @@
+displayTree(){
+  tce-fetch.sh "$EXTN".tree
+  less "$EXTN".tree
+  rm "$EXTN".tree
+}
+displaySize(){
+  clear
+  tce-size "$EXTN"
+}
@@ -51,2 +62,2 @@
-[ -n "$EXTN" ] && echo -n "I)nstall O)nDemand D)epends F)iles L)ist "
-echo -n "S)earch, P)rovides, or Q)uit: "; read -s -n1 ANS; echo
+[ -n "$EXTN" ] && echo && echo -n "A)bout I)nstall O)nDemand D)epends T)ree F)iles siZ)e L)ist "
+echo -n "S)earch P)rovides or Q)uit: "; read -s -n1 ANS; echo
@@ -53,0 +65 @@
+  A|a) displayInfo ;;
@@ -56,0 +69,2 @@
+  T|t) displayTree ;;
+  Z|z) displaySize ;;
@@ -62 +76 @@
-  *) displayInfo ;;
+  *) ;; #displayInfo ;;


hope this can be useful
Title: Re: [ ab ] suggested additions of some useful existing features.
Post by: curaga on March 14, 2011, 01:06:17 PM
As a file please, pasting it off the forum wouldn't really work.
Title: Re: [ ab ] suggested additions of some useful existing features.
Post by: frimical on March 14, 2011, 03:01:05 PM
ok, here is the whole ab file I'm using. ( sorry but I don't have the original file anymore to make a diff)

Title: Re: [ ab ] suggested additions of some useful existing features.
Post by: roberts on March 14, 2011, 03:08:19 PM
I was able to patch from your posted diff. Thanks for your kind comments about ab and your suggested additions have now incorporated.
Title: Re: [ ab ] suggested additions of some useful existing features.
Post by: frimical on March 14, 2011, 05:10:03 PM
@roberts
Thanks for your kind comments about ab and your suggested additions have now incorporated.

great it was taken into consideration and incorporated.
Nothing is more kind than making TC available to all of us.



Title: Re: [ ab ] suggested additions of some useful existing features.
Post by: frimical on March 14, 2011, 05:20:40 PM
oops!!

While reading the first post (the diff one) I noticed that I missed to add one thing:

--- old-new ab
+++ latest ab
@@ -62 +62 @@
-[ -n "$EXTN" ] && echo  && echo -n "A)bout I)nstall O)nDemand D)epends T)ree F)iles siZ)e L)ist "
+[ -n "$EXTN" ] && echo "#*****[ $EXTN ]*****#" && echo -n "A)bout I)nstall O)nDemand D)epends T)ree F)iles siZ)e L)ist "

to show the selected extension's name,  above the choices menu. ( I noticed that this small detail can be helpful especially after jumping from one selection to the other, then to the next-to the previous-then to the next... and I ended forgetting why am I here for... and which the one I will end up installing...)
Title: Re: [ ab ] suggested additions of some useful existing features.
Post by: curaga on March 15, 2011, 06:57:35 AM
As a file please, pasting it off the forum wouldn't really work.

;)
Title: Re: [ ab ] suggested additions of some useful existing features.
Post by: roberts on March 15, 2011, 07:22:45 PM
oops!!

While reading the first post (the diff one) I noticed that I missed to add one thing:

--- old-new ab
+++ latest ab
@@ -62 +62 @@
-[ -n "$EXTN" ] && echo  && echo -n "A)bout I)nstall O)nDemand D)epends T)ree F)iles siZ)e L)ist "
+[ -n "$EXTN" ] && echo "#*****[ $EXTN ]*****#" && echo -n "A)bout I)nstall O)nDemand D)epends T)ree F)iles siZ)e L)ist "

to show the selected extension's name,  above the choices menu. ( I noticed that this small detail can be helpful especially after jumping from one selection to the other, then to the next-to the previous-then to the next... and I ended forgetting why am I here for... and which the one I will end up installing...)


Now you know why I was redisplaying the info file.
Idea to display extension name only accepted.
Implemented slightly different.

Look for it starting with v3.6.