eth-p / bat-extras

Bash scripts that integrate bat with various command line tools.
MIT License
1.21k stars 81 forks source link

Fix parent process detection in batpipe #96

Open ebugusey opened 1 year ago

ebugusey commented 1 year ago

Less is called with a filename, and if we basename CMD of less we get a basename of a filename, not a less executable. I think it's just a type that basename was piped to cut, CMD should be cut'ed before processed by basename.

As parent_executable is only used by batpipe, we can just cut CMD and extract program name.