You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: prompt.sh
+12-13Lines changed: 12 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -239,19 +239,18 @@ find_git_stash_status() {
239
239
if [[ -z"$git_branch" ]];then
240
240
return
241
241
fi
242
-
ifecho"$PWD"| grep "/\.git\(/\|$\)">/dev/null
243
-
then:
244
-
else
245
-
local stashed_commit=$(git stash list -n 1 | cut -d ':' -f 3 | cut -d '' -f 2)
246
-
local current_commit=$(git rev-parse --short HEAD 2> /dev/null)
247
-
local stashed_branch=$(git stash list -n 1 | cut -d ':' -f 2 | sed 's+.* ++')
248
-
#local stashed_branch=$(git stash list -n 1 | grep -o "^[^:]*: On [^:]*" | cut -d ' ' -f 3)
249
-
local current_branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
250
-
# This sets the stash marker if either the current commit or the current branch name is mentioned in the top stack entry.
251
-
# CONSIDER: Alternatively we could have just grepped `git stash list` for either the commit_id or the branch_name. This would also indicate older matching stashes.
local stashed_commit=$(git stash list -n 1 | cut -d ':' -f 3 | cut -d '' -f 2)
246
+
local current_commit=$(git rev-parse --short HEAD 2> /dev/null)
247
+
local stashed_branch=$(git stash list -n 1 | cut -d ':' -f 2 | sed 's+.* ++')
248
+
#local stashed_branch=$(git stash list -n 1 | grep -o "^[^:]*: On [^:]*" | cut -d ' ' -f 3)
249
+
local current_branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
250
+
# This sets the stash marker if either the current commit or the current branch name is mentioned in the top stack entry.
251
+
# CONSIDER: Alternatively we could have just grepped `git stash list` for either the commit_id or the branch_name. This would also indicate older matching stashes.
0 commit comments