fixed few details in profile

This commit is contained in:
fatalerrors
2021-10-22 16:15:05 +02:00
parent 6f4a6aa1d1
commit 395aaede7d

View File

@@ -27,7 +27,7 @@
# 24/10/2020 Version 2.6.0 : Added session save and restore for Konsole # 24/10/2020 Version 2.6.0 : Added session save and restore for Konsole
# 25/12/2020 Version 2.6.1 : Add check on rmhost, improvements rmspc, created expendlist # 25/12/2020 Version 2.6.1 : Add check on rmhost, improvements rmspc, created expendlist
# 26/02/2021 Version 2.6.2 : taz: corrected bug with trailing slash on directories # 26/02/2021 Version 2.6.2 : taz: corrected bug with trailing slash on directories
# 18/10/2021 Version 2.6.3 : changed PS1 for status bar style version # 18/10/2021 Version 2.6.3 : changed PS1 for status bar style version
# few minor improvements # few minor improvements
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Copyright (c) 2013-2020 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org> # Copyright (c) 2013-2020 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
@@ -343,13 +343,13 @@ ssr ()
;; ;;
esac esac
done done
[[ ! $1 ]] && [[ ! $1 ]] &&
echo "Please specify the server you want to log in." && echo "Please specify the server you want to log in." &&
return 1 return 1
local srv=$1 && shift local srv=$1 && shift
ssh -Y root@$srv $@ ssh -Y root@$srv $@
} }
export ssr export ssr
@@ -388,11 +388,11 @@ dpkgs ()
[[ $count -lt 1 ]] && [[ $count -lt 1 ]] &&
echo "*** Error: Please specify a package name, without space, eventually partial." && echo "*** Error: Please specify a package name, without space, eventually partial." &&
return 1 return 1
[[ -x /usr/sbin/dpkg ]] && [[ -x /usr/sbin/dpkg ]] &&
echo "*** Error: dpkg command seems unavialable." && echo "*** Error: dpkg command seems unavialable." &&
return 2 return 2
dpkg -l | grep $pkg dpkg -l | grep $pkg
} }
export dpkgs export dpkgs
@@ -505,7 +505,7 @@ rmspc () {
[[ ! $substchar ]] && substchar="_" [[ ! $substchar ]] && substchar="_"
[[ $verb ]] && local mvopt="-v" [[ $verb ]] && local mvopt="-v"
for f in *\ *; do for f in *\ *; do
[[ $recurs ]] && [[ -d "$f" ]] && ( [[ $recurs ]] && [[ -d "$f" ]] && (
#[[ $verb ]] && echo "Entering directory $f ..." #[[ $verb ]] && echo "Entering directory $f ..."
@@ -577,7 +577,7 @@ utaz()
done done
[[ $createdir && $nodir ]] && echo "*** Error: --create-dir and --no-dir options are mutually exclusive." [[ $createdir && $nodir ]] && echo "*** Error: --create-dir and --no-dir options are mutually exclusive."
[[ ! $LIST ]] && local LIST="." [[ ! $LIST ]] && local LIST="."
for zitem in $LIST; do for zitem in $LIST; do
@@ -652,7 +652,7 @@ taz()
xz $verb --compress --keep -$3 -T $2 $1 xz $verb --compress --keep -$3 -T $2 $1
return $? return $?
} }
_dolz() _dolz()
{ {
local procopt="--threads $2" local procopt="--threads $2"
@@ -700,7 +700,7 @@ taz()
$command $verb $procopt --keep -$3 $1 $command $verb $procopt --keep -$3 $1
return $? return $?
} }
_dobz2() _dobz2()
{ {
local procopt="-p$2" local procopt="-p$2"
@@ -990,6 +990,9 @@ if [[ $INTERACTIVE ]]; then
trap 'timer_start' DEBUG trap 'timer_start' DEBUG
PROMPT_COMMAND='set_prompt' PROMPT_COMMAND='set_prompt'
# More colors
export TERM=xterm-256color
# Set default language # Set default language
setfr setfr
showinfo showinfo