Skip to content

Commit

Permalink
make the default fish_prompt an autoloaded function
Browse files Browse the repository at this point in the history
  • Loading branch information
capfredf committed Jan 30, 2025
1 parent 3b9f0e8 commit edaaaf2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions distrobox-init
Original file line number Diff line number Diff line change
Expand Up @@ -2151,10 +2151,13 @@ if status --is-interactive
passwd && rm -f /var/tmp/.\$USER.passwd.initialize
trap - INT
end
function fish_prompt
set current_dir (basename (pwd))
echo "📦[\$USER@\$CONTAINER_ID \$current_dir]> "
end
end
EOF
mkdir -p /etc/fish/functions
cat << EOF > /etc/fish/functions/fish_prompt.fish
function fish_prompt
set current_dir (basename (pwd))
echo "📦[\$USER@\$CONTAINER_ID \$current_dir]> "
end
EOF
fi
Expand Down

0 comments on commit edaaaf2

Please sign in to comment.