diff --git a/lib/git/fallback/status_shortcuts_shell.sh b/lib/git/fallback/status_shortcuts_shell.sh index ba30805..1b20df2 100644 --- a/lib/git/fallback/status_shortcuts_shell.sh +++ b/lib/git/fallback/status_shortcuts_shell.sh @@ -134,6 +134,7 @@ _gs_output_file_group() { $pad$c_dark [$c_rst$e$c_dark] $c_group$relative$c_rst" # Export numbered variables in the order they are displayed. # (Exports full path, but displays relative path) + # fetch first file (in the case of oldFile -> newFile) and remove quotes local filename=$(eval echo $(echo ${stat_file[$i]} | egrep -o '^"([^\\"]*(\\.[^"]*)*)"|^[^ ]+')) export $git_env_char$e="$project_root/$filename" let e++ diff --git a/lib/git/status_shortcuts.rb b/lib/git/status_shortcuts.rb index 558babb..332ff19 100644 --- a/lib/git/status_shortcuts.rb +++ b/lib/git/status_shortcuts.rb @@ -131,6 +131,7 @@ def output_file_group(group) puts "#{c_group}##{@c[:rst]} #{@c[h[:col]]}#{h[:msg]}:\ #{padding}#{@c[:dark]} [#{@c[:rst]}#{@e}#{@c[:dark]}] #{c_group}#{rel_file}#{@c[:rst]}" # Save the ordered list of output files + # fetch first file (in the case of oldFile -> newFile) and remove quotes @output_files << if h[:file] =~ /^"([^\\"]*(\\.[^"]*)*)"/ $1.gsub(/\\(.)/,'\1') else