diff --git a/.config/shell/projects b/.config/shell/projects index ffa26f9..5c318f0 100644 --- a/.config/shell/projects +++ b/.config/shell/projects @@ -4,11 +4,11 @@ # The regular command is "p status" to update all projects and show their status. # Common root for all projects -projects_dir=${projects_dir:-$DATA/4-incubator/dev} - -# The max depth to search for when listing projects. The actual depth is this value minus one, since it searches for ".git" folders at that depth. -projects_subfolder_level=4 +projects_dir=${projects_dir:-$DATA/1-projects} +# The max depth to search for when listing projects. +# The actual depth is this value minus one, since it searches for ".git" folders at that depth. +projects_subfolder_level=3 # Lists all projects under $projects_dir or the current directory if that is a subfolder of $projects_dir and not a git repository. # This is done by searching for corresponding ".git" folders and then listing their parent directories via "dirname" diff --git a/.local/bin/scripts/git-p b/.local/bin/scripts/git-p index e69778b..e391338 100755 --- a/.local/bin/scripts/git-p +++ b/.local/bin/scripts/git-p @@ -1,5 +1,5 @@ #!/bin/sh if git rev-parse @{u} 2>/dev/null >/dev/null - then git push - else git push --set-upstream + then git push "$@" + else git push --set-upstream "$@" fi diff --git a/.local/bin/scripts/rpl b/.local/bin/scripts/rpl index c03e944..22a14d3 100755 --- a/.local/bin/scripts/rpl +++ b/.local/bin/scripts/rpl @@ -2,8 +2,8 @@ # Use grep and sed to replace $1 with $2 recursively and print what is done grep --null --recursive --files-with-matches \ --binary-files=without-match --exclude-dir={.sync,.stfolder,.git} "$1" | - xargs -0 sed -i "/${1}/{ - s//${2}/g + xargs -0 sed -i "\|${1}|{ + s||${2}|g w /dev/stdout }"