mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
* Use double quote everywhere, to avoid potential future globbing or word splitting * Beautify EDITOR eval * Fix typo in gvm-installer * bin double quotes - best practice to avoid potential shell globbing and word splitting * properly reference variable label * simplify gvm-installer
20 lines
355 B
Bash
Executable File
20 lines
355 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function gvm_prompt() {
|
|
if [[ "$1" == "g" ]]; then
|
|
echo "$gvm_go_name"
|
|
elif [[ "$1" == "ps" ]]; then
|
|
echo "$gvm_pkgset_name"
|
|
else
|
|
if [[ $gvm_pkgset_name != "" ]]; then
|
|
if [[ $gvm_pkgset_name != "global" ]]; then
|
|
echo "$gvm_go_name@$gvm_pkgset_name"
|
|
return 0
|
|
fi
|
|
fi
|
|
echo "$gvm_go_name"
|
|
fi
|
|
}
|
|
|
|
gvm_prompt "$@"
|