Use 'pkg' as shorter form of 'packages'

Fixes https://github.com/termux/termux-app/issues/321.
This commit is contained in:
Fredrik Fornwall 2017-06-12 03:01:09 +02:00
parent ecff2cea84
commit 700ecf0fbc
6 changed files with 102 additions and 19 deletions

View File

@ -1,6 +1,6 @@
TERMUX_PKG_HOMEPAGE=https://termux.com
TERMUX_PKG_DESCRIPTION="Suggest installation of packages in interactive shell sessions"
TERMUX_PKG_VERSION=1.22
TERMUX_PKG_VERSION=1.23
termux_step_make_install () {
TERMUX_LIBEXEC_DIR=$TERMUX_PREFIX/libexec/termux

View File

@ -42,7 +42,7 @@ int main(int argc, char** argv) {
char const* binary_name = current_line + 1;
int distance = termux_levenshtein_distance(command_not_found, binary_name);
if (distance == 0 && strcmp(command_not_found, binary_name) == 0) {
printf("The program '%s' is not installed. Install it by executing:\n packages install %s\n", binary_name, current_package);
printf("The program '%s' is not installed. Install it by executing:\n pkg install %s\n", binary_name, current_package);
return 127;
} else if (best_distance == distance) {
guesses_at_best_distance++;

View File

@ -8,6 +8,24 @@ char const* const commands[] = {
" abook",
"angband",
" angband",
"apache2",
" ab",
" apachectl",
" apxs",
" checkgid",
" dbmmanage",
" envvars",
" envvars-std",
" fcgistarter",
" htcacheclean",
" htdbm",
" htdigest",
" htpasswd",
" httpd",
" httxt2dbm",
" logresolve",
" rotatelogs",
" suexec",
"apt",
" apt",
" apt-cache",
@ -227,6 +245,9 @@ char const* const commands[] = {
" corkscrew",
"cppi",
" cppi",
"cscope",
" cscope",
" ocs",
"ctags",
" ctags",
" readtags",
@ -249,6 +270,7 @@ char const* const commands[] = {
"db",
" db_archive",
" db_checkpoint",
" db_convert",
" db_deadlock",
" db_dump",
" db_hotbackup",
@ -271,6 +293,8 @@ char const* const commands[] = {
" savelog",
" tempfile",
" which",
"debootstrap",
" debootstrap",
"dialog",
" dialog",
" whiptail",
@ -335,7 +359,7 @@ char const* const commands[] = {
"emacs",
" ebrowse",
" emacs",
" emacs-25.1",
" emacs-25.2",
" emacsclient",
" etags",
"erlang",
@ -435,8 +459,34 @@ char const* const commands[] = {
" gdk-pixbuf-pixdata",
" gdk-pixbuf-query-loaders",
" gdk-pixbuf-thumbnailer",
"gegl",
" gegl",
" gegl-imgcmp",
"getconf",
" getconf",
"gettext",
" autopoint",
" envsubst",
" gettext",
" gettext.sh",
" gettextize",
" msgattrib",
" msgcat",
" msgcmp",
" msgcomm",
" msgconv",
" msgen",
" msgexec",
" msgfilter",
" msgfmt",
" msggrep",
" msginit",
" msgmerge",
" msgunfmt",
" msguniq",
" ngettext",
" recode-sr-latin",
" xgettext",
"gifsicle",
" gifdiff",
" gifsicle",
@ -471,6 +521,23 @@ char const* const commands[] = {
" gnuchess",
"gnugo",
" gnugo",
"gnuit",
" .gitaction",
" gitaction",
" gitdpkgname",
" gitfm",
" gitkeys",
" gitmkdirs",
" gitmount",
" gitps",
" gitregrep",
" gitrfgrep",
" gitrgrep",
" gitunpack",
" gitview",
" gitwhich",
" gitwipe",
" gitxgrep",
"gnupg",
" gpg",
" gpg-zip",
@ -580,6 +647,8 @@ char const* const commands[] = {
" ht",
"htop",
" htop",
"httping",
" httping",
"hub",
" hub",
"hunspell",
@ -604,6 +673,7 @@ char const* const commands[] = {
" iconv",
"icu-devtools",
" derb",
" escapesrc",
" genbrk",
" genccode",
" gencfu",
@ -661,6 +731,9 @@ char const* const commands[] = {
" rjoe",
"jq",
" jq",
"json-glib",
" json-glib-format",
" json-glib-validate",
"jupp",
" jmacs",
" joe",
@ -699,6 +772,8 @@ char const* const commands[] = {
" sserver",
" uuclient",
" uuserver",
"ledger",
" ledger",
"leptonica",
" convertfilestopdf",
" convertfilestops",
@ -888,13 +963,6 @@ char const* const commands[] = {
" opt",
" verify-uselistorder",
" yaml2obj",
"lrzsz",
" lrb",
" lrx",
" lrz",
" lsb",
" lsx",
" lsz",
"ltrace",
" ltrace",
"lua",
@ -927,6 +995,8 @@ char const* const commands[] = {
" mcdiff",
" mcedit",
" mcview",
"memcached",
" memcached",
"micro",
" micro",
"minicom",
@ -953,6 +1023,8 @@ char const* const commands[] = {
" mp3splt",
"mpc",
" mpc",
"mpd",
" mpd",
"mpv",
" mpv",
"multitail",
@ -968,6 +1040,8 @@ char const* const commands[] = {
" ncdc",
"ncdu",
" ncdu",
"ncmpcpp",
" ncmpcpp",
"ncurses-utils",
" clear",
" infocmp",
@ -1415,6 +1489,8 @@ char const* const commands[] = {
" par2verify",
"patch",
" patch",
"patchelf",
" patchelf",
"perl",
" c2ph",
" corelist",
@ -1646,6 +1722,9 @@ char const* const commands[] = {
" rake",
" rdoc",
" ruby",
"screen",
" screen",
" screen-4.5.1",
"scrypt",
" scrypt",
"sed",
@ -1673,6 +1752,10 @@ char const* const commands[] = {
" soxi",
"sqlite",
" sqlite3",
"squid",
" purge",
" squid",
" squidclient",
"sshpass",
" sshpass",
"sslscan",
@ -1698,8 +1781,6 @@ char const* const commands[] = {
" svnversion",
"syncthing",
" syncthing",
"tack",
" tack",
"tar",
" tar",
"tasksh",
@ -1762,6 +1843,8 @@ char const* const commands[] = {
" tig",
"timewarrior",
" timew",
"tintin++",
" tt++",
"tinyscheme",
" tinyscheme",
"tmate",
@ -2057,7 +2140,6 @@ char const* const commands[] = {
" vigpg",
" wifi-status",
"colordiff",
" cdiff",
" colordiff",
"cowsay",
" cowsay",

View File

@ -1,6 +1,6 @@
TERMUX_PKG_HOMEPAGE=https://termux.com/
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
TERMUX_PKG_VERSION=0.42
TERMUX_PKG_VERSION=0.43
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
TERMUX_PKG_CONFFILES="etc/motd"
@ -18,10 +18,11 @@ termux_step_make_install () {
chmod +x $TERMUX_PREFIX/bin/$tool
done
cp -p $TERMUX_PKG_BUILDER_DIR/{dalvikvm,su,termux-fix-shebang,termux-reload-settings,termux-setup-storage,chsh,termux-open-url,termux-wake-lock,termux-wake-unlock,login,packages,termux-open,termux-info} $TERMUX_PREFIX/bin/
cp -p $TERMUX_PKG_BUILDER_DIR/{dalvikvm,su,termux-fix-shebang,termux-reload-settings,termux-setup-storage,chsh,termux-open-url,termux-wake-lock,termux-wake-unlock,login,pkg,termux-open,termux-info} $TERMUX_PREFIX/bin/
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/dalvikvm
cp $TERMUX_PKG_BUILDER_DIR/motd $TERMUX_PREFIX/etc/motd
cd $TERMUX_PREFIX/bin
ln -s -f termux-open xdg-open
ln -s -f pkg packages
}

View File

@ -6,7 +6,7 @@ IRC channel: #termux on freenode
Gitter chat: https://gitter.im/termux/termux
Mailing list: termux+subscribe@groups.io
Search packages: packages search <query>
Install a package: packages install <package>
Upgrade packages: packages upgrade
Learn more: packages help
Search packages: pkg search <query>
Install a package: pkg install <package>
Upgrade packages: pkg upgrade
Learn more: pkg help