mirror of
https://github.com/ryanccn/flake.git
synced 2025-12-06 16:10:45 +01:00
feat(fish): add code wrapper
This commit is contained in:
parent
af074f2756
commit
3cb2c1bce5
1 changed files with 11 additions and 3 deletions
|
|
@ -10,13 +10,21 @@ in {
|
|||
functions = {
|
||||
take = ''
|
||||
set dir $argv[1]
|
||||
if [ -z "$dir" ]
|
||||
echo "QHAR?!?!?!"
|
||||
if test -z "$dir"
|
||||
return 1
|
||||
end
|
||||
mkdir "$dir"
|
||||
|
||||
mkdir -p "$dir"
|
||||
cd "$dir"
|
||||
'';
|
||||
|
||||
code = ''
|
||||
if test -d "$argv[1]" or test -f "$argv[1]"
|
||||
open -a "Visual Studio Code" "$argv[1]"
|
||||
else
|
||||
"/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" $argv
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue