.kshrc 中的自定义 PS1 提示不起作用

发布于 2024-10-13 03:43:14 字数 851 浏览 5 评论 0原文

我必须在两个主机之间使用 NFS 用户 ID:A 运行 Ksh 93,B 运行 pdksh 88。

我的问题与我在 A 上创建的自定义提示有关:它的工作原理就像一个超级按钮并显示颜色:

PS1="$'\E[46;31m'`logname`@$'\E[1;33m'`hostname -s`:$'\E[0m>"

但我切换了对于B来说,一切都完蛋了(私人信息已被删除)。提示无法像主机A一样显示颜色;相反,颜色代码以“清晰”显示。

$'\E[46;31m'NFS_user_name@$'\E[1;33m'host_name_for_B:$'\E[0m>

主机 B 上的提示不像主机 A 那样显示颜色,因此我希望 B 显示基本提示。为了解决这个问题,我编辑了 .kshrc 文件,在末尾添加了以下代码:

export NODE=`uname -n`

case $NODE in
    host_name_for_B)
        PS1="[`logname`@`uname -n`]>"
        ;;
    *)
        PS1="$'\E[46;31m'`logname`@$'\E[1;33m'`hostname -s`:$'\E[0m>"
        ;;
esac

The case statements does not work: PS1 does not switch to

PS1="[`logname`@`uname -n`]>"

for host B.

知道可能是什么问题吗?

I have to work with a NFS user id between two hosts: A running Ksh 93 and B running pdksh 88.

My problem has to do with the custom prompt I created on A: it works like a charm and display colors:

PS1="

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

export NODE=`uname -n`

case $NODE in
    host_name_for_B)
        PS1="[`logname`@`uname -n`]>"
        ;;
    *)
        PS1="

The case statement does not work: PS1 does not switch to

PS1="[`logname`@`uname -n`]>"

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[46;31m'NFS_user_name@

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[1;33m'host_name_for_B:

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".


The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:


The case statement does not work: PS1 does not switch to


for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'NFS_user_name@

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'host_name_for_B:

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'NFS_user_name@

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'host_name_for_B:

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>" ;; esac

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'NFS_user_name@

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'host_name_for_B:

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[46;31m'`logname`@

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[1;33m'`hostname -s`:

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

\E[0m>"

But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".

The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my .kshrc file to add this code at the end:

The case statement does not work: PS1 does not switch to

for host B.

Any idea what could be the problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你在我安 2024-10-20 03:43:14

感谢一位朋友,我的提示代码适用于主机 A 和 B:

PS1="$(printf "\033[46;31m%s@\033[1;33m%s\033[0m>" $(logname) $(hostname -s))"

感谢大家抽出时间。

Thanks to a friend, this code for my prompt works across both hosts A and B:

PS1="$(printf "\033[46;31m%s@\033[1;33m%s\033[0m>" $(logname) $(hostname -s))"

Thanks to all for taking the time.

困倦 2024-10-20 03:43:14

这是另一种适用于 pdksh 和 ksh93 的方法:

PS1='<$LOGNAME@$HOSTNAME:/${PWD#/}>'

Here's another one which works for both pdksh and ksh93:

PS1='<$LOGNAME@$HOSTNAME:/${PWD#/}>'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文