Support relative path for `--bin` flag
jamesottaway opened this issue · 4 comments
I want to add this line in my .freshrc
:
fresh sivel/speedtest-cli speedtest_cli.py --bin=speedtest
and have it symlink ~/.fresh/source/sivel/speedtest-cli/speedtest_cli.py
to ~/bin/speedtest
.
The --bin
flag currently only accepts values starting with ~
or /
and hence can assume you are giving it the full path to symlink to.
Ideally it would allow --bin=foo
and symlink into the default bin
path (currently ~/bin
) with the custom name, in this case foo
.
This behaviour should probably also be extended to --file
for consistency. e.g. --file=foo
should behave the same as --file=~/.foo
.
How would that affect the 'Building files without symlinking' example in README.md
, where this line:
fresh zsh-users/zsh-syntax-highlighting zsh-syntax-highlighting.zsh --file=vendor/zsh-syntax-highlighting.zsh
would currently symlink zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
to ~/.zsh-syntax-highlighting.zsh
?
Should the new style only work if the value appended to --file=
is a filename, not a relative path?
--file=vendor/zsh-syntax-highlighting.zsh
will not perform any symlinking. The new behaviour would only trigger if the value is present and does not contain any slashes.
Cool, I thought that's what you were hinting at, just wanted to be sure.