WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Appbrowser shell (ab)  (Read 3091 times)

Offline kanan

  • Newbie
  • *
  • Posts: 8
Appbrowser shell (ab)
« on: December 28, 2010, 12:12:54 PM »
Hello all,

I'm just getting started with this awesome little distro.  I was using the ab command from the shell. I'm running microcore.  And I'm not sure it's a bug, but it feels like it may be.

When I go to install something, so I've already searched for the name, selected the number and it shows an info page.  The only key that I can get to work is 'q'.  And there's no instructions saying that I should press 'q', I just banged around on the keyboard until something worked.  So I press 'q', then the menu displays, instructing me to press 'i' to install...and the program installs.

After I've installed one program, if I search for another, without leaving ab, I don't get shown the info page for the next program.  I just get the menu...(the same menu I see after pressing 'q' with the first program)


I'm a LAMP programmer by trade but have worked with cpp before and would be happy to make the fix...If I'm on the right track here that is.  I don't want to step on anyone's toes, or misdiagnose this as a bug when it's a "feature".


Thanks all, I'm really impressed with this distro and plan on using it on my next project.  Great work guys!

-Kanan
« Last Edit: December 28, 2010, 12:43:20 PM by kanan »
Always move forward, even if you have to go backwards to do it.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Appbrowser shell (ab)
« Reply #1 on: December 28, 2010, 01:47:45 PM »
Having to press 'q' is a feature (of less, to be exact), the extension info not showing for the second one would be a bug.

Patches welcome, anyways.

ab is a shell script, btw ;)
The only barriers that can stop you are the ones you create yourself.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Appbrowser shell (ab)
« Reply #2 on: December 28, 2010, 02:08:24 PM »
The subsequent .info not displaying was caused by the recent change to select in v3.4. The following will make ab once again work as expected.
Code: [Select]
--- /usr/bin/ab
+++ /mnt/sda1/core/micro/source/usr/bin/ab
@@ -56,8 +56,8 @@
   D|d) displayDepends ;;
   F|f) displayFiles ;;
   L|l) selectItem ;;
-  S|s) ITEM="" && searchRepository "$ITEM" && selectItem; displayInfo ;;
-  P|p) ITEM="" && whatProvides "$ITEM" && selectItem; displayInfo ;;
+  S|s) ITEM="" && searchRepository "$ITEM" && selectItem && displayInfo ;;
+  P|p) ITEM="" && whatProvides "$ITEM" && selectItem && displayInfo ;;
   Q|q) break ;;
   *) displayInfo ;;
 esac 

10+ Years Contributing to Linux Open Source Projects.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Appbrowser shell (ab)
« Reply #3 on: December 28, 2010, 02:15:06 PM »
Having to press 'q' is a feature (of less, to be exact)

more or less...   :P

[Sorry, couldn't help it]
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline kanan

  • Newbie
  • *
  • Posts: 8
Re: Appbrowser shell (ab)
« Reply #4 on: December 28, 2010, 03:14:46 PM »
So do we want to put an instruction on there about the pressing 'q' thing?

I did look for the cpp source of appbrowser, found it for tinycore, but it looked to be mostly UI.
Always move forward, even if you have to go backwards to do it.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Appbrowser shell (ab)
« Reply #5 on: December 28, 2010, 03:40:15 PM »
You might want to have a look at appbrowser-cli.tcz, if perhaps it serves you better.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline kanan

  • Newbie
  • *
  • Posts: 8
Re: Appbrowser shell (ab)
« Reply #6 on: December 28, 2010, 04:25:58 PM »
Always move forward, even if you have to go backwards to do it.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Appbrowser shell (ab)
« Reply #7 on: December 28, 2010, 05:35:55 PM »
Umm, use ab (at least once more) to load it?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline kanan

  • Newbie
  • *
  • Posts: 8
Re: Appbrowser shell (ab)
« Reply #8 on: December 28, 2010, 06:50:36 PM »
lol, right. I thought for some reason by what you said that appbrowser was written as an extension, and appbrowser-cli.tcz was the source name.

Appbrowser really works fine for me now that I know the trick.  I just wanted to help out and make the fix.
Always move forward, even if you have to go backwards to do it.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Appbrowser shell (ab)
« Reply #9 on: December 28, 2010, 07:05:46 PM »
.tcz are always binary extensions (squash filesystems)   ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)