2024-07-17 12:18:27 +00:00
|
|
|
#!/bin/env fish
|
|
|
|
begin
|
|
|
|
set -l dir (status dirname)
|
2024-11-01 12:12:16 +00:00
|
|
|
source "$dir/../../../lib/software.fish"
|
2024-07-17 12:18:27 +00:00
|
|
|
|
|
|
|
function configureSW -V dir
|
2024-10-06 19:25:34 +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
|
|
|
|
|
2024-07-28 15:01:24 +00:00
|
|
|
function dump_aliases -V functionName
|
2024-07-17 12:18:27 +00:00
|
|
|
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
|
2024-10-06 19:25:34 +00:00
|
|
|
end | installBashProfile logo-ls
|
2024-07-17 12:18:27 +00:00
|
|
|
|
|
|
|
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" \
|
2024-10-06 19:25:34 +00:00
|
|
|
end \
|
2024-07-17 12:18:27 +00:00
|
|
|
""
|
|
|
|
|
|
|
|
dump_aliases
|
2024-10-06 19:25:34 +00:00
|
|
|
end | installFishProfile logo-ls
|
2024-07-17 12:18:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
runInstaller $argv
|
|
|
|
end
|