(bugfix) make compatible with fish version >=3.3
- cleanup - minor comments and fixes
This commit is contained in:
21
fish/theme-t31m/functions/t31m_prompt_left.fish
Normal file
21
fish/theme-t31m/functions/t31m_prompt_left.fish
Normal file
@ -0,0 +1,21 @@
|
||||
# moved original theme right prompt to left
|
||||
function t31m_prompt_left
|
||||
|
||||
if test "$theme_complete_path" = "yes"
|
||||
set cwd (prompt_pwd)
|
||||
else
|
||||
set cwd (basename (prompt_pwd))
|
||||
|
||||
if git::is_repo
|
||||
set root_folder (command git rev-parse --show-toplevel 2> /dev/null)
|
||||
set parent_root_folder (dirname $root_folder)
|
||||
set cwd (echo $PWD | sed -e "s|$parent_root_folder/||")
|
||||
end
|
||||
end
|
||||
|
||||
printf '%s' \U231A
|
||||
printf (yellow)"("(off)(date +%H(yellow):(off)%M(yellow):(off)%S)(yellow)")"(off)
|
||||
printf '%s' \U1F4C1
|
||||
printf (yellow)"("(off)$cwd(yellow)")"(off)
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user