Archived
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
_code()
|
||||
{
|
||||
local cur prev words cword split
|
||||
_init_completion -s || return
|
||||
|
||||
_expand || return
|
||||
|
||||
case $prev in
|
||||
-d|--diff)
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
-a|--add|--user-data-dir|--extensions-dir)
|
||||
_filedir -d
|
||||
return
|
||||
;;
|
||||
-g|--goto)
|
||||
compopt -o nospace
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
--locale)
|
||||
COMPREPLY=( $( compgen -W 'de en en-US es fr it ja ko ru zh-CN zh-TW bg hu pt-br tr' ) )
|
||||
return
|
||||
;;
|
||||
--install-extension|--uninstall-extension)
|
||||
_filedir vsix
|
||||
return
|
||||
;;
|
||||
--log)
|
||||
COMPREPLY=( $( compgen -W 'critical error warn info debug trace off' ) )
|
||||
return
|
||||
;;
|
||||
--folder-uri|--disable-extension|--max-memory)
|
||||
# argument required but no completions available
|
||||
return 0
|
||||
;;
|
||||
--enable-proposed-api)
|
||||
# argument optional but no completions available
|
||||
;;
|
||||
esac
|
||||
|
||||
$split && return
|
||||
|
||||
if [[ $cur == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '-d --diff --folder-uri -a --add -g
|
||||
--goto -n --new-window -r --reuse-window -w --wait --locale=
|
||||
--user-data-dir -v --version -h --help --extensions-dir
|
||||
--list-extensions --show-versions --install-extension
|
||||
--uninstall-extension --enable-proposed-api --verbose --log -s
|
||||
--status -p --performance --prof-startup --disable-extensions
|
||||
--disable-extension --inspect-extensions
|
||||
--inspect-brk-extensions --disable-gpu --upload-logs
|
||||
--max-memory=' -- "$cur") )
|
||||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||
return
|
||||
fi
|
||||
|
||||
_filedir
|
||||
} &&
|
||||
complete -F _code code
|
||||
@@ -0,0 +1,38 @@
|
||||
#compdef code
|
||||
|
||||
local arguments
|
||||
|
||||
arguments=(
|
||||
'(-d --diff)'{-d,--diff}'[compare two files with each other]:file to compare:_files:file to compare with:_files'
|
||||
\*'--folder-uri[open a window with given folder uri(s)]:folder uri: '
|
||||
\*{-a,--add}'[add folder(s) to the last active window]:directory:_directories'
|
||||
'(-g --goto)'{-g,--goto}'[open a file at the path on the specified line and column position]:file\:line[\:column]:_files -r \:'
|
||||
'(-n --new-window -r --reuse-window)'{-n,--new-window}'[force to open a new window]'
|
||||
'(-n --new-window -r --reuse-window)'{-r,--reuse-window}'[force to open a file or folder in an already opened window]'
|
||||
'(-w --wait)'{-w,--wait}'[wait for the files to be closed before returning]'
|
||||
'--locale=[the locale to use (e.g. en-US or zh-TW)]:locale (e.g. en-US or zh-TW):(de en en-US es fr it ja ko ru zh-CN zh-TW bg hu pt-br tr)'
|
||||
'--user-data-dir[specify the directory that user data is kept in]:directory:_directories'
|
||||
'(- *)'{-v,--version}'[print version]'
|
||||
'(- *)'{-h,--help}'[print usage]'
|
||||
'--extensions-dir[set the root path for extensions]:root path:_directories'
|
||||
'--list-extensions[list the installed extensions]'
|
||||
'--show-versions[show versions of installed extensions, when using --list-extension]'
|
||||
'--install-extension[install an extension]:id or path:_files -g "*.vsix(-.)"'
|
||||
'--uninstall-extension[uninstall an extension]:id or path:_files -g "*.vsix(-.)"'
|
||||
'--enable-proposed-api[enables proposed API features for extensions]::extension id: '
|
||||
'--verbose[print verbose output (implies --wait)]'
|
||||
'--log[log level to use]:level [info]:(critical error warn info debug trace off)'
|
||||
'(-s --status)'{-s,--status}'[print process usage and diagnostics information]'
|
||||
'(-p --performance)'{-p,--performance}'[start with the "Developer: Startup Performance" command enabled]'
|
||||
'--prof-startup[run CPU profiler during startup]'
|
||||
'(--disable-extension --disable-extensions)--disable-extensions[disable all installed extensions]'
|
||||
\*'--disable-extension[disable an extension]:extension id: '
|
||||
'--inspect-extensions[allow debugging and profiling of extensions]'
|
||||
'--inspect-brk-extensions[allow debugging and profiling of extensions with the extension host being paused after start]'
|
||||
'--disable-gpu[disable GPU hardware acceleration]'
|
||||
'--upload-logs[upload logs from current session to a secure endpoint]:confirm:(iConfirmLogsUpload)'
|
||||
'--max-memory=[max memory size for a window (in Mbytes)]:size (Mbytes)'
|
||||
'*:file or directory:_files'
|
||||
)
|
||||
|
||||
_arguments -s -S $arguments
|
||||
@@ -5,7 +5,7 @@ GenericName=Text Editor
|
||||
Exec=/usr/share/@@NAME@@/@@NAME@@ --unity-launch %F
|
||||
Icon=@@ICON@@
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
StartupNotify=false
|
||||
StartupWMClass=@@NAME_SHORT@@
|
||||
Categories=Utility;TextEditor;Development;IDE;
|
||||
MimeType=text/plain;inode/directory;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Package: @@NAME@@
|
||||
Version: @@VERSION@@
|
||||
Section: devel
|
||||
Depends: libnotify4, libnss3 (>= 2:3.26), gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0, libgtk-3-0 (>= 3.10.0), libunwind8
|
||||
Depends: libnotify4, libnss3 (>= 2:3.26), gnupg, apt, libxkbfile1, libsecret-1-0, libgtk-3-0 (>= 3.10.0), libxss1
|
||||
Priority: optional
|
||||
Architecture: @@ARCHITECTURE@@
|
||||
Maintainer: Microsoft Corporation
|
||||
|
||||
@@ -18,9 +18,13 @@ Visual Studio Code is a new choice of tool that combines the simplicity of a cod
|
||||
mkdir -p %{buildroot}/usr/share/@@NAME@@
|
||||
mkdir -p %{buildroot}/usr/share/applications
|
||||
mkdir -p %{buildroot}/usr/share/pixmaps
|
||||
#mkdir -p %{buildroot}/usr/share/bash-completion/completions
|
||||
#mkdir -p %{buildroot}/usr/share/zsh/site-functions
|
||||
cp -r usr/share/@@NAME@@/* %{buildroot}/usr/share/@@NAME@@
|
||||
cp -r usr/share/applications/@@NAME@@.desktop %{buildroot}/usr/share/applications
|
||||
cp -r usr/share/pixmaps/@@NAME@@.png %{buildroot}/usr/share/pixmaps
|
||||
#cp usr/share/bash-completion/completions/code %{buildroot}/usr/share/bash-completion/completions/code
|
||||
#cp usr/share/zsh/site-functions/_code %{buildroot}/usr/share/zsh/site-functions/_code
|
||||
|
||||
%post
|
||||
# Remove the legacy bin command if this is the stable build
|
||||
@@ -52,3 +56,5 @@ fi
|
||||
/usr/share/@@NAME@@/
|
||||
/usr/share/applications/@@NAME@@.desktop
|
||||
/usr/share/pixmaps/@@NAME@@.png
|
||||
#/usr/share/bash-completion/completions/code
|
||||
#/usr/share/zsh/site-functions/_code
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
"libX11.so.6()(64bit)",
|
||||
"libXss.so.1()(64bit)",
|
||||
"libXtst.so.6()(64bit)",
|
||||
"libgconf-2.so.4()(64bit)",
|
||||
"libgmodule-2.0.so.0()(64bit)",
|
||||
"librt.so.1()(64bit)",
|
||||
"libglib-2.0.so.0()(64bit)",
|
||||
@@ -107,7 +106,6 @@
|
||||
"libgcc_s.so.1",
|
||||
"libgcc_s.so.1(GCC_4.0.0)",
|
||||
"libgcc_s.so.1(GLIBC_2.0)",
|
||||
"libgconf-2.so.4",
|
||||
"libgdk-x11-2.0.so.0",
|
||||
"libgdk_pixbuf-2.0.so.0",
|
||||
"libgio-2.0.so.0",
|
||||
|
||||
@@ -15,7 +15,7 @@ parts:
|
||||
source: .
|
||||
stage-packages:
|
||||
- libasound2
|
||||
- libgconf2-4
|
||||
- libc++1
|
||||
- libnotify4
|
||||
- libnspr4
|
||||
- libnss3
|
||||
|
||||
Reference in New Issue
Block a user