别名和自定义命令管理器和运行器

alfredcmd的Python项目详细描述


===
alfred cmd
===




图片::https://img.shields.io/pypi/v/alfredcmd.svg
:目标:https://pypi.python.org/pypi/alfredcmd

…图片::https://img.shields.io/travis/gustavokatel/alfredcmd.svg
:目标:https://travis ci.org/gustavokatel/alfredcmd

…图片::https://readthedocs.org/projects/alfredcmd/badge/?version=latest
:目标:https://alfredcmd.readthedocs.io/en/latest/?badge=latest
:alt:documentation status








创建可移植的自定义命令和脚本。



目前处于beta版,但可用。

用法
----


所有配置都位于:code:`$user/.alfred/alfred.toml`

config
~~~~

代码块::toml

[variables]
mode="debug"

[function.branch]
exec="git rev parse--abbrev ref head"

[command.st]
exec="git status"

[command.cc]
exec="git commit-a{@}"

[command.push]
exec="git按{@}"

[command.b]
exec="echo{branch()}"

[command.pythoncall]
exec="~/.alfred/myscript.py::myfunction"
type="python"

run
~~~

代码块::console

$alfred st
$al cc




代码块::toml

[variables]
mode="debug"

[command.print]
exec="echo{mode}"




commands
~exec="echo{mode}"


alfred将执行的预定义命令定义如下


。代码块::toml

[command.command_name]
exec="execution_line"
type="shell"
format=true
echo=false
help="help info"

n_line**是将要调用的代码。alfred接受多行条目,这些条目
将包装在脚本文件中,并使用默认的shell执行器执行。

-**type**命令的类型。alfred当前接受"shell"和"python"命令类型

-**format**标记实例是否应在exec行中应用格式化程序。
如果为false,则不会解释占位符{}在执行之前剪切

-**帮助**将在"alfred@list"中显示的描述性消息


函数
~~~~~~~~~

函数可以创建以增强格式化期间的命令执行,其定义如下:

。代码块::toml

[函数.函数名]
exec="execution_line"
format=true

,其中:

-**函数名**是alfred在格式化程序中用来标识该函数的别名

-**execution_line**是要调用的代码。目前,alfred在函数中只接受一行shell命令。

-**format**标记实例是否应在exec行中应用格式化程序。
如果为false,则不会解释占位符{}/>-` al[fred]@help`show help
-`al[fred]@list`列出所有命令
-`al[fred]@version`show version

----


stable release
~~~~~~~~~~~~~~~~~

>要安装alfred,请在终端中运行此命令:

。代码块::console

$pip install alfredcmd

这是安装alfred的首选方法,因为它总是安装最新的稳定版本。

/>. _ pip:https://pip.pypa.io
_ python安装指南:http://docs.python guide.org/en/latest/starting/installation/



代码块::控制台代码块::console

$curl-ol https://github.com/gustavokatel/alfredcmd/tarball/master

一旦您有了源代码的副本,就可以使用:

代码块::console

$python setup.py install



…_ Github回购协议:https://github.com/gustavokatel/alfredcmd
…_ tarball:https://github.com/gustavokatel/alfredcmd/tarball/master



credits
----


>这个包是用cookiecutter和"audreyr/cookiecutter pypackage"项目模板创建的。

。_ Cookiecutter:https://github.com/audreyr/Cookiecutter
。_` audreyr/cookiecutter pypackage`:https://github.com/audreyr/cookiecutter pypackage



=
=
历史
==



<0.1.0(2018-03-21)
----

*在pypi上首次发布。



欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java类之间并发性不一致的HashMap   插件如何在JavaSwing中使用UIManager和Classloader从外部jar安装外观?   java JasperReports:找不到子报表   在项目中找不到java生成的Javadoc文件   java BigDecimal。multiply()和divide()方法返回十六进制数。为什么?   java统计出现次数并从字符串中删除重复项   调用运算符时发生java NullPointerException   Spring和Hibernate之间的java配置错误   JavaZK将用户重定向回上一页   Javasocket为传出连接指定特定的网络接口   如果拖动到某个区域外,java Make按钮操作将被取消   如何在Eclipse for selenium 3.141.59中添加Java文档链接   java从匹配条件的数组中获取所有索引   docker未连接到RemoteWebDriver的java Gitlab ci selenium测试   java重写run方法   utf 8如何使用java解码UTF8编码的字符串?   java如何从eclipse调试部署在tomcat上的web应用程序?   将字母字符与前面没有百分号的Java正则表达式匹配