git别名的名称中是否可以有句点(.)?

git别名的名称中是否可以有句点(.)?,git,alias,Git,Alias,我发现自己经常键入git st.(其中st已化名为status),以获取当前目录文件的状态 我经常错误地将其输入为git st.,当然无法识别 我很想成为圣彼得堡的别名,但似乎我做不到。如果我将st.=status.添加到我的.gitconfig别名中,我会在git调用时得到一个fatal:bad-config文件错误 是否可以创建包含句点的别名?否;如果你看,它一定是字母数字 /* * Validate the key and while at it, lower case it for m

我发现自己经常键入
git st.
(其中
st
已化名为
status
),以获取当前目录文件的状态

我经常错误地将其输入为git st.,当然无法识别

我很想成为圣彼得堡的别名,但似乎我做不到。如果我将
st.=status.
添加到我的.gitconfig别名中,我会在git调用时得到一个
fatal:bad-config文件
错误

是否可以创建包含句点的别名?

否;如果你看,它一定是字母数字

/*
 * Validate the key and while at it, lower case it for matching.
 */
*store_key = xmalloc(strlen(key) + 1);

dot = 0;
for (i = 0; key[i]; i++) {
    unsigned char c = key[i];
    if (c == '.')
        dot = 1;
    /* Leave the extended basename untouched.. */
    if (!dot || i > baselen) {
        if (!iskeychar(c) ||
            (i == baselen + 1 && !isalpha(c))) {
            error("invalid key: %s", key);
            goto out_free_ret_1;
        }
        c = tolower(c);
    } else if (c == '\n') {
        error("invalid key (newline): %s", key);
        goto out_free_ret_1;
    }
    (*store_key)[i] = c;
}
(*store_key)[i] = 0;
不,这是不可能的(如果不更改并重新编译Git本身)。从文件中:

变量名不区分大小写,只允许字母数字字符和
-
,并且必须以字母字符开头


啊,谢谢。我不确定化名是否是一个特例,或者他们的名字是否可以以某种方式转义。谢谢!不幸的是,我只能选择一个答案!