2023年7月10日发(作者:)
windows下的scoop的⼀些使⽤scoop是什么简⽽⾔之scoop是⼀个包管理⼯具, 可以在命令⾏安装⼀些软件scoop项⽬地址:安装scooppowershell中执⾏:Invoke-Expression (New-Object ent).DownloadString('')我却提⽰:PowerShell requires an execution policy in [Unrestricted, RemoteSigned, ByPass] to run example, to set the execution policy to 'RemoteSigned' please run :'Set-ExecutionPolicy RemoteSigned -scope CurrentUser'于是按照提⽰执⾏(执⾏完后⽆输出表⽰执⾏成功):Set-ExecutionPolicy RemoteSigned -scope CurrentUser接着继续执⾏:Invoke-Expression (New-Object ent).DownloadString('')如下输出表⽰成功:Downloading Adding ~scoopshims to your path.'lastupdate' has been set to '2021-05-20T09:37:03.5173303+08:00'Scoop was installed successfully!Type 'scoop help' for instructions.验证scoop是否安装成功执⾏:scoop help输出:Usage: scoop
alias Manage scoop aliases
bucket Manage Scoop buckets
cache Show or clear the download cache
checkup Check for potential problems
cleanup Cleanup apps by removing old versions
config Get or set configuration values
create Create a custom app manifest
export Exports (an importable) list of installed apps
hold Hold an app to disable updates
home Opens the app homepage
install Install apps
prefix Returns the path to the specified app
reset Reset an app to resolve conflicts
search Search available apps
status Show status and check for new app versions
unhold Unhold an app to enable updates
uninstall Uninstall an app
update Update apps, or Scoop itself
virustotal Look for app's hash on
which Locate a shim/executable (similar to 'which' on Linux)
Type 'scoop help
安装oh-my-posh scoop install /JanDeDobbeleer/oh-my-posh/releases/latest/download/输出显⽰⽆法连接到远程服务器:WARN Scoop uses 'aria2c' for multi-connection Should it cause issues, run 'scoop config aria2-enabled false' to disable ling '7zip' (19.00) [64bit]Starting download with aria2 ...Download: Download Results:Download: gid |stat|avg speed |path/URIDownload: ======+====+===========+=======================================================Download: e12626|OK | 0.9MiB/s|C:/Users/19154/scoop/cache/7zip#19.00#https__a_nload: Status Legend:Download: (OK):download ng hash of ... ting ... g ~scoopapps7zipcurrent => ~scoopapps7zip19.00Creating shim for '7z'.Creating shortcut for 7-Zip ()'7zip' (19.00) was installed successfully!WARN error: ⽆法连接到远程服务器Couldn't find manifest for 'oh-my-posh' at the URL /JanDeDobbeleer/oh-my-posh/releases/latest/download/.在终端开启代理之后还是不⾏:WARN error: ⽆法连接到远程服务器Couldn't find manifest for '/JanDeDobbeleer/oh-my-posh/releases/latest/download/'.于是我直接⽤浏览器访问这个⽂件却是可以下载的. 把它下载到本地之后继续执⾏命令(install后⾯的参数改为本地路径):scoop install .以下就是安装oh-my-posh的json⽂件内容:{ "version": "3.151.0", "description": "A prompt theme engine for any shell", "homepage": "", "license": { "identifier": "GPL-3.0-only", "url": "/JanDeDobbeleer/oh-my-posh/blob/main/COPYING" }, "architecture": { "64bit": { "url": "/JanDeDobbeleer/oh-my-posh/releases/download/v3.151.0/posh-windows-wsl-amd64.7z", "hash": "60A1B5ED3DDE7D0D6C16BA19DF5C70F934FCEE4371D4680862DD7699BE6AF4C6" } }, "env_add_path": "bin", "checkver": { "github": "/JanDeDobbeleer/oh-my-posh" }, "post_install": [ "Write-Host 'Thanks for installing Oh my Posh.'", "Write-Host 'Have a look at /docs/installation for detailed instructions for your shell.'" ], "autoupdate": { "architecture": { "64bit": { "url": "/JanDeDobbeleer/oh-my-posh/releases/download/v$version/posh-windows-wsl-amd64.7z", "hash": { "url": "$256" } } } }}执⾏完毕之后输出:WARN Scoop uses 'aria2c' for multi-connection Should it cause issues, run 'scoop config aria2-enabled false' to disable ling 'oh-my-posh' (3.151.0) [64bit]Starting download with aria2 ...Download: Download Results:Download: gid |stat|avg speed |path/URIDownload: ======+====+===========+=======================================================Download: a3283d|OK | 167KiB/s|C:/Users/19154/scoop/cache/oh-my-posh#3.151.0#https__JanDeDobbeleer_oh-my-posh_releases_download_v3.151.0_posh-windows-wsl-amd64.7zDownload: Status Legend:Download: (OK):download ng hash of posh-windows-wsl-amd64.7z ... ting posh-windows-wsl-amd64.7z ... g ~scoopappsoh-my-poshcurrent => ~scoopappsoh-my-posh3.151.0Running Thanks for installing Oh my a look at /docs/installation for detailed instructions for your shell.'oh-my-posh' (3.151.0) was installed successfully!更新oh-my-pscoop update oh-my-posh使⽤oh-my-posh的主题主题预览⼀. 执⾏$PROFILE`会输出powershell的配置⽂件路径,如果没有就新建⼀个C:hell_1⼆. 在配置⽂件中追加⼀⾏如下代码:oh-my-posh --init --shell pwsh --config ~/. | Invoke-Expression其中~/.是本地的主题⽂件, 路径在~scoopappsoh-my-poshcurrentthemes三. 执⾏. $PROFILE命令使配置⽂件⽣效四. oh-my-posh 安装成功之后, 所有的主题存在~scoopappsoh-my-poshcurrentthemes⽂件夹下(就是⼀些json⽂件). ⽬录: C:Users19154scoopappsoh-my-poshcurrentthemesMode LastWriteTime Length Name---- ------------- ------ ---------- 2021-05-18 18:48 1640 ------ 2021-05-18 18:48 1332 ------ 2021-05-18 18:48 1213 ------ 2021-05-18 18:48 1145 ------ 2021-05-18 18:48 3417 ------ 2021-05-18 18:48 5216 ------ 2021-05-18 18:48 4278 ------ 2021-05-18 18:48 1713 ------ 2021-05-18 18:48 1840 ------ 2021-05-18 18:48 1592 ------ 2021-05-18 18:48 1444 ------ 2021-05-18 18:48 1438 ------ 2021-05-18 18:48 2708 ------ 2021-05-18 18:48 1709 ------ 2021-05-18 18:48 2083 ------ 2021-05-18 18:48 1824 ------ 2021-05-18 18:48 2718 ------ 2021-05-18 18:48 6515 ------ 2021-05-18 18:48 4869 ------ 2021-05-18 18:48 784 ------ 2021-05-18 18:48 1862 ------ 2021-05-18 18:48 1349 ------ 2021-05-18 18:48 2655 ------ 2021-05-18 18:48 2413 ------ 2021-05-18 18:48 2250 ------ 2021-05-18 18:48 1981 ------ 2021-05-18 18:48 1828 ------ 2021-05-18 18:48 4683 ------ 2021-05-18 18:48 2332 powerlevel10k_------ 2021-05-18 18:48 1119 powerlevel10k_------ 2021-05-18 18:48 2629 powerlevel10k_------ 2021-05-18 18:48 6245 powerlevel10k_------ 2021-05-18 18:48 1418 ------ 2021-05-18 18:48 2116 ------ 2021-05-18 18:48 1348 ------ 2021-05-18 18:48 1160 ------ 2021-05-18 18:48 55688 ------ 2021-05-18 18:48 6014 ------ 2021-05-18 18:48 5857 ------ 2021-05-18 18:48 1366 ------ 2021-05-18 18:48 2930 ------ 2021-05-18 18:48 1239 ------ 2021-05-18 18:48 1652 ------ 2021-05-18 18:48 3832 ------ 2021-05-18 18:48 2579 ------ 2021-05-18 18:48 1464
发布者:admin,转转请注明出处:http://www.yc00.com/web/1688984665a191589.html
评论列表(0条)