fish: add fishy function

This commit is contained in:
Charles Gould 2020-06-03 00:26:24 -05:00
parent 94c9e1ffe4
commit cef70a9d6d
2 changed files with 17 additions and 3 deletions

View File

@ -1,3 +0,0 @@
function fishcognito --description "Start a new shell in private mode"
fish --private
end

17
fish/functions/fishy.fish Normal file
View File

@ -0,0 +1,17 @@
function fishy -d "Run fish in a non-standard way" -a fishy_opt
if test -z "$fishy_opt"
printf "How do you want to run fish?\n 1) In private mode\n 2) With default config\n"
read fishy_opt -P "> "
end
switch $fishy_opt
case 1
echo "Starting fish in private mode..."
fish --private
case 2
echo "Starting fish with default configuration..."
HOME=(mktemp -d) fish
case '*'
echo (set_color red)"Invalid option: [$fishy_opt]"(set_color normal)
return 1
end
end