fish: add fishy function
This commit is contained in:
parent
94c9e1ffe4
commit
cef70a9d6d
@ -1,3 +0,0 @@
|
|||||||
function fishcognito --description "Start a new shell in private mode"
|
|
||||||
fish --private
|
|
||||||
end
|
|
17
fish/functions/fishy.fish
Normal file
17
fish/functions/fishy.fish
Normal 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
|
Loading…
x
Reference in New Issue
Block a user