Anonymous avatar Anonymous committed dbbef3d

add: install alias, update readme, bump to 1.01

Comments (0)

Files changed (2)

 from optparse import OptionParser
 
 # initialization
-__version__ = '0.97'
+__version__ = '1.01'
 use_sudo = ('apt-get', 'apt-get remove', 'aptitude', 'apt-key', 'dpkg -i',
-            'add-apt-repository ')
+            'add-apt-repository ', 'apt-get install')
 
 # map commands to their appropriate binaries:
 cmd_map = {
     'download': 'apt-get',
     'dselect-upgrade': 'apt-get',
     'install': 'apt-get',
+    'in': 'apt-get install',        # alias
     'markauto': 'apt-get',
     'purge': 'apt-get',
     'remove': 'apt-get',
 
 ::
 
-    apt                       # for a list of available commands
-    apt addrepo ppa:who/foo
+    apt                         # list available commands
+    apt addrepo ppa:who/foo     # invokes sudo...
+    Password:
+
+    apt update
     apt search foo
     apt policy foo
     apt install foo bar
-    Password:
 
-    apt rm foo                # an alias to remove
+    apt remove foo
     apt instdeb foo.deb
 
-etc.
-``apt`` can also handle shortened commands.  Add letters to the command until it
-is uniquely identified::
+
+Shortened commands
+~~~~~~~~~~~~~~~~~~~~
+
+``apt`` can also handle shortened commands.
+Add letters until it can be uniquely identified::
 
     apt cl
 
 
     sudo apt-get clean
 
+Aliases
+~~~~~~~~~
+
+There are a few aliases for common commands as well::
+
+    apt in foo                  # install
+    apt rm bar                  # remove
+    apt se baz                  # search
+
+|
+
 Problem?
 ``-d`` can help by outputting debugging information such as the full
 command-line::
 
-    apt searchfiles /bin/less -d
+    $ apt searchfiles /bin/less -d
+    Running: dpkg-query -S /bin/less
+    less: /bin/less
 
 |
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.