(This acts as extension for running bash
commands in Justfile.
Don’t mistake it for Microsoft’s Just . But if I could steal some search results and link them to Rust it’s fine ;)
Currently I’m testing features and much things probably will change.
- Shared environment (by using PID from Just itself to create a temporary shared directory)
- Adding
@
before bash command will output the same before execution (like it’s in the file but with vars replaced)- Adding
@@
will print the exact same command
- Adding
- Executing Justbash puts you in a shell with all the environment loaded
- Setting
TMP
before execution puts you in the exact same environment like before
- Setting
- Bash execution is strict started with
- Will load
Justfunctions
if present - Coloring of STDERR
- Show output copy’n’paste style with renvsubst
Bundled functions like noerr
,export
,import
will have an own page. Unless then please dig source code.
And yes we flow the XDG standard!
PREFIX="$HOME/.local"
if echo $PATH | tr ':' $'\n' | grep -qo "$PREFIX/bin"; then
>&2 echo "Please export $PREFIX/bin to your PATH\!"
fi
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to $HOME/.local/bin
curl --progress-bar -sSfL https://raw.githubusercontent.com/blurayne/justbash/main/Justbash -o - \
| install -m 755 /dev/stdin "$PREFIX/bin/Justbash"
set shell := ["Justbash", "-c"]
export FROM_JUST := "with"
environment-foo:
#!Justbash
export MYVAR="1233"
export FROM_JUST="love"
environment-bar:
#!Justbash
export AWS_FOO="$(aws get-some-important-id)"
foo: environment-foo
#!Justbash
title "Testing the environment"
@echo "$MYVAR"
@echo "$FROM_JUST"
foobar: environment-foo
echo "$MYVAR" # will run in an own Justbash process
echo "$FROM_JUST" # will run in another Justbash process
@@
annotation- Better error handler (Just uses the lineno in the Justfile only)
- Get
shenvsubst
ready