LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - News (https://www.linuxquestions.org/questions/linux-news-59/)
-   -   CLI Companion - a tool to learn linux commands. (https://www.linuxquestions.org/questions/linux-news-59/cli-companion-a-tool-to-learn-linux-commands-4175594453/)

bdfhjk 11-29-2016 05:01 PM

CLI Companion - a tool to learn linux commands.
 
My team is going to release CLI Companion to the public debian repository. It have been
downloaded by more than 5000 people so far.

We have recently released a new version - 1.3. If you have a moment, please install, test and let us know your feedback. :)

Quote:

CLI Companion is a Terminal that lets you store commands and create a 'command dictionary.'

CLI Companion is a tool to store and run Terminal commands from a GUI. People unfamiliar with the Terminal will find CLI Companion a useful way to become acquainted with the Terminal and unlock its potential. Experienced users can use CLI Companion to store their extensive list of commands in a searchable list.

Learn more: https://launchpad.net/clicompanion
Downloads page: https://launchpad.net/clicompanion/+download

notKlaatu 11-29-2016 05:16 PM

Nice! I know a few people (heck, maybe even myself) who will appreciate this!

bdfhjk 11-29-2016 05:23 PM

Please give it a try and share with your friends! Thank you :)

rokytnji 11-29-2016 08:27 PM

Quote:

Originally Posted by bdfhjk (Post 5635965)
Please give it a try and share with your friends! Thank you :)

Just to let you know. I added the below command <as a test>

Code:

ls -l /dev/disk/by-uuid/
and it proceeded to complain/warn? me that that was not installed and proceed to precede the
command with

Code:

sudo apt-get install ls -l /dev/disk/by-uuid/
Example: Big warning box with a red warning

Quote:

The command you are adding is not installed in the system: inxi -Fxxz

To install it, use the following command:

apt-get install inxi -Fxxz
By the way. inxi is installed on my system. But clicommander does seem to recognise anything in /usr/local/bin. Or /usr/sbin either. I guess /usr/bin is all it searches through. Just a guess from a uneducated Linux using scooter tramp.

Code:

$ locate inxi
/usr/local/bin/inxi
/usr/local/bin/inxi-gui
/usr/sbin/inxi


Which might throw off inexperienced users using your new application.

I have a few commands that do not require apt-get install anything, anyhow,anyway.

Just letting you know. I am still learning this new toy as I only installed it tonight.

Code:

$ locate clicompanion
/etc/clicompanion.d
/etc/clicompanion.d/clicompanion2.config
/etc/clicompanion.d/clicompanion2.config.debian
/etc/clicompanion.d/clicompanion2.config.ubuntu
/usr/bin/clicompanion
/usr/lib/python2.7/dist-packages/clicompanion-1.1.egg-info
/usr/lib/python2.7/dist-packages/clicompanionlib
/usr/lib/python2.7/dist-packages/clicompanionlib/__init__.py
/usr/lib/python2.7/dist-packages/clicompanionlib/__init__.pyc
/usr/lib/python2.7/dist-packages/clicompanionlib/config.py
/usr/lib/python2.7/dist-packages/clicompanionlib/config.pyc
/usr/lib/python2.7/dist-packages/clicompanionlib/helpers.py
/usr/lib/python2.7/dist-packages/clicompanionlib/helpers.pyc
/usr/lib/python2.7/dist-packages/clicompanionlib/menus_buttons.py
/usr/lib/python2.7/dist-packages/clicompanionlib/menus_buttons.pyc
/usr/lib/python2.7/dist-packages/clicompanionlib/plugins.py
/usr/lib/python2.7/dist-packages/clicompanionlib/plugins.pyc
/usr/lib/python2.7/dist-packages/clicompanionlib/preferences.py
/usr/lib/python2.7/dist-packages/clicompanionlib/preferences.pyc
/usr/lib/python2.7/dist-packages/clicompanionlib/tabs.py
/usr/lib/python2.7/dist-packages/clicompanionlib/tabs.pyc
/usr/lib/python2.7/dist-packages/clicompanionlib/utils.py
/usr/lib/python2.7/dist-packages/clicompanionlib/utils.pyc
/usr/lib/python2.7/dist-packages/clicompanionlib/view.py
/usr/lib/python2.7/dist-packages/clicompanionlib/view.pyc
/usr/share/clicompanion
/usr/share/applications/clicompanion.desktop
/usr/share/clicompanion/locale
/usr/share/clicompanion/locale/clicompanion.mo
/usr/share/doc/clicompanion
/usr/share/doc/clicompanion/NEWS.Debian.gz
/usr/share/doc/clicompanion/changelog.Debian.gz
/usr/share/doc/clicompanion/copyright
/usr/share/man/man1/clicompanion.1.gz
/usr/share/pixmaps/clicompanion.16.png
/var/lib/dpkg/info/clicompanion.conffiles
/var/lib/dpkg/info/clicompanion.list
/var/lib/dpkg/info/clicompanion.md5sums
/var/lib/dpkg/info/clicompanion.postinst
/var/lib/dpkg/info/clicompanion.prerm

I also noticed it pulls in a python package I did not have installed as a dependency.

My system specs.

Code:

$ inxi -b
System:    Host: biker Kernel: 4.8.10-antix.1-686-smp-pae i686 (32 bit) Desktop: IceWM 1.3.8
          Distro: antiX-15-V_386-full Killah P 30 June 2015
Machine:  System: LENOVO (portable) product: 2347DS2 v: ThinkPad T430
          Mobo: LENOVO model: 2347DS2 UEFI [Legacy]: LENOVO v: G1ET41WW (1.16 ) date: 05/25/2012
Battery    BAT0: charge: 34.2 Wh 99.9% condition: 34.2/56.2 Wh (61%)
CPU:      Dual core Intel Core i5-3320M (-HT-MCP-) speed/max: 1200/3300 MHz
Graphics:  Card: Intel 3rd Gen Core processor Graphics Controller
          Display Server: X.Org 1.16.4 drivers: intel (unloaded: fbdev,vesa) Resolution: 1600x900@60.01hz
          GLX Renderer: Mesa DRI Intel Ivybridge Mobile x86/MMX/SSE2 GLX Version: 3.0 Mesa 10.3.2
Network:  Card-1: Intel 82579LM Gigabit Network Connection driver: e1000e
          Card-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi
Drives:    HDD Total Size: 320.1GB (20.8% used)
Info:      Processes: 185 Uptime: 1:06 Memory: 347.4/15936.9MB Client: Shell (bash) inxi: 2.3.1
Repos:    Active apt sources in file: /etc/apt/sources.list.d/antix.list
          deb http://antix.daveserver.info/jessie/ jessie main nosystemd
          Active apt sources in file: /etc/apt/sources.list.d/debian.list
          deb http://ftp.ca.debian.org/debian/ jessie main contrib non-free
          deb http://security.debian.org/ jessie/updates main contrib non-free


Myk267 11-30-2016 04:12 AM

The problem is that the program is checking the return code of the 'type' program, and it thinks that '-l' and '/dev/disk/by-uuid' are arguments. You can try it at the shell:
Code:

type ls -l /dev/disk/by-uuid/
So line 170 in plugins/LocalCommandList.py might do better only picking the first item in the string:
Code:

            output = subprocess.check_output('type '+cmd[0].split()[0], shell=True)
... Maybe. I need my beauty sleep now.

bdfhjk 11-30-2016 04:31 AM

Hi, thanks for the feedback. The plan was that the command should be just a pure command, and you put the arguments in a separate box.

I've two solutions in mind.

1. Modify the 170-th line according to Myk267 (Good suggestion, thanks!)

2. Add a warning when an user try to enter the command with arguments that the arguments are going to be automatically separated to the second box. (or we can do it quietly). Then the type command will always work on a single word argument. Additionally I will add an assertion to the type command invocation. :)

I think the #2 will be better. What is your opinion?


@rokytnji

Quote:

I also noticed it pulls in a python package I did not have installed as a dependency.
Could you tell me more what happen? It have installed a package by itself?

Thank you so much for the quick feedback :)

Myk267 11-30-2016 07:09 PM

Probably don't do what I did. I'm not quite clear on #2, but I think that as long as those commands that rokytnji attempted to add are possible then you will be on the right track.

rokytnji 11-30-2016 07:55 PM

Quote:

Could you tell me more what happen? It have installed a package by itself?
My best guess right now was I needed python-vte to complete the install. Using Gdebi. But to be honest about. It was late and I was tired. So I kinda glazed eyed the install process without paying attention really. It said only one dependency needed. So I did not worry/sweat about it.

Code:

Start-Date: 2016-11-29  17:51:47
Install: python-vte:i386 (0.28.2-5, automatic)
End-Date: 2016-11-29  17:51:51

Because my post is at 8:27 PM and my /var/log/apt/history.log shows python-vte being installed at 5:51 PM. Which sounds about right since I took my time exploring clicompanion before posting about what I learned at 8 PM.

Code:

$ apt-rdepends clicompanion
Reading package lists... Done
Building dependency tree     
Reading state information... Done
clicompanion
  Depends: gtk2-engines-pixbuf
  Depends: python (<< 2.8)
  Depends: python-gtk2
  Depends: python-vte
  Depends: sudo
<snip>

Edit: Yes. It was python-vte needed also for my Linux-Lite/Ubuntu 14.04LTS install.

http://en.zimagez.com/zimage/screens...6-120120pm.php

bdfhjk 12-02-2016 05:59 AM

Thank you for the feedback.

python-vte is a package necessary for displaying the terminal in the clicompanion, so it make sense it have to be installed.

I've reported the bug 1646808 about the warning message appearing when not necessary.

Any other feedback or feature requests? The project is quite stable, have over 6 years, but we are still looking for new ideas. :)


All times are GMT -5. The time now is 06:36 PM.