Skip to content
This repository has been archived by the owner on Oct 9, 2021. It is now read-only.

Log time from fish shell improvements to send git repository main folder as project #213

Open
claudiu-marginean opened this issue May 20, 2020 · 1 comment
Labels

Comments

@claudiu-marginean
Copy link

Hi,

I was installing and configuring the fish integration and did a bit o work to extract the git repository main folder as project.

This is from your site guide:

set -l project

if echo (pwd) | grep -qEi "^/Users/$USER/Sites/"
    set  project (echo (pwd) | sed "s#^/Users/$USER/Sites/\\([^/]*\\).*#\\1#")
else
    set  project "Terminal"
end

And I made a change and if I am into a git repository to send the root folder of the repository as project:

	set -l project

	if git::is_repo
			set wp_root_folder (command git rev-parse --show-toplevel ^/dev/null)
			set wp_parent_root_folder (dirname $wp_root_folder)
			set project (echo $wp_root_folder | sed -e "s|$wp_parent_root_folder/||")
	else
	    set  project "Terminal"
	end
@gandarez
Copy link
Member

@alanhamlett it changes a bit the logic from initial version. Is it under consideration?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants