summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions/icons.zsh9
-rw-r--r--functions/utilities.zsh16
2 files changed, 25 insertions, 0 deletions
diff --git a/functions/icons.zsh b/functions/icons.zsh
index 214d31b4..d3126a54 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -78,6 +78,9 @@ case $POWERLEVEL9K_MODE in
PYTHON_ICON $'\U1F40D' # 🐍
SWIFT_ICON ''
PUBLIC_IP_ICON ''
+ LOCK_ICON $'\UE138' # 
+ EXECUTION_TIME_ICON $'\UE89C' # 
+ SSH_ICON '(ssh)'
)
;;
'awesome-fontconfig')
@@ -138,6 +141,9 @@ case $POWERLEVEL9K_MODE in
PYTHON_ICON $'\U1F40D' # 🐍
SWIFT_ICON ''
PUBLIC_IP_ICON ''
+ LOCK_ICON $'\UE138' # 
+ EXECUTION_TIME_ICON $'\uF253'
+ SSH_ICON '(ssh)'
)
;;
'nerd-patched-complete')
@@ -254,6 +260,9 @@ case $POWERLEVEL9K_MODE in
PYTHON_ICON ''
SWIFT_ICON 'Swift'
PUBLIC_IP_ICON ''
+ LOCK_ICON $'\UE0A2'
+ EXECUTION_TIME_ICON 'Dur'
+ SSH_ICON '(ssh)'
)
;;
esac
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index f27c7f99..22b53c6a 100644
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -208,3 +208,19 @@ function truncatePathFromRight() {
echo $1 | sed $SED_EXTENDED_REGEX_PARAMETER \
"s@(([^/]{$((POWERLEVEL9K_SHORTEN_DIR_LENGTH))})([^/]{$delim_len}))[^/]+/@\2$POWERLEVEL9K_SHORTEN_DELIMITER/@g"
}
+
+# Search recursively in parent folders for given file.
+function upsearch () {
+ if [[ "$PWD" == "$HOME" || "$PWD" == "/" ]]; then
+ echo "$PWD"
+ elif test -e "$1"; then
+ pushd .. > /dev/null
+ upsearch "$1"
+ popd > /dev/null
+ echo "$PWD"
+ else
+ pushd .. > /dev/null
+ upsearch "$1"
+ popd > /dev/null
+ fi
+}