Quellcode durchsuchen

Läuft erst mal .. devpod completion ist laaangsam

Ralf Beckesch vor 1 Woche
Ursprung
Commit
a24fd88ef2

+ 0 - 4
dot_bashrc.d/000-bash-setup-generic.sh

@@ -11,10 +11,6 @@ HISTCONTROL=ignoreboth
 
 # append to the history file, don't overwrite it
 shopt -s histappend
-#!/bin/bash
-DEBUG=1
-[ -n "$DEBUG" ] && echo debug $0 >&2
-
 
 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
 HISTSIZE=10000

+ 1 - 1
dot_bashrc.d/applications/devpod.sh

@@ -1,3 +1,3 @@
 if [ -n "$(which devpod)" ]; then
-	source <(devpod completion bash)
+	eval "$(devpod completion bash)"
 fi

+ 8 - 0
dot_bashrc.d/applications/starship.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+scriptname=$(basename ${BASH_SOURCE[0]})
+scriptdirname=$(dirname ${BASH_SOURCE[0]})
+
+if [ -n "$(which starship)" ]; then
+    debug "Loading starship completion."
+    eval "$(starship init bash)"
+fi

+ 2 - 7
dot_bashrc.d/applications/sudo-prefix.sh

@@ -2,17 +2,12 @@
 scriptname=$(basename ${BASH_SOURCE[0]})
 scriptdirname=$(dirname ${BASH_SOURCE[0]})
 
-function debug () {
-    if [ -n "$DEBUG" ]; then
-        echo -e "$*" >&2
-    fi
-}
-
 function alias_prefix_sudo_if_exists() {
     cmd="$1"
     shift
     opts="$*"
-    if [ -n "$(which cmd)" ]; then
+    debug "cmd='$cmd' opt='$opts'"
+    if [ -n "$(command -v $cmd)" ]; then
         alias $cmd="sudo $cmd $opts"
     fi
 }