Fix __guix_env in prompt
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
parent
325f0a00db
commit
02397c2651
|
@ -174,7 +174,7 @@ __ssh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
__guix_env() {
|
__guix_env() {
|
||||||
local re='[\\(]?\\(\"([^\"]*)\"'
|
local re='[\\(]?\\(\"([a-z]*)\"$'
|
||||||
if [[ \"$GUIX_ENVIRONMENT\" ]]; then
|
if [[ \"$GUIX_ENVIRONMENT\" ]]; then
|
||||||
local PACKAGES=($(while read -r line; do
|
local PACKAGES=($(while read -r line; do
|
||||||
[[ \"$line\" =~ $re ]] && printf '%s ' \"${BASH_REMATCH[1]}\"
|
[[ \"$line\" =~ $re ]] && printf '%s ' \"${BASH_REMATCH[1]}\"
|
||||||
|
|
2
.prompt
2
.prompt
|
@ -114,7 +114,7 @@ __ssh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
__guix_env() {
|
__guix_env() {
|
||||||
local re='[\(]?\("([^"]*)"'
|
local re='[\(]?\("([a-z]*)"$'
|
||||||
if [[ "$GUIX_ENVIRONMENT" ]]; then
|
if [[ "$GUIX_ENVIRONMENT" ]]; then
|
||||||
local PACKAGES=($(while read -r line; do
|
local PACKAGES=($(while read -r line; do
|
||||||
[[ "$line" =~ $re ]] && printf '%s ' "${BASH_REMATCH[1]}"
|
[[ "$line" =~ $re ]] && printf '%s ' "${BASH_REMATCH[1]}"
|
||||||
|
|
Loading…
Reference in New Issue