Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell: mention ability to tune up PS* variables (in particular PS1) #20

Open
yarikoptic opened this issue Nov 17, 2017 · 1 comment
Open

Comments

@yarikoptic
Copy link
Member

apparently some terminals/shells have "short" version of the PS1 which shows only the current directory name (not a full path etc). This makes it difficult sometimes to have a coherent mental picture about actual location within the hierarchy, leading to all kinds of misdemeanor. Knowing where you are is kinda important for reproducibility

@yarikoptic
Copy link
Member Author

If shell is not minimalistic posh, and bash or fixed up dash, I use a trick with PS4 more and more.

Having

export PS4='> $(date +%T.%N) [$$] '
set -x

results in every ran command visualized with timestamp (to see how long it took for a previous one to finish) and a return code (if used without set -e)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant