6 ms·
A comprehensive prompt is an extremely useful and an underappreciated productivity booster. But please, when making screencast or screenshots, use a simple pro
by omeid2 9y ago
A comprehensive prompt is an extremely useful and an underappreciated productivity booster.
But please, when making screencast or screenshots, use a simple prompt.
Because the information included in the prompt is often not only irrelevant, it can be actively distracting and makes reading through less pleasant by increasing the required eye-movement and cognitive effort to filter out the useless content.
Small little things makes a difference.
- jakear 9y agoThe prompt is so long that you can’t actually see the command being typed on mobile, asciienema just clips the stream.
- JasonFruit 9y agoYou mean `asciinema`. That, my friend, is one unfortunate typo.
- jakear 9y agoAhh. That makes more sense. I took it as a bit of (very) crude humor.
- chrismorgan 9y agoI wrote a script bash-for-recording for myself a few years back, for invocation by termrec, which set the window size to 80×24, set HOME to a new empty directory, set USER and NAME to dummy values (creating an actual new throwaway user account would be better here, but I was lazy), set TERM to xterm-256color (I think it was), cleared the environment (env -i) and possibly one or two other things, set a deliberately very simple and obvious prompt (which sets the title as well), cleared the screen, then finally started a nice clean bash profile. I should pull out my old laptop or my backups and resuscitate the script. The example at http://tty-player.chrismorgan.info/ http://tty-player.chrismorgan.info/ was generated using that script.
- NetOpWibby 9y agoThis is neat! Thanks for sharing.
- chrismorgan 9y agoI remembered a couple of details incorrectly, but this was my bash-for-recording script: #!/bin/bash # Start a new bash shell with a severely filtered environment and no initfile. if [ -z "$_BFR_RUNNING" ]; then env -i \ _BFR_RUNNING=1 \ PATH="$PATH" \ LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \ TERM="$TERM" \ SHELL="$SHELL" \ USER="$USER" \ HOME="$HOME/bfr-home" \ LANG="$LANG" \ bash --init-file "$0" "$@" <&0 exit $? else unset _BFR_RUNNING fi # What remains of this file is the initfile. USER=user HOSTNAME=hostname PS1='\n\[\033[32;45;1m\]\w\[\033[m\]\$ ' eval "$(dircolors -b)" alias ls='ls --color=auto'