use eza
This commit is contained in:
parent
8b661cc11e
commit
11c434c50c
3 changed files with 9 additions and 10 deletions
|
@ -3,19 +3,16 @@
|
||||||
|
|
||||||
function __fish_list_current_token -d "List contents of token under the cursor if it is a directory, otherwise list the contents of the current directory"
|
function __fish_list_current_token -d "List contents of token under the cursor if it is a directory, otherwise list the contents of the current directory"
|
||||||
set -l val (commandline -t | string replace -r '^~' "$HOME")
|
set -l val (commandline -t | string replace -r '^~' "$HOME")
|
||||||
printf "\n"
|
set -l cmd
|
||||||
if test -d $val
|
if test -d $val
|
||||||
eza --icons=auto $val
|
set cmd eza --icons $val
|
||||||
else
|
else
|
||||||
set -l dir (dirname -- $val)
|
set -l dir (dirname -- $val)
|
||||||
if test $dir != . -a -d $dir
|
if test $dir != . -a -d $dir
|
||||||
eza --icons=auto $dir
|
set cmd eza --icons $dir
|
||||||
else
|
else
|
||||||
eza --icons=auto
|
set cmd eza --icons
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
__fish_echo $cmd
|
||||||
string repeat -N \n --count=(math (count (fish_prompt)) - 1)
|
|
||||||
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
end
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -58,6 +58,8 @@ sync-dotconfig:
|
||||||
|
|
||||||
@$(WGET) $(REPO_SRC)/.config/fish/config.fish -O $(HOME)/.config/fish/config.fish
|
@$(WGET) $(REPO_SRC)/.config/fish/config.fish -O $(HOME)/.config/fish/config.fish
|
||||||
|
|
||||||
|
@$(WGET) $(REPO_SRC)/.config/fish/functions/__fish_list_current_token.fish -O $(HOME)/.config/fish/functions/__fish_list_current_token.fish
|
||||||
|
|
||||||
@$(WGET) $(REPO_SRC)/.config/fish/functions/fish_prompt.fish -O $(HOME)/.config/fish/functions/fish_prompt.fish
|
@$(WGET) $(REPO_SRC)/.config/fish/functions/fish_prompt.fish -O $(HOME)/.config/fish/functions/fish_prompt.fish
|
||||||
@$(WGET) $(REPO_SRC)/.config/fish/functions/catall.fish -O $(HOME)/.config/fish/functions/catall.fish
|
@$(WGET) $(REPO_SRC)/.config/fish/functions/catall.fish -O $(HOME)/.config/fish/functions/catall.fish
|
||||||
@$(WGET) $(REPO_SRC)/.config/fish/functions/latex-color.fish -O $(HOME)/.config/fish/functions/latex-color.fish
|
@$(WGET) $(REPO_SRC)/.config/fish/functions/latex-color.fish -O $(HOME)/.config/fish/functions/latex-color.fish
|
||||||
|
|
4
meta.sh
4
meta.sh
|
@ -84,8 +84,8 @@ function main {
|
||||||
# Add aliases
|
# Add aliases
|
||||||
wget -q "${repo}"/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish
|
wget -q "${repo}"/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish
|
||||||
# Add functions
|
# Add functions
|
||||||
functions=("catall" "latex-color" "makeaway" "ssh-export" "ssh-import" "ugc"
|
functions=("__fish_list_current_token" "catall" "latex-color" "makeaway"
|
||||||
"update-theme")
|
"ssh-export" "ssh-import" "ugc" "update-theme")
|
||||||
for function in "${functions[@]}"
|
for function in "${functions[@]}"
|
||||||
do
|
do
|
||||||
wget -q "${repo}"/.config/fish/functions/"${function}".fish -O "$HOME"/.config/fish/functions/"${function}".fish
|
wget -q "${repo}"/.config/fish/functions/"${function}".fish -O "$HOME"/.config/fish/functions/"${function}".fish
|
||||||
|
|
Loading…
Reference in a new issue