TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Interactive Bash Utilities

4 点作者 ertug将近 14 年前
Hello HN,<p>After some quick hacking, I have managed to extract some of the things in my .bashrc I find useful to make a library.<p>Maybe the most interesting part is prompt.sh. It displays the return code of the last command along with an error message. The error message comes from a look-up table using the last command run and the return code.<p>Please let me know what you want to see in such an utility library.<p>https://github.com/ertug/bash-utils

2 条评论

poisonbit将近 14 年前
You can turn all that elifs on prompt.sh into a case/esac.<p>I've returned to screen from tmux, since it manages vertical split. I've something similar for auto-screen. But my configuration avoids nested screen sessions (i.e. ssh to host A, and then from host A to host B, both with the same .bashrc configs), like this:<p>[[ -x $( type -P screen ) ]] &#38;&#38; \ [[ -n "$SSH_CONNECTION" ]] &#38;&#38; \ [[ "x$TERM" != 'xscreen' ]] &#38;&#38; screen -dR
评论 #2642127 未加载
Omni5cience将近 14 年前
Interesting, I don't have time to dig into it right now, but I'm always interested in cool dotfile stuff.