Problem
I want to copy the output of tldr to clipboard, and then paste that to text editor.
I execute: tldr pwd | xclip -sel clip
When I paste from clipboard, I get:
pwd [0mPrint name of current/working directory.More information: https://www.gnu.org/software/coreutils/pwd. - [23;22;24;25;32mPrint the current directory: [23;22;24;25;33m pwd [0m - [23;22;24;25;32mPrint the current directory, and resolve all symlinks (i.e. show the "physical" path): [23;22;24;25;33m pwd -P [0m[0m I want to get rid of timestamps and also want to know why this is happening.
Observation
tldr pwd(without passing into xclip) doesn't display timestampsman pwd | xclip -sel clipdoesn't include timestamps when pasted- So, only when passing tldr to xclip I find this happening
- The timestamps looks like escape codes
Environment
- Static hostname: debian
- Icon name: computer-desktop
- Chassis: desktop
- Operating System: Debian GNU/Linux 10 (buster)
- Kernel: Linux 4.19.0-17-amd64
- Architecture: x86-64