mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 06:46:59 +08:00
[debug/dev] loosen riot username check; autoload zcalc (#40)
* riot: loosen username check as sometimes it's not a unix username
* Revert "riot: loosen username check as sometimes it's not a unix username"
This reverts commit bdb64ce1f2
.
* riot: loosen username check as sometimes it's not a unix username
* zshrc: autoload zcalc
---------
Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
parent
1a62ffe74b
commit
39b8dfce82
3
.zshrc2
3
.zshrc2
|
@ -140,6 +140,9 @@ bindkey "\e[1;5D" backward-word # alt+left_arrow; termius
|
|||
|
||||
bindkey "\ed" delete-char # alt+d
|
||||
|
||||
# mods
|
||||
autoload zcalc
|
||||
|
||||
# dfs
|
||||
dfs()
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ get_server_meta() {
|
|||
if [[ "$remote" == *@* ]]; then
|
||||
RET_USERNAME=${remote%%@*}
|
||||
remote=${remote#*@}
|
||||
check_username $RET_USERNAME || fmt_fatal invalid username \"$RET_USERNAME\"
|
||||
check_username $RET_USERNAME || fmt_warning \"$RET_USERNAME\" is not a valid unix username
|
||||
fi
|
||||
# if in the form ...:22
|
||||
if [[ "$remote" == "["*"]":* || ( "$remote" != "["*"]" && "$remote" == *:* ) ]]; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user