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

Why hard coded executable paths? #46

Open
borg1622 opened this issue Jan 26, 2021 · 1 comment
Open

Why hard coded executable paths? #46

borg1622 opened this issue Jan 26, 2021 · 1 comment

Comments

@borg1622
Copy link

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.

@Oatelaus
Copy link

@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).

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

2 participants