2024-07-17 12:18:27 +00:00
|
|
|
#!/bin/env fish
|
|
|
|
begin
|
|
|
|
set -l dir (status dirname)
|
|
|
|
source "$dir/../../Scripts/software.fish"
|
|
|
|
|
|
|
|
function configureSW -V dir
|
2024-07-17 13:00:01 +00:00
|
|
|
source "$dir/../bash/profile.fish";
|
|
|
|
source "$dir/../fish/profile.fish";
|
2024-07-17 12:18:27 +00:00
|
|
|
set -l functionName _PortValhalla_ls_
|
|
|
|
|
|
|
|
function dump_header
|
|
|
|
echo "# logo-ls"
|
|
|
|
end
|
|
|
|
|
|
|
|
function dump_aliases
|
|
|
|
printf %s\n \
|
|
|
|
"alias ls='$functionName'" \
|
|
|
|
"alias ll='ls -al'" \
|
|
|
|
"alias l='ls'"
|
|
|
|
end
|
|
|
|
|
|
|
|
begin
|
|
|
|
dump_header
|
|
|
|
|
|
|
|
printf %s\n \
|
|
|
|
"function $functionName() {" \
|
|
|
|
" if [ -t 1 ]" \
|
|
|
|
" then" \
|
|
|
|
' logo-ls -D "$@";' \
|
|
|
|
" else" \
|
|
|
|
' ls --color=auto "$@"' \
|
|
|
|
" fi;" \
|
|
|
|
"}" \
|
|
|
|
""
|
|
|
|
|
|
|
|
dump_aliases
|
|
|
|
end | installBashProfile "logo-ls"
|
|
|
|
|
|
|
|
if type -q fish
|
|
|
|
begin
|
|
|
|
dump_header
|
|
|
|
|
|
|
|
printf %s\n \
|
|
|
|
"function $functionName" \
|
|
|
|
" if [ -t 1 ]" \
|
|
|
|
' logo-ls -D $argv' \
|
|
|
|
" else" \
|
|
|
|
' command ls --color=auto $argv' \
|
|
|
|
" end" \
|
|
|
|
"end" \
|
|
|
|
""
|
|
|
|
|
|
|
|
dump_aliases
|
|
|
|
end | installFishProfile "logo-ls"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
runInstaller $argv
|
|
|
|
end
|