texpander icon indicating copy to clipboard operation
texpander copied to clipboard

Why hard coded executable paths?

Open borg1622 opened this issue 4 years ago • 1 comments

I've noticed that some of the executables used in the script are called by their absolute paths, e.g. /usr/bin/xsel, /usr/bin/cat, etc. Some of these paths are different in Ubuntu, so I had to adjust texpander to my environment.

Is this really necessary? I guess just calling xsel, cat or sleep would be sufficent?! If you expect that these commands are not in the scope of PATH it would be better to retrieve the system specific absolute paths with which rather than using hard coded paths.

In case of the latter I could create a PR.

borg1622 avatar Jan 26 '21 23:01 borg1622

@itc-ger as far as I know, which searches using PATH.

https://linux.die.net/man/1/which

It does this by searching for an executable or script in the directories listed in the environment variable PATH using the same algorithm as bash(1).

Oatelaus avatar Feb 17 '21 12:02 Oatelaus