GNU bash,bashrc别名,一个别名给出错误[关闭]

问题描述 投票:0回答:1

我的别名: alias stemo='/storage/emulated/0'

我测试的命令: cd stemo

结果: bash: cd: stemo: No such file or directory

但是当我输入: stemo

我看到: bash: /storage/emulated/0: Is a directory!?!?!

信息:如您所知,它在Android上,但我扎根于最后的GNU bash。除此别名外,我所有其他(20+)个别名均按预期工作。我也通过使用其他别名对其进行了测试,但是只要我的别名包含/storage/emulated/0,它就会失败。

android bash terminal alias rc
1个回答
0
投票

答案:export stemo='/storage/emulated/0',然后使用$stemoalias仅用于命令,别无其他。要使用“别名”进行存储,请使用export

© www.soinside.com 2019 - 2024. All rights reserved.