[vte] vte.sh: Avoid warnings if shell is configured with 'set -u'



commit e148105691926cbd4861e7dc26dec194f59c7f14
Author: Marko Mäkelä <msmakela gmail com>
Date:   Fri Sep 27 05:09:05 2019 +0000

    vte.sh: Avoid warnings if shell is configured with 'set -u'
    
    Resolves: https://gitlab.gnome.org/GNOME/vte/-/issues/285
    Bug-Debian: https://bugs.debian.org/941247

 src/vte.sh.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/vte.sh.in b/src/vte.sh.in
index 8b3153da..a12e254b 100644
--- a/src/vte.sh.in
+++ b/src/vte.sh.in
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Not bash or zsh?
-[ -n "$BASH_VERSION" -o -n "$ZSH_VERSION" ] || return 0
+[ -n "${BASH_VERSION:-}" -o -n "${ZSH_VERSION:-}" ] || return 0
 
 # Not an interactive shell?
 [[ $- == *i* ]] || return 0
@@ -36,8 +36,8 @@ __vte_prompt_command() {
 
 case "$TERM" in
   xterm*|vte*)
-    [ -n "$BASH_VERSION" ] && PROMPT_COMMAND="__vte_prompt_command"
-    [ -n "$ZSH_VERSION"  ] && precmd_functions+=(__vte_osc7)
+    [ -n "${BASH_VERSION:-}" ] && PROMPT_COMMAND="__vte_prompt_command"
+    [ -n "${ZSH_VERSION:-}"  ] && precmd_functions+=(__vte_osc7)
     ;;
 esac
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]