Browse Source

better path handling

master
Efertone 8 months ago
parent
commit
db327e5fe0
Signed by: efertone GPG Key ID: 07AB750DDFD9EE50
  1. 6
      get-path

6
get-path

@ -4,8 +4,10 @@ p=${1:-$(pwd)}
cd $p
if [ -d ".git" ]; then
basename $(git rev-parse --show-toplevel)
g=$(git rev-parse --show-toplevel 2> /dev/null)
if [ $g != "" ]; then
basename $g
else
if [[ $p = $HOME ]]; then
echo "~$(whoami)"

Loading…
Cancel
Save