-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from lanbinshijie/dev
今日午间更新结束,谢谢各位
- Loading branch information
Showing
3 changed files
with
104 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
# 字符替换工具 | ||
|
||
from misc.Info import ProgramInfo | ||
|
||
class PS1: | ||
def paraphraser(prompt="[IShell] %u> "): | ||
# 返回值:替换后的字符串 | ||
# 将prompt中的特殊字符替换成对应的内容 | ||
# 特殊字符: | ||
# %n 程序名:默认为IShell | ||
# %v 版本号:默认为ProgramInfo.version | ||
# %u 用户:默认为Lanbin | ||
|
||
# 替换 | ||
prompt = prompt.replace("%n", "IShell") | ||
prompt = prompt.replace("%v", ProgramInfo.version) | ||
prompt = prompt.replace("%u", "Lanbin") | ||
return prompt | ||
|