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

Remove all cut and sort references (Let's cut it out!) #119

Merged
merged 1 commit into from Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions/__sf_section_git_status.fish
Expand Up @@ -32,7 +32,7 @@ function __sf_section_git_status -d "Display the current git status"
set -l is_behind

set -l index (command git status --porcelain ^/dev/null -b)
set -l trimmed_index (string split \n $index|cut -c 1-2|sort -u)
set -g trimmed_index (string split \n $index | string sub --start 1 --length 2)

for i in $trimmed_index
if test (string match '\?\?' $i)
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.fish
@@ -1,7 +1,7 @@
#!/usr/bin/env fish

# Set the global "SPACEFISH_VERSION" variable to have the same version as is in package.json
set -l new_version (grep -E '"version": "v?([0-9]+\.){1,}' package.json | cut -d\" -f4 2> /dev/null)
set -l new_version (grep -E '"version": "v?([0-9]+\.){1,}' package.json | string split \" ^/dev/null)[4]
set -l filename $PWD/fish_prompt.fish

sed -e "s/set -g SPACEFISH_VERSION .*/set -g SPACEFISH_VERSION $new_version/g" $filename > $filename.bak
Expand Down