From: Josuer08 Date: Tue, 9 Feb 2021 00:26:19 +0000 (-0500) Subject: edit function and some minor stuff X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=bf98ffa9a475a7d39f8a322636402324e230c178;p=dotfiles%2F.git edit function and some minor stuff --- diff --git a/.config/bashrc/alias b/.config/bashrc/alias index 74eddaea..84841092 100644 --- a/.config/bashrc/alias +++ b/.config/bashrc/alias @@ -26,8 +26,6 @@ alias byebye='shutdown now' -# use highlight for colored cat -alias ccat='highlight --out-format=ansi' # wifi available alias wifi='nmcli d wifi'; diff --git a/.config/bashrc/functions b/.config/bashrc/functions index a930aa46..4692b7a5 100644 --- a/.config/bashrc/functions +++ b/.config/bashrc/functions @@ -6,7 +6,7 @@ mdpdf () { pandoc "$1".md -t beamer -o "$1".pdf ;} metadata () { echo "Salida del comando stat" ; stat "$1" ; echo "Salida del comando ls -lisan" ; ls -lisan "$1" ; echo "salida del comando exiftool" ; exiftool "$1" ;} # activates the autocd mode shopt -s autocd -edit () { du -a -L "$1" | awk '{print $2}' | fzf | xargs -r "$VISUAL" ;} +edit () { du -a -L "$1" | awk '{print $2}' | fzf --multi --preview 'vicat {1}' | xargs -r "$VISUAL" ;} function cdls() { DIR="$*"; @@ -20,12 +20,6 @@ function cdls() { } -#vicat is a color and line number cat - -function vicat() { - ccat $@ | nl; - -} #top10 commands diff --git a/.local/bin/vicat b/.local/bin/vicat new file mode 100755 index 00000000..688027d1 --- /dev/null +++ b/.local/bin/vicat @@ -0,0 +1,3 @@ +#!/bin/bash + +highlight --out-format=ansi "$@" | nl;