Browse Source

fix coloring for new column(1) versions

DanielFGray 1 year ago
parent
commit
b394c4df55
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      fzgit

+ 4
- 4
fzgit View File

@@ -4,7 +4,7 @@
4 4
 # https://github.com/junegunn/fzf/wiki/examples#git
5 5
 
6 6
 # declare BOLD=$(tput bold || tput md)
7
-declare c_reset="\e[0m"
7
+declare c_reset=$(tput sgr0)
8 8
 declare c_green=$(tput setaf 2 || tput AF 2)
9 9
 declare c_red=$(tput setaf 1 || tput AF 1)
10 10
 
@@ -41,7 +41,7 @@ fzf() { # {{{
41 41
     shift
42 42
   fi
43 43
   branch=$(git status 2> /dev/null | sed 's/On branch />/;q')
44
-  $(which fzf) --inline-info --ansi --cycle --prompt="fzgit${branch}>${prompt} " "$@"
44
+  command fzf --inline-info --ansi --cycle --prompt="fzgit${branch}>${prompt} " "$@"
45 45
 }
46 46
 # }}}
47 47
 
@@ -261,8 +261,8 @@ git_stash() { # {{{
261 261
 
262 262
 pick_cmd() {
263 263
   for c in "${!implemented_git_cmds[@]}"; do
264
-    printf "${c_green}%s${c_reset}| -- %s\n" "$c" "${git_cmds_descriptions[$c]}"
265
-  done | column -s'|' -t | fzf | awk '{print $1}'
264
+    printf '%s%-15s%s -- %s\n' "${c_green}" "$c" "${c_reset}" "${git_cmds_descriptions[$c]}"
265
+  done | fzf | awk '{print $1}'
266 266
 }
267 267
 
268 268
 main() {

Loading…
Cancel
Save