mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5361d09c05 |
@@ -0,0 +1,733 @@
|
||||
{
|
||||
"projectName": "starship",
|
||||
"projectOwner": "starship",
|
||||
"repoType": "github",
|
||||
"repoHost": "https://github.com",
|
||||
"files": [
|
||||
"README.md"
|
||||
],
|
||||
"badgeTemplate": "<a href=\"#contributors\"><img src=\"https://img.shields.io/badge/all%20contributors-<%= contributors.length %>-orange\" alt=\"All Contributors\"></a>",
|
||||
"commitConvention": "angular",
|
||||
"contributors": [
|
||||
{
|
||||
"login": "matchai",
|
||||
"name": "Matan Kushner",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/4658208?v=4",
|
||||
"profile": "https://twitter.com/matchai",
|
||||
"contributions": [
|
||||
"code",
|
||||
"design",
|
||||
"ideas",
|
||||
"infra",
|
||||
"maintenance",
|
||||
"review",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "johnletey",
|
||||
"name": "John Letey",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/30328854?v=4",
|
||||
"profile": "https://github.com/johnletey",
|
||||
"contributions": [
|
||||
"code",
|
||||
"ideas",
|
||||
"review",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Multimo",
|
||||
"name": "Tim Mulqueen",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/6132021?v=4",
|
||||
"profile": "http://timmulqueen.com",
|
||||
"contributions": [
|
||||
"code",
|
||||
"ideas",
|
||||
"review",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "sirMerr",
|
||||
"name": "Tiffany Le-Nguyen",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/11183523?v=4",
|
||||
"profile": "https://github.com/sirMerr",
|
||||
"contributions": [
|
||||
"ideas",
|
||||
"maintenance",
|
||||
"review",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Snuggle",
|
||||
"name": "Snuggle",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/26250962?v=4",
|
||||
"profile": "https://about.snuggi.es",
|
||||
"contributions": [
|
||||
"design",
|
||||
"ideas",
|
||||
"maintenance",
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "mehcode",
|
||||
"name": "Ryan Leckey",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/753919?v=4",
|
||||
"profile": "https://github.com/mehcode",
|
||||
"contributions": [
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "youssefhabri",
|
||||
"name": "Youssef Habri",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1578005?v=4",
|
||||
"profile": "https://github.com/youssefhabri",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "chipbuster",
|
||||
"name": "Kevin Song",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/4605384?v=4",
|
||||
"profile": "https://github.com/chipbuster",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "andrewda",
|
||||
"name": "Andrew Dassonville",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/10191084?v=4",
|
||||
"profile": "https://andrewda.me",
|
||||
"contributions": [
|
||||
"bug",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "MaT1g3R",
|
||||
"name": "MaT1g3R",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/15258494?v=4",
|
||||
"profile": "https://github.com/MaT1g3R",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "AZanellato",
|
||||
"name": "André Zanellato",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/30451287?v=4",
|
||||
"profile": "https://github.com/AZanellato",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "saghm",
|
||||
"name": "Saghm Rossi",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/5875560?v=4",
|
||||
"profile": "https://saghm.com",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "cappyzawa",
|
||||
"name": "Shu Kutsuzawa",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/12455284?v=4",
|
||||
"profile": "https://medium.com/@cappyzawa",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test",
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "iamsauravsharma",
|
||||
"name": "Saurav Sharma",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/38726015?v=4",
|
||||
"profile": "https://github.com/iamsauravsharma",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "andytom",
|
||||
"name": "Thomas O'Donnell",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/108836?v=4",
|
||||
"profile": "https://github.com/andytom",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test",
|
||||
"doc",
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "bbigras",
|
||||
"name": "Bruno Bigras",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/24027?v=4",
|
||||
"profile": "https://github.com/bbigras",
|
||||
"contributions": [
|
||||
"code",
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "wyze",
|
||||
"name": "Neil Kistner",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/186971?v=4",
|
||||
"profile": "https://neilkistner.com/",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test",
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "qstrahl",
|
||||
"name": "Quinn Strahl",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2235277?v=4",
|
||||
"profile": "http://ca.linkedin.com/in/qstrahl",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "tivervac",
|
||||
"name": "Titouan Vervack",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/3389524?v=4",
|
||||
"profile": "https://github.com/tivervac",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "oblitum",
|
||||
"name": "Francisco Lopes",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1269815?v=4",
|
||||
"profile": "http://nosubstance.me",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ahouts",
|
||||
"name": "Andrew Houts",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/16907671?v=4",
|
||||
"profile": "https://github.com/ahouts",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "nickwb",
|
||||
"name": "Nick Young",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/594211?v=4",
|
||||
"profile": "https://github.com/nickwb",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test",
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "g2p",
|
||||
"name": "Gabriel de Perthuis",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/61678?v=4",
|
||||
"profile": "https://github.com/g2p",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Hofer-Julian",
|
||||
"name": "Hofer-Julian",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/30049909?v=4",
|
||||
"profile": "https://github.com/Hofer-Julian",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "unhappychoice",
|
||||
"name": "Yuji Ueki",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/5608948?v=4",
|
||||
"profile": "http://blog.unhappychoice.com",
|
||||
"contributions": [
|
||||
"content",
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "heyrict",
|
||||
"name": "谢祯晖",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/25698503?v=4",
|
||||
"profile": "https://github.com/heyrict",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"translation",
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "bookun",
|
||||
"name": "Kutsuzawa Ryo",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/10346162?v=4",
|
||||
"profile": "https://twitter.com/bookun2851",
|
||||
"contributions": [
|
||||
"review",
|
||||
"code",
|
||||
"test",
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "hdevalke",
|
||||
"name": "hdevalke",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/2261239?v=4",
|
||||
"profile": "https://github.com/hdevalke",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jakubclark",
|
||||
"name": "Kuba Clark",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/19486495?v=4",
|
||||
"profile": "https://github.com/jakubclark",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "gimbar",
|
||||
"name": "Gimbar",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/862483?v=4",
|
||||
"profile": "http://breax.org",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "TomHotston",
|
||||
"name": "Tom Hotston",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/22729355?v=4",
|
||||
"profile": "http://tomhotston.net",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "bijancn",
|
||||
"name": "Bijan Chokoufe Nejad",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2117164?v=4",
|
||||
"profile": "https://github.com/bijancn",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test",
|
||||
"review"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "yuri1969",
|
||||
"name": "yuri",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/13468636?v=4",
|
||||
"profile": "https://github.com/yuri1969",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "TsubasaKawajiri",
|
||||
"name": "TsubasaKawajiri",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/39114857?v=4",
|
||||
"profile": "https://github.com/TsubasaKawajiri",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "qryxip",
|
||||
"name": "Ryo Yamashita",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/14125495?v=4",
|
||||
"profile": "https://github.com/qryxip",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "pbzweihander",
|
||||
"name": "Thomas Lee",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/15262528?v=4",
|
||||
"profile": "https://pbzweihander.github.io",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "pt2121",
|
||||
"name": "(´⌣`ʃƪ)",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/616399?v=4",
|
||||
"profile": "https://pt2121.github.io",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Southclaws",
|
||||
"name": "Barnaby Keene",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1636971?v=4",
|
||||
"profile": "https://southcla.ws",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "keawade",
|
||||
"name": "Keith Wade",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/7308850?v=4",
|
||||
"profile": "http://keawade.io/",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "LukeAI",
|
||||
"name": "LukeAI",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/43993778?v=4",
|
||||
"profile": "https://github.com/LukeAI",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "zekesonxx",
|
||||
"name": "Zach Mertes",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/965509?v=4",
|
||||
"profile": "https://github.com/zekesonxx",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "davidkna",
|
||||
"name": "David Knaack",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/835177?v=4",
|
||||
"profile": "https://github.com/davidkna",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "CSumm",
|
||||
"name": "Carl Summers",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/31711543?v=4",
|
||||
"profile": "https://github.com/CSumm",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "SLMT",
|
||||
"name": "Yushan Lin",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/6824412?v=4",
|
||||
"profile": "http://www.slmt.tw",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "weihanglo",
|
||||
"name": "Weihang Lo",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/14314532?v=4",
|
||||
"profile": "https://weihanglo.tw",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "pinshan",
|
||||
"name": "pinshan",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/7709675?v=4",
|
||||
"profile": "https://github.com/pinshan",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "brianlow",
|
||||
"name": "Brian Low",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/938138?v=4",
|
||||
"profile": "https://github.com/brianlow",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "matiaskotlik",
|
||||
"name": "Matias Kotlik",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/20362627?v=4",
|
||||
"profile": "http://matiaskotlik.github.io",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "marblenix",
|
||||
"name": "marblenix",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/6401427?v=4",
|
||||
"profile": "https://marblenix.com",
|
||||
"contributions": [
|
||||
"infra",
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "weirongxu",
|
||||
"name": "Raidou",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1709861?v=4",
|
||||
"profile": "https://github.com/weirongxu",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "rpl",
|
||||
"name": "Luca Greco",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/11484?v=4",
|
||||
"profile": "https://github.com/rpl",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "lucarin91",
|
||||
"name": "Luca Rinaldi",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/6934358?v=4",
|
||||
"profile": "https://lucar.in",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "REBELinBLUE",
|
||||
"name": "Stephen Ball",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/2143908?v=4",
|
||||
"profile": "https://github.com/REBELinBLUE",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "houqp",
|
||||
"name": "Qingping Hou",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/670302?v=4",
|
||||
"profile": "http://about.houqp.me",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "wendorf",
|
||||
"name": "Dan Wendorf",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/407342?v=4",
|
||||
"profile": "https://github.com/wendorf",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "popey",
|
||||
"name": "Alan Pope",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1841272?v=4",
|
||||
"profile": "http://popey.com/",
|
||||
"contributions": [
|
||||
"infra"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "BuggStream",
|
||||
"name": "BuggStream",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/51194915?v=4",
|
||||
"profile": "https://github.com/BuggStream",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jonstodle",
|
||||
"name": "Jon Grythe Stødle",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1719761?v=4",
|
||||
"profile": "http://jonstodle.com",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "JasonEtco",
|
||||
"name": "Jason Etcovitch",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/10660468?v=4",
|
||||
"profile": "https://jasonet.co",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "etiennemabille",
|
||||
"name": "Etienne Mabille",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/11175343?v=4",
|
||||
"profile": "https://github.com/etiennemabille",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Scotsguy",
|
||||
"name": "AppleTheGolden",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/20385973?v=4",
|
||||
"profile": "https://github.com/Scotsguy",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "mfs",
|
||||
"name": "Mike Sampson",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/481987?v=4",
|
||||
"profile": "http://sda.io",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dominikbraun",
|
||||
"name": "Dominik Braun",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/36575275?v=4",
|
||||
"profile": "https://sternentstehung.de",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dten",
|
||||
"name": "David Hewson",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1019038?v=4",
|
||||
"profile": "https://github.com/dten",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "gkeep",
|
||||
"name": "Gennady Koshkin",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/20600053?v=4",
|
||||
"profile": "https://github.com/gkeep",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "filalex77",
|
||||
"name": "Oleksii Filonenko",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/12615679?v=4",
|
||||
"profile": "https://blog.brightone.space",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ivanovart",
|
||||
"name": "Artem Ivanov",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/5867379?v=4",
|
||||
"profile": "https://github.com/ivanovart",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "pjbull",
|
||||
"name": "Peter Bull",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1799186?v=4",
|
||||
"profile": "http://www.drivendata.org",
|
||||
"contributions": [
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "m0nhawk",
|
||||
"name": "Andrew Prokhorenkov",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/8220926?v=4",
|
||||
"profile": "https://andrewpro.me",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "chirsz-ever",
|
||||
"name": "chirsz",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/31474766?v=4",
|
||||
"profile": "https://github.com/chirsz-ever",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
"skipCi": true
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
comment: false
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 5%
|
||||
patch:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 5%
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"incremental": true,
|
||||
"typescript": {
|
||||
"indentWidth": 4
|
||||
},
|
||||
"json": {},
|
||||
"markdown": {
|
||||
"lineWidth": 100
|
||||
},
|
||||
"toml": {},
|
||||
"includes": [
|
||||
"docs/**/*.{ts,js,cjs,mjs}",
|
||||
"**/*.{md,toml,json}"
|
||||
],
|
||||
"excludes": [
|
||||
"CHANGELOG.md",
|
||||
"docs/.vuepress/dist/**",
|
||||
"**/node_modules",
|
||||
"**/*-lock.json",
|
||||
".github/*",
|
||||
"docs/??-??/**",
|
||||
"docs/??-???/**",
|
||||
"docs/???-??/**",
|
||||
"docs/???-???/**",
|
||||
"target/"
|
||||
],
|
||||
"plugins": [
|
||||
"https://github.com/dprint/dprint-plugin-typescript/releases/download/0.89.1/plugin.wasm",
|
||||
"https://github.com/dprint/dprint-plugin-json/releases/download/0.19.1/plugin.wasm",
|
||||
"https://github.com/dprint/dprint-plugin-markdown/releases/download/0.16.3/plugin.wasm",
|
||||
"https://github.com/dprint/dprint-plugin-toml/releases/download/0.6.0/plugin.wasm"
|
||||
]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
/src/init/* text eol=lf
|
||||
*.sh text eol=lf
|
||||
/.github/config-schema.json text eol=lf
|
||||
+1
-2
@@ -1,2 +1 @@
|
||||
github: starship
|
||||
open_collective: starship
|
||||
github: matchai
|
||||
|
||||
@@ -9,12 +9,12 @@ assignees: ''
|
||||
|
||||
<!--
|
||||
─────────────────────────────────────────────
|
||||
⚠️ IMPORTANT: Please run the following command to create an issue:
|
||||
⚠️ IMPORTANT: Please run the following command to create an issue:
|
||||
|
||||
starship bug-report
|
||||
|
||||
starship bug-report
|
||||
|
||||
An issue will be pre-populated with your system's configuration,
|
||||
making the process a whole lot quicker 😊
|
||||
An issue will be pre-populated with your system's configuration,
|
||||
making the process a whole lot quicker 😊
|
||||
─────────────────────────────────────────────
|
||||
-->
|
||||
|
||||
@@ -36,30 +36,24 @@ assignees: ''
|
||||
- Starship version: [the output of `starship --version`]
|
||||
- Shell type: [fish, zsh]
|
||||
- Shell version: [the output of `fish --version` or `zsh --version`]
|
||||
- Shell plugin manager: [if present, e.g. oh-my-fish, oh-my-zsh, fisher, antigen]
|
||||
- Shell plugin manager: [e.g. oh-my-fish, oh-my-zsh, fisher, antigen]
|
||||
- Terminal emulator: [e.g. iTerm, Hyper, Terminator]
|
||||
- Operating system: [e.g. macOS 10.13.4, Windows 10]
|
||||
|
||||
#### Relevant Shell Configuration
|
||||
<!--
|
||||
<!--
|
||||
Based on the shell you use, please paste the appropriate configuration.
|
||||
The default location for your shell is:
|
||||
Bash: ~/.bashrc
|
||||
Zsh: ~/.zshrc
|
||||
Fish: ~/.config/fish/config.fish
|
||||
Xonsh: ~/.config/xonsh/rc.xsh
|
||||
Elvish: ~/.config/elvish/rc.elv
|
||||
Nushell: $nu.config-path
|
||||
Ion: ~/.config/ion/initrc
|
||||
Fish users: ~/.config/fish/config.fish
|
||||
Zsh users: ~/.zshrc
|
||||
-->
|
||||
|
||||
```
|
||||
```bash
|
||||
# Your configuration here
|
||||
```
|
||||
|
||||
#### Starship Configuration
|
||||
<!-- Can be found in ~/.config/starship.toml -->
|
||||
|
||||
```toml
|
||||
```bash
|
||||
# Your configuration here
|
||||
```
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 🙏 Ask a question
|
||||
url: https://github.com/starship/starship/discussions/new?category=q-a
|
||||
about: Ask the community for help
|
||||
@@ -10,6 +10,12 @@
|
||||
<!--- If it fixes an open issue, please link to the issue here. -->
|
||||
Closes #
|
||||
|
||||
#### Types of changes
|
||||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
|
||||
#### Screenshots (if appropriate):
|
||||
|
||||
#### How Has This Been Tested?
|
||||
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
{{ if .Versions -}}
|
||||
<a name="unreleased"></a>
|
||||
## [Unreleased]
|
||||
|
||||
{{ if .Unreleased.CommitGroups -}}
|
||||
{{ range .Unreleased.CommitGroups -}}
|
||||
### {{ .Title }}
|
||||
{{ range .Commits -}}
|
||||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ range .Versions }}
|
||||
<a name="{{ .Tag.Name }}"></a>
|
||||
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
|
||||
{{ range .CommitGroups -}}
|
||||
### {{ .Title }}
|
||||
{{ range .Commits -}}
|
||||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .RevertCommits -}}
|
||||
### Reverts
|
||||
{{ range .RevertCommits -}}
|
||||
- {{ .Revert.Header }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .NoteGroups -}}
|
||||
{{ range .NoteGroups -}}
|
||||
### {{ .Title }}
|
||||
{{ range .Notes }}
|
||||
{{ .Body }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .Versions }}
|
||||
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
|
||||
{{ range .Versions -}}
|
||||
{{ if .Tag.Previous -}}
|
||||
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
{{ range .Versions }}
|
||||
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
|
||||
|
||||
{{ range .CommitGroups -}}
|
||||
### {{ .Title }}
|
||||
|
||||
{{ range .Commits -}}
|
||||
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .RevertCommits -}}
|
||||
### Reverts
|
||||
|
||||
{{ range .RevertCommits -}}
|
||||
* {{ .Revert.Header }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
{{- if .NoteGroups -}}
|
||||
{{ range .NoteGroups -}}
|
||||
### {{ .Title }}
|
||||
|
||||
{{ range .Notes }}
|
||||
{{ .Body }}
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
style: github
|
||||
template: CHANGELOG.tpl.md
|
||||
info:
|
||||
title: CHANGELOG
|
||||
repository_url: https://github.com/starship/starship
|
||||
options:
|
||||
commits:
|
||||
# filters:
|
||||
# Type:
|
||||
# - feat
|
||||
# - fix
|
||||
# - perf
|
||||
# - refactor
|
||||
commit_groups:
|
||||
title_maps:
|
||||
feat: Features
|
||||
fix: Bug Fixes
|
||||
perf: Performance Improvements
|
||||
refactor: Code Refactoring
|
||||
ci: Continuous Integration
|
||||
header:
|
||||
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
|
||||
pattern_maps:
|
||||
- Type
|
||||
- Scope
|
||||
- Subject
|
||||
notes:
|
||||
keywords:
|
||||
- BREAKING CHANGE
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
style: github
|
||||
template: RELEASE.tpl.md
|
||||
info:
|
||||
repository_url: https://github.com/starship/starship
|
||||
options:
|
||||
commits:
|
||||
# filters:
|
||||
# Type:
|
||||
# - feat
|
||||
# - fix
|
||||
# - perf
|
||||
# - refactor
|
||||
commit_groups:
|
||||
title_maps:
|
||||
feat: Features
|
||||
fix: Bug Fixes
|
||||
perf: Performance Improvements
|
||||
refactor: Code Refactoring
|
||||
ci: Continuous Integration
|
||||
header:
|
||||
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
|
||||
pattern_maps:
|
||||
- Type
|
||||
- Scope
|
||||
- Subject
|
||||
notes:
|
||||
keywords:
|
||||
- BREAKING CHANGE
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,78 +0,0 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
// stripped-down config:base
|
||||
":prHourlyLimit2",
|
||||
":prConcurrentLimit10",
|
||||
"group:monorepos",
|
||||
"group:recommended",
|
||||
"workarounds:all",
|
||||
// automerge minor updates
|
||||
":automergeMinor",
|
||||
":automergeBranch"
|
||||
],
|
||||
"labels": ["📦 dependencies"],
|
||||
"semanticCommits": "enabled",
|
||||
"semanticCommitType": "build",
|
||||
"rangeStrategy": "bump",
|
||||
"rebaseWhen": "conflicted",
|
||||
"packageRules": [
|
||||
// group updates to related packages
|
||||
{
|
||||
"groupName": "clap crates",
|
||||
"matchDatasources": ["crate"],
|
||||
"matchPackagePrefixes": ["clap"]
|
||||
},
|
||||
{
|
||||
"groupName": "gitoxide crates",
|
||||
"matchDatasources": ["crate"],
|
||||
"matchPackagePrefixes": ["gix"]
|
||||
},
|
||||
{
|
||||
"groupName": "pest crates",
|
||||
"matchDatasources": ["crate"],
|
||||
"matchPackagePrefixes": ["pest"]
|
||||
},
|
||||
{
|
||||
"groupName": "toml crates",
|
||||
"matchDatasources": ["crate"],
|
||||
"matchPackagePrefixes": ["toml"]
|
||||
},
|
||||
{
|
||||
"groupName": "unicode crates",
|
||||
"matchDatasources": ["crate"],
|
||||
"matchPackagePrefixes": ["unicode"]
|
||||
},
|
||||
{
|
||||
"groupName": "dprint plugins",
|
||||
"matchPackagePrefixes": ["dprint"],
|
||||
"extends": ["schedule:weekly"]
|
||||
},
|
||||
{
|
||||
"groupName": "npm",
|
||||
"matchDatasources": ["npm"],
|
||||
"extends": ["schedule:weekly"]
|
||||
},
|
||||
// Update (rust) lockfiles weekly
|
||||
{
|
||||
"matchDatasources": ["crate"],
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"extends": ["schedule:weekly"]
|
||||
}
|
||||
}
|
||||
],
|
||||
// custom regex update managers
|
||||
"regexManagers": [
|
||||
{
|
||||
"fileMatch": ["(^|\\/)\\.?dprint.json"],
|
||||
"matchStrings": ["\"https://github.com/(?<depName>.+)/releases/download/(?<currentValue>.+)/plugin.wasm\""],
|
||||
"datasourceTemplate": "github-releases"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["^(workflow-templates|\\.github\\/workflows)\\/[^/]+\\.ya?ml$"],
|
||||
"matchStrings": ["cargo install.*--version (?<currentValue>\\S+).*\\s(?<depName>\\S+)"],
|
||||
"datasourceTemplate": "crate"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
# Run pre-translate with translation memory, all files/langs, at midnight daily.
|
||||
name: Crowdin Updates
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
trigger_crowdin_tm:
|
||||
name: Crowdin Translation Memory Trigger
|
||||
runs-on: ubuntu-latest
|
||||
# Prevent this workflow from running (and failing) on forks
|
||||
if: github.repository == 'starship/starship'
|
||||
steps:
|
||||
- uses: starship/crowdin-pretranslate-action@v0.1.1
|
||||
with:
|
||||
project_id: 372655
|
||||
api_key: ${{ secrets.CROWDIN_API_TOKEN }}
|
||||
@@ -1,65 +0,0 @@
|
||||
name: Format + Docs Workflow
|
||||
on:
|
||||
push:
|
||||
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
|
||||
pull_request:
|
||||
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
|
||||
|
||||
jobs:
|
||||
# Run the dprint code formatter for documentation
|
||||
dprint:
|
||||
name: Dprint [Docs Formatter]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Docs | Format
|
||||
uses: dprint/check@v2.2
|
||||
|
||||
# Validate preset files
|
||||
taplo:
|
||||
name: Taplo [Preset schema validation]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install | Taplo
|
||||
run: cargo install --debug --locked --version 0.9.0 taplo-cli
|
||||
- name: Presets | Validate with schema
|
||||
run: taplo lint --schema "file://${GITHUB_WORKSPACE}/.github/config-schema.json" docs/.vuepress/public/presets/toml/*.toml
|
||||
|
||||
# If this is not a Crowdin PR, block changes to translated documentation
|
||||
block-crowdin:
|
||||
name: Block Translated Changes
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
steps:
|
||||
- name: Prevent File Change
|
||||
uses: xalvarez/prevent-file-change-action@v1.6.0
|
||||
if: ${{ github.event.pull_request.head.ref != 'i18n_master' }}
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
pattern: docs/[a-z][a-z][a-z]?-[A-Z][A-Z]?/.*
|
||||
|
||||
# Vitepress build
|
||||
vitepress:
|
||||
name: Vitepress [Build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
cache-dependency-path: docs/package-lock.json
|
||||
|
||||
- name: Setup | Install dependencies
|
||||
run: npm install
|
||||
working-directory: docs
|
||||
|
||||
- name: Build | Build docs site
|
||||
run: npm run build
|
||||
working-directory: docs
|
||||
@@ -1,33 +0,0 @@
|
||||
name: Publish Docs
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
publish_docs:
|
||||
name: Publish docs to Netlify
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
cache-dependency-path: docs/package-lock.json
|
||||
|
||||
- name: Setup | Install dependencies
|
||||
run: npm install
|
||||
working-directory: docs
|
||||
|
||||
- name: Build | Build docs site
|
||||
run: npm run build
|
||||
working-directory: docs
|
||||
|
||||
- name: Publish
|
||||
uses: netlify/actions/cli@master
|
||||
with:
|
||||
args: deploy --prod --dir=docs/.vitepress/dist
|
||||
env:
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
@@ -1,370 +0,0 @@
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_NET_RETRY: 10
|
||||
RUST_BACKTRACE: short
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.7
|
||||
|
||||
jobs:
|
||||
# Update release PR
|
||||
release_please:
|
||||
name: Release Please
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'starship/starship'
|
||||
outputs:
|
||||
release_created: ${{ steps.release.outputs.release_created }}
|
||||
tag_name: ${{ steps.release.outputs.tag_name }}
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v4
|
||||
id: release
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release-type: rust
|
||||
|
||||
# Build sources for every OS
|
||||
github_build:
|
||||
name: Build release binaries
|
||||
needs: release_please
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-linux-gnu.tar.gz
|
||||
|
||||
- target: x86_64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: i686-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-i686-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: aarch64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-aarch64-unknown-linux-musl.tar.gz
|
||||
|
||||
- target: arm-unknown-linux-musleabihf
|
||||
os: ubuntu-latest
|
||||
name: starship-arm-unknown-linux-musleabihf.tar.gz
|
||||
|
||||
- target: x86_64-apple-darwin
|
||||
os: macOS-11
|
||||
name: starship-x86_64-apple-darwin.tar.gz
|
||||
|
||||
- target: aarch64-apple-darwin
|
||||
os: macOS-11
|
||||
name: starship-aarch64-apple-darwin.tar.gz
|
||||
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-x86_64-pc-windows-msvc.zip
|
||||
rustflags: -C target-feature=+crt-static
|
||||
|
||||
- target: i686-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-i686-pc-windows-msvc.zip
|
||||
rustflags: -C target-feature=+crt-static
|
||||
|
||||
- target: aarch64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-aarch64-pc-windows-msvc.zip
|
||||
rustflags: -C target-feature=+crt-static
|
||||
|
||||
- target: x86_64-unknown-freebsd
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-freebsd.tar.gz
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
env:
|
||||
RUSTFLAGS: ${{ matrix.rustflags || '' }}
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Setup | Install cargo-wix [Windows]
|
||||
continue-on-error: true
|
||||
# aarch64 is only supported in wix 4.0 development builds
|
||||
if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc'
|
||||
run: cargo install --version 0.3.4 cargo-wix
|
||||
env:
|
||||
# cargo-wix does not require static crt
|
||||
RUSTFLAGS: ""
|
||||
|
||||
- name: Setup | Install cross [Linux]
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: taiki-e/install-action@cross
|
||||
|
||||
- name: Build | Build [Cargo]
|
||||
if: matrix.os != 'ubuntu-latest'
|
||||
run: cargo build --release --locked --target ${{ matrix.target }}
|
||||
|
||||
- name: Build | Build [Cross]
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: cross build --release --locked --target ${{ matrix.target }}
|
||||
|
||||
- name: Build | Installer [Windows]
|
||||
continue-on-error: true
|
||||
if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc'
|
||||
run: >
|
||||
cargo wix -v --no-build --nocapture -I install/windows/main.wxs
|
||||
--target ${{ matrix.target }}
|
||||
--output target/wix/starship-${{ matrix.target }}.msi
|
||||
|
||||
- name: Post Build | Prepare artifacts [Windows]
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
7z a ../../../${{ matrix.name }} starship.exe
|
||||
cd -
|
||||
|
||||
- name: Post Build | Prepare artifacts [-nix]
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
tar czvf ../../../${{ matrix.name }} starship
|
||||
cd -
|
||||
|
||||
- name: Release | Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
path: ${{ matrix.name }}
|
||||
|
||||
- name: Release | Upload installer artifacts [Windows]
|
||||
continue-on-error: true
|
||||
if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: starship-${{ matrix.target }}.msi
|
||||
path: target/wix/starship-${{ matrix.target }}.msi
|
||||
|
||||
# Notarize starship binaries for MacOS and build notarized pkg installers
|
||||
notarize_and_pkgbuild:
|
||||
runs-on: macos-latest
|
||||
continue-on-error: true
|
||||
needs: [github_build, merge_crowdin_pr]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-apple-darwin
|
||||
arch: x86_64
|
||||
name: starship-x86_64-apple-darwin.tar.gz
|
||||
pkgname: starship-x86_64-apple-darwin.pkg
|
||||
|
||||
- target: aarch64-apple-darwin
|
||||
arch: aarch64
|
||||
name: starship-aarch64-apple-darwin.tar.gz
|
||||
pkgname: starship-aarch64-apple-darwin.pkg
|
||||
|
||||
env:
|
||||
KEYCHAIN_FILENAME: app-signing.keychain-db
|
||||
KEYCHAIN_ENTRY: AC_PASSWORD
|
||||
STARSHIP_VERSION: ${{ needs.release_please.outputs.tag_name }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Required to include the recently merged Crowdin PR
|
||||
ref: master
|
||||
|
||||
- name: Notarize | Set up secrets
|
||||
env:
|
||||
APP_CERTIFICATE_BASE64: ${{ secrets.APPLEDEV_APPSIGNKEY_BASE64 }}
|
||||
INSTALL_CERTIFICATE_BASE64: ${{ secrets.APPLEDEV_INSTALLERSIGNKEY_BASE64 }}
|
||||
P12_PASSWORD: ${{ secrets.APPLEDEV_SIGNKEY_PASS }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.APPLEDEV_SIGNKEY_PASS }}
|
||||
APPLEID_USERNAME: ${{ secrets.APPLEDEV_ID_NAME }}
|
||||
APPLEID_TEAMID: ${{ secrets.APPLEDEV_TEAM_ID }}
|
||||
APPLEID_PASSWORD: ${{ secrets.APPLEDEV_PASSWORD }}
|
||||
run: |
|
||||
APP_CERTIFICATE_PATH="$RUNNER_TEMP/app_certificate.p12"
|
||||
INSTALL_CERTIFICATE_PATH="$RUNNER_TEMP/install_certificate.p12"
|
||||
KEYCHAIN_PATH="$RUNNER_TEMP/$KEYCHAIN_FILENAME"
|
||||
|
||||
# import certificates from secrets
|
||||
echo -n "$APP_CERTIFICATE_BASE64" | base64 --decode --output $APP_CERTIFICATE_PATH
|
||||
echo -n "$INSTALL_CERTIFICATE_BASE64" | base64 --decode --output $INSTALL_CERTIFICATE_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||
|
||||
# import certificates to keychain
|
||||
security import $APP_CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security import $INSTALL_CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
# Add Apple Developer ID credentials to keychain
|
||||
xcrun notarytool store-credentials "$KEYCHAIN_ENTRY" --team-id "$APPLEID_TEAMID" --apple-id "$APPLEID_USERNAME" --password "$APPLEID_PASSWORD" --keychain "$KEYCHAIN_PATH"
|
||||
|
||||
- name: Setup | Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Notarize | Build docs
|
||||
run: |
|
||||
cd docs
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: Notarize | Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
path: artifacts
|
||||
|
||||
- name: Notarize | Unpack Binaries
|
||||
run: tar xf artifacts/${{ matrix.name }}
|
||||
|
||||
- name: Notarize | Build, Sign, and Notarize Pkg
|
||||
run: bash install/macos_packages/build_and_notarize.sh starship docs ${{ matrix.arch }} ${{ matrix.pkgname }}
|
||||
|
||||
- name: Notarize | Upload Notarized Flat Installer
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.pkgname }}
|
||||
path: ${{ matrix.pkgname }}
|
||||
|
||||
- name: Notarize | Package Notarized Binary
|
||||
run: tar czvf ${{ matrix.name }} starship
|
||||
|
||||
- name: Notarize | Upload Notarized Binary
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
path: ${{ matrix.name }}
|
||||
overwrite: true
|
||||
|
||||
- name: Cleanup Secrets
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
KEYCHAIN_PATH="$RUNNER_TEMP/$KEYCHAIN_FILENAME"
|
||||
security delete-keychain $KEYCHAIN_PATH
|
||||
|
||||
# Create GitHub release with Rust build targets and release notes
|
||||
upload_artifacts:
|
||||
name: Add Build Artifacts to Release
|
||||
needs: [release_please, github_build, notarize_and_pkgbuild]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Setup | Checksums
|
||||
run: for file in starship-*/starship-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
|
||||
|
||||
- name: Setup | Publish Release
|
||||
run: gh release edit ${{ needs.release_please.outputs.tag_name }} --draft=false --repo=starship/starship
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build | Add Artifacts to Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: starship-*/starship-*
|
||||
tag_name: ${{ needs.release_please.outputs.tag_name }}
|
||||
|
||||
# Publish starship to Crates.io
|
||||
cargo_publish:
|
||||
name: Publish Cargo Package
|
||||
runs-on: ubuntu-latest
|
||||
needs: [release_please, upload_artifacts]
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Build | Publish
|
||||
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
|
||||
update_brew_formula:
|
||||
name: Update Brew Formula
|
||||
runs-on: ubuntu-latest
|
||||
needs: [release_please, upload_artifacts]
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
steps:
|
||||
- uses: mislav/bump-homebrew-formula-action@v3.1
|
||||
with:
|
||||
formula-name: starship
|
||||
tag-name: ${{ needs.release_please.outputs.tag_name }}
|
||||
env:
|
||||
# Used for creating the formula update PR
|
||||
COMMITTER_TOKEN: ${{ secrets.GH_PAT }}
|
||||
# Used for verifying the SHA256 sum of the draft release
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
||||
|
||||
winget_update:
|
||||
name: Update Winget Manifest
|
||||
runs-on: windows-latest
|
||||
needs: [release_please, github_build, upload_artifacts]
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
env:
|
||||
URL_64: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-x86_64-pc-windows-msvc.msi
|
||||
URL_32: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-i686-pc-windows-msvc.msi
|
||||
steps:
|
||||
- run: |
|
||||
$version = '${{ needs.release_please.outputs.tag_name }}'.replace('v', '')
|
||||
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
||||
./wingetcreate.exe update Starship.Starship -s -v $version -u $env:URL_64 $env:URL_32 -t ${{ secrets.GH_PAT }}
|
||||
|
||||
choco_update:
|
||||
name: Update Chocolatey Package
|
||||
runs-on: windows-latest
|
||||
needs: [release_please, github_build, upload_artifacts]
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup | Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
- run: pwsh ./install/windows/choco/update.ps1
|
||||
env:
|
||||
STARSHIP_VERSION: ${{ needs.release_please.outputs.tag_name }}
|
||||
PUSH_TOKEN: ${{ secrets.CHOCO_TOKEN }}
|
||||
|
||||
merge_crowdin_pr:
|
||||
name: Merge Crowdin PR
|
||||
runs-on: ubuntu-latest
|
||||
needs: release_please
|
||||
if: ${{ needs.release_please.outputs.release_created == 'true' }}
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Merge | Merge Crowdin PR
|
||||
run: gh pr merge i18n_master --squash --repo=starship/starship
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
||||
|
||||
publish_docs:
|
||||
name: Trigger docs deployment
|
||||
runs-on: ubuntu-latest
|
||||
needs: merge_crowdin_pr
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Trigger workflow dispatch
|
||||
run: gh workflow run publish-docs.yml
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,29 +0,0 @@
|
||||
name: Security audit
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**/Cargo.toml"
|
||||
- "**/Cargo.lock"
|
||||
push:
|
||||
paths:
|
||||
- "**/Cargo.toml"
|
||||
- "**/Cargo.lock"
|
||||
jobs:
|
||||
security_audit:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
checks:
|
||||
- advisories
|
||||
- bans licenses sources
|
||||
|
||||
# Prevent sudden announcement of a new advisory from failing ci:
|
||||
continue-on-error: ${{ matrix.checks == 'advisories' }}
|
||||
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Test | Security Audit
|
||||
uses: EmbarkStudios/cargo-deny-action@v1.5.15
|
||||
with:
|
||||
command: check ${{ matrix.checks }}
|
||||
@@ -1,10 +0,0 @@
|
||||
name: Spell Check
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
typos:
|
||||
name: Spell Check with Typos
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: crate-ci/typos@v1.18.2
|
||||
+253
-170
@@ -9,219 +9,302 @@ on:
|
||||
- "docs/**"
|
||||
- "**.md"
|
||||
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_NET_RETRY: 10
|
||||
RUST_BACKTRACE: short
|
||||
RUSTFLAGS: "-D warnings"
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.7
|
||||
|
||||
jobs:
|
||||
# Run the `rustfmt` code formatter
|
||||
rustfmt:
|
||||
name: Rustfmt [Formatter]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
|
||||
- name: Build | Format
|
||||
run: cargo fmt --all -- --check
|
||||
override: true
|
||||
- run: rustup component add rustfmt
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
# Run the `clippy` linting tool
|
||||
clippy:
|
||||
name: Clippy [Linter]
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: clippy
|
||||
override: true
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --all-targets --all-features -- -D clippy::all
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Build | Lint
|
||||
uses: giraffate/clippy-action@94e9bd8deab2618756ec5380f12eb35bcb0a88ca
|
||||
# Run a security audit on dependencies
|
||||
cargo_audit:
|
||||
name: Cargo Audit [Security]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- run: cargo install --force cargo-audit
|
||||
- run: cargo generate-lockfile
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: audit
|
||||
|
||||
# Ensure that the project could be successfully compiled
|
||||
cargo_check:
|
||||
name: Compile
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Build | Check
|
||||
run: cargo check --workspace --locked
|
||||
|
||||
# Ensure that the project could be successfully compiled with no features enabled
|
||||
cargo_check_no_features:
|
||||
name: Compile with no features enabled
|
||||
needs: cargo_check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Build | Check
|
||||
run: cargo check --workspace --locked --no-default-features
|
||||
|
||||
# Ensure that the project could be successfully compiled with all features enabled
|
||||
cargo_check_all_features:
|
||||
name: Compile with all features enabled
|
||||
needs: cargo_check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Build | Check
|
||||
run: cargo check --workspace --locked --all-features
|
||||
|
||||
# Check if config schema needs to be updated to reflect updated configuration options
|
||||
check_if_config_schema_up_to_date:
|
||||
name: Check if config schema is up to date
|
||||
needs: cargo_check
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
checks: write
|
||||
contents: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Run | Generate Schema
|
||||
run: cargo run --locked --features config-schema -- config-schema > .github/config-schema.json
|
||||
|
||||
- name: Check | Detect Changes
|
||||
uses: reviewdog/action-suggester@v1.11.0
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
tool_name: starship config-schema
|
||||
filter_mode: nofilter
|
||||
fail_on_error: 'true'
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --all
|
||||
|
||||
# Run tests on Linux, macOS, and Windows
|
||||
# On both Rust stable and Rust nightly
|
||||
test:
|
||||
name: Test Suite
|
||||
needs: [cargo_check]
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: cargo_check # First check then run expansive tests
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||
rust: [stable, nightly]
|
||||
include:
|
||||
- os: windows-latest
|
||||
rustflags: -C target-feature=+crt-static
|
||||
env:
|
||||
RUSTFLAGS: ${{ matrix.rustflags || '' }}
|
||||
steps:
|
||||
- name: Setup | Checkout
|
||||
uses: actions/checkout@v4
|
||||
# Checkout the branch being tested
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Cache files between builds
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
# Install all the required dependencies for testing
|
||||
- name: Setup | Rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
components: llvm-tools-preview
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: Setup | Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
# Install Python at a fixed version
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: "3.7.6"
|
||||
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
|
||||
# For windows installer test
|
||||
# On stable rust & main repo pushes only
|
||||
- name: Install cargo-wix [Windows]
|
||||
continue-on-error: true
|
||||
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
|
||||
run: cargo install --version 0.3.4 cargo-wix
|
||||
env:
|
||||
# cargo-wix does not require static crt
|
||||
RUSTFLAGS: ""
|
||||
# Install dotnet at a fixed version
|
||||
- uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: "2.2.402"
|
||||
|
||||
# Install Mercurial (pre-installed on Linux and windows)
|
||||
- name: Setup | Mercurial (macos)
|
||||
- name: Install Mercurial (macos)
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: brew install mercurial
|
||||
env:
|
||||
HGPYTHON3: 1
|
||||
run: pip install mercurial
|
||||
|
||||
# Install Terraform at a fixed version
|
||||
- uses: volcano-coffee-company/setup-terraform@v1
|
||||
with:
|
||||
version: "0.12.14"
|
||||
|
||||
# Run the ignored tests that expect the above setup
|
||||
- name: Build | Test
|
||||
run: "cargo llvm-cov
|
||||
--all-features
|
||||
--locked
|
||||
--workspace
|
||||
--lcov --output-path lcov.info
|
||||
-- --include-ignored"
|
||||
env:
|
||||
# Avoid -D warnings on nightly builds
|
||||
RUSTFLAGS: ""
|
||||
|
||||
- name: Build | Installer [Windows]
|
||||
continue-on-error: true
|
||||
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
|
||||
run: cargo wix --dbg-build -v --nocapture -I install/windows/main.wxs
|
||||
|
||||
- name: Build | Chocolatey Package [Windows]
|
||||
continue-on-error: true
|
||||
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
|
||||
run: |
|
||||
# Setup dummy release artifacts
|
||||
foreach ($arch in @("aarch64", "i686", "x86_64")) {
|
||||
foreach ($ext in @("zip", "msi")) {
|
||||
New-Item -ItemType Directory -Path ./starship-$arch-pc-windows-msvc.$ext
|
||||
New-Item -ItemType File -Path ./starship-$arch-pc-windows-msvc.$ext/starship-$arch-pc-windows-msvc.$ext
|
||||
}
|
||||
}
|
||||
# Build package
|
||||
pwsh ./install/windows/choco/update.ps1
|
||||
env:
|
||||
STARSHIP_VERSION: v1.2.3
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
if: github.repository == 'starship/starship'
|
||||
- name: Run all tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: lcov.info
|
||||
command: test
|
||||
args: -- -Z unstable-options --include-ignored
|
||||
|
||||
# Publish starship to Crates.io
|
||||
cargo_publish:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
name: Publish Cargo Package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- run: cargo login $CRATES_IO_TOKEN
|
||||
- run: cargo publish
|
||||
env:
|
||||
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
|
||||
update_brew_formula:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
name: Update Brew Formula
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
echo "https://matchai:$HOMEBREW_GITHUB_API_TOKEN@github.com" > ~/.git-credentials
|
||||
git config --global credential.helper store
|
||||
git config --global user.name "Matan Kushner"
|
||||
git config --global user.email "hello@matchai.dev"
|
||||
|
||||
cd $(brew --repo homebrew/core)
|
||||
git fetch origin
|
||||
sudo git reset --hard origin/master
|
||||
cd -
|
||||
|
||||
brew bump-formula-pr --url=https://github.com/starship/starship/archive/$(git describe --tags).tar.gz --message="Automated release pull request using continuous integration." --no-browse -v starship --force
|
||||
env:
|
||||
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
|
||||
# Build sources for every OS
|
||||
github_build:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
name: Build release binaries
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- x86_64-unknown-linux-gnu
|
||||
- x86_64-unknown-linux-musl
|
||||
- x86_64-apple-darwin
|
||||
- x86_64-pc-windows-msvc
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-linux-gnu.tar.gz
|
||||
- target: x86_64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
name: starship-x86_64-unknown-linux-musl.tar.gz
|
||||
- target: x86_64-apple-darwin
|
||||
os: macOS-latest
|
||||
name: starship-x86_64-apple-darwin.tar.gz
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
name: starship-x86_64-pc-windows-msvc.zip
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- name: Install musl tools
|
||||
if: matrix.target == 'x86_64-unknown-linux-musl'
|
||||
run: sudo apt-get install -y musl-tools
|
||||
|
||||
- name: Build target
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release --target ${{ matrix.target }}
|
||||
|
||||
- name: Prepare build artifacts [Windows]
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
strip starship.exe
|
||||
7z a ../../../${{ matrix.name }} starship.exe
|
||||
cd -
|
||||
|
||||
- name: Prepare build artifacts [-nix]
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
cd target/${{ matrix.target }}/release
|
||||
strip starship
|
||||
tar czvf ../../../${{ matrix.name }} starship
|
||||
cd -
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ${{ matrix.name }}
|
||||
path: ${{ matrix.name }}
|
||||
|
||||
# Create GitHub release with Rust build targets and release notes
|
||||
github_release:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
name: Create GitHub Release
|
||||
needs: github_build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# These can be squashed when https://github.com/actions/download-artifact/issues/6 is closed
|
||||
- name: Download releases from github_build
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: starship-x86_64-unknown-linux-gnu.tar.gz
|
||||
path: .
|
||||
- name: Download releases from github_build
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: starship-x86_64-unknown-linux-musl.tar.gz
|
||||
path: .
|
||||
- name: Download releases from github_build
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: starship-x86_64-apple-darwin.tar.gz
|
||||
path: .
|
||||
- name: Download releases from github_build
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: starship-x86_64-pc-windows-msvc.zip
|
||||
path: .
|
||||
|
||||
- name: Generate checksums
|
||||
run: for file in starship-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
|
||||
|
||||
- name: Generate release notes
|
||||
run: |
|
||||
# Temporary fix for https://github.com/actions/setup-go/issues/14
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
|
||||
git-chglog -c .github/chglog/release.yml $(git describe --tags) > RELEASE.md
|
||||
|
||||
- name: Create GitHub release ${{ matrix.target }}
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
starship-x86_64-unknown-linux-gnu.tar.gz
|
||||
starship-x86_64-unknown-linux-gnu.tar.gz.sha256
|
||||
starship-x86_64-unknown-linux-musl.tar.gz
|
||||
starship-x86_64-unknown-linux-musl.tar.gz.sha256
|
||||
starship-x86_64-apple-darwin.tar.gz
|
||||
starship-x86_64-apple-darwin.tar.gz.sha256
|
||||
starship-x86_64-pc-windows-msvc.zip
|
||||
starship-x86_64-pc-windows-msvc.zip.sha256
|
||||
body_path: RELEASE.md
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
+2
-13
@@ -11,24 +11,13 @@ Cargo.lock
|
||||
# VSCode configuration
|
||||
.vscode/
|
||||
|
||||
# Sublime Text configuration
|
||||
*.sublime-*
|
||||
|
||||
# IntelliJ IDE configuration
|
||||
# Intellij IDE configuration
|
||||
.idea/
|
||||
/*.iml
|
||||
|
||||
# Vim swap files
|
||||
*.swp
|
||||
|
||||
# Emacs
|
||||
*~
|
||||
\#*\#
|
||||
|
||||
# Compiled files for documentation
|
||||
docs/node_modules
|
||||
docs/.vitepress/dist/
|
||||
docs/.vitepress/cache/
|
||||
|
||||
# Ignore pkg files within the install directory
|
||||
install/**/*.pkg
|
||||
docs/.vuepress/dist/
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# This file intentionally left almost blank
|
||||
#
|
||||
# The empty `rustfmt.toml` makes rustfmt use the default configuration,
|
||||
# overriding any which may be found in the contributor's home or parent
|
||||
# folders.
|
||||
-403
@@ -1,403 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
## [1.17.1](https://github.com/starship/starship/compare/v1.17.0...v1.17.1) (2024-01-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* v1.17.0 post-release fix-ups ([#5660](https://github.com/starship/starship/issues/5660)) ([89dc192](https://github.com/starship/starship/commit/89dc19214bb671fe50a8f1be79a4594e7998ddea))
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* refactor(modules): use whoami crate to get username ([#5669](https://github.com/starship/starship/issues/5669)) ([a83e107](https://github.com/starship/starship/commit/a83e10776ba37bd1ab439e5e4d0125a06e947728))
|
||||
|
||||
## [1.17.0](https://github.com/starship/starship/compare/v1.16.0...v1.17.0) (2023-12-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add additional exit status code meanings from libc ([#5412](https://github.com/starship/starship/issues/5412)) ([81c7d0c](https://github.com/starship/starship/commit/81c7d0cc5805dc10018f0589a6671e1b727a0e9c))
|
||||
* add typst module ([7b21705](https://github.com/starship/starship/commit/7b217056bdb8dcb5b328b51fa3b68fe837f9fb3c))
|
||||
* **aws:** Adding the AWS SSO CLI env variable to profile list ([#5640](https://github.com/starship/starship/issues/5640)) ([6d96df3](https://github.com/starship/starship/commit/6d96df3c6828161bb9dc922fe45ef35a1ce33771))
|
||||
* **direnv:** add new direnv module ([#5157](https://github.com/starship/starship/issues/5157)) ([e47bfba](https://github.com/starship/starship/commit/e47bfbabb9b7d6af12a29db9413a6ec03fba174b))
|
||||
* **fossil_metrics:** add fossil_metrics module ([#4874](https://github.com/starship/starship/issues/4874)) ([e867cda](https://github.com/starship/starship/commit/e867cda1eb90ba452768bd2e0738afc2fd0db613))
|
||||
* **hostname:** add detect_env_vars as option ([#5196](https://github.com/starship/starship/issues/5196)) ([43b2d42](https://github.com/starship/starship/commit/43b2d42cd526e34c5f0290e7409fbd6d3a54e908))
|
||||
* **kubernetes:** Add styling based on current context ([#4550](https://github.com/starship/starship/issues/4550)) ([6b444e0](https://github.com/starship/starship/commit/6b444e05c688f9b871d0fe4624cd5559eba1f95c))
|
||||
* R lang packages version, remove .Rprofile from rlang detection ([#5588](https://github.com/starship/starship/issues/5588)) ([5267c46](https://github.com/starship/starship/commit/5267c464eb5e4b23e44cdb7c56919991f4f67ae3))
|
||||
* **scanner:** add option not to follow symlinks ([#5325](https://github.com/starship/starship/issues/5325)) ([7b851fc](https://github.com/starship/starship/commit/7b851fc30e109213e911eec38460315872f1ae59))
|
||||
* **shell:** allow distinguishing between pwsh and powershell ([#5478](https://github.com/starship/starship/issues/5478)) ([d7a34b4](https://github.com/starship/starship/commit/d7a34b45f88ced63bd79a582c14a6b2f8ebd9544))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bash:** unbound variable error with STARSHIP_PREEXEC_READY ([#5438](https://github.com/starship/starship/issues/5438)) ([8168c21](https://github.com/starship/starship/commit/8168c21293de8118af1e95778b1eee8f26cd6d6a))
|
||||
* **docker_context:** ignore unix domain socket path from Docker Context ([#5616](https://github.com/starship/starship/issues/5616)) ([a910e09](https://github.com/starship/starship/commit/a910e094f77ba6d67349a561e5e9780becfe823a)), closes [#5548](https://github.com/starship/starship/issues/5548)
|
||||
* **git_status:** Avoid printing error on missing stash ref ([#5434](https://github.com/starship/starship/issues/5434)) ([00d3dc8](https://github.com/starship/starship/commit/00d3dc86a21d11aede96f81ffbe49babe487984e))
|
||||
* **git:** prevent `core.fsmonitor` from executing external commands ([#3981](https://github.com/starship/starship/issues/3981)) ([03278e4](https://github.com/starship/starship/commit/03278e4de4f540cbd0e346e9df878c7e6798d757))
|
||||
* **install:** do not use curl installed through snap ([#5442](https://github.com/starship/starship/issues/5442)) ([0e73817](https://github.com/starship/starship/commit/0e738175c57d5789350b996b69c5713aac03835e))
|
||||
* **pastel-powerline:** remove `$path` from docker-context module format string ([#5534](https://github.com/starship/starship/issues/5534)) ([6abc83d](https://github.com/starship/starship/commit/6abc83decdf176842985b4daa5b09771c6b93415))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **git_status:** avoid running in bare repos ([#5581](https://github.com/starship/starship/issues/5581)) ([ac4a839](https://github.com/starship/starship/commit/ac4a83910357d69950ca304a3fb41d1d39bc3592))
|
||||
* Skip unnecessary indirection in starship init zsh ([#5322](https://github.com/starship/starship/issues/5322)) ([5ca8daa](https://github.com/starship/starship/commit/5ca8daacd4ce936f97170f814a780b34bfaa486e))
|
||||
|
||||
## [1.16.0](https://github.com/starship/starship/compare/v1.15.0...v1.16.0) (2023-07-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **pwsh:** Support vi command mode indicator ([#5049](https://github.com/starship/starship/issues/5049)) ([3180509](https://github.com/starship/starship/commit/318050976b58f032a17ff4d122d21cb63faf8e3b))
|
||||
* **shlvl:** add repeat_offset for repeated symbol ([#5289](https://github.com/starship/starship/issues/5289)) ([3402f0e](https://github.com/starship/starship/commit/3402f0e82aab907a77f0967abb99d4cde512c069))
|
||||
* update the nushell init file and make it valid module and overlay ([#5188](https://github.com/starship/starship/issues/5188)) ([470aeb0](https://github.com/starship/starship/commit/470aeb09a72936a66937d68f96165a977b5c213d))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bash:** Clear out completed jobs before counting NUM_JOBS ([#5253](https://github.com/starship/starship/issues/5253)) ([0a05b5c](https://github.com/starship/starship/commit/0a05b5ca8b7f147ead6d575297ef9f34191193af))
|
||||
* **rprompt:** remove lprompt modules from `$all` again ([#5067](https://github.com/starship/starship/issues/5067)) ([b9a4b08](https://github.com/starship/starship/commit/b9a4b08ac24805061c5faaef98ccbee7b018f5f0))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **git_status:** query git stash count via gitoxide ([#5238](https://github.com/starship/starship/issues/5238)) ([410f107](https://github.com/starship/starship/commit/410f107c722a2f07737d4be01960f2621bf418dd))
|
||||
|
||||
## [1.15.0](https://github.com/starship/starship/compare/v1.14.2...v1.15.0) (2023-06-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add Solidity Module ([#5047](https://github.com/starship/starship/issues/5047)) ([b2ebd5b](https://github.com/starship/starship/commit/b2ebd5b50c62fe5eb1cf8f5b0f79deaff2edd059))
|
||||
* add typechange to git_status module ([#4829](https://github.com/starship/starship/issues/4829)) ([edb96ca](https://github.com/starship/starship/commit/edb96cad580e5c414c34a4f64476a64a20595459))
|
||||
* **aws:** support aws sso with automatic authentication refresh ([#5170](https://github.com/starship/starship/issues/5170)) ([297176b](https://github.com/starship/starship/commit/297176b0b8b9da34176d7b278837f77f960799b1))
|
||||
* **azure:** subscription name aliases ([#4949](https://github.com/starship/starship/issues/4949)) ([27ffa37](https://github.com/starship/starship/commit/27ffa37cfdf2eff9874e543f88fa389bf5c2dae3))
|
||||
* **gcloud:** add `detect_env_vars` option ([#5166](https://github.com/starship/starship/issues/5166)) ([d07a8e3](https://github.com/starship/starship/commit/d07a8e3668838223aeeb94e810a0b29806e35f78))
|
||||
* **git_metrics:** add option to ignore submodules ([#5052](https://github.com/starship/starship/issues/5052)) ([ce01423](https://github.com/starship/starship/commit/ce014231521c981260ff7c1018acf694c65c97fe))
|
||||
* **golang:** adding `mod_version` variable ([#5177](https://github.com/starship/starship/issues/5177)) ([351bf9d](https://github.com/starship/starship/commit/351bf9d0b382adcc3e073c1a293fd815bb623f37))
|
||||
* **nodejs:** Add `expected_version` variable ([#5081](https://github.com/starship/starship/issues/5081)) ([70d2014](https://github.com/starship/starship/commit/70d2014f3447e616fb45b63b2793b256e19aa631))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bump libz-ng-sys ([#5218](https://github.com/starship/starship/issues/5218)) ([6ab8f40](https://github.com/starship/starship/commit/6ab8f4061fe816a78a310c01a993a5a4690369ff))
|
||||
* **config:** Make print-config not panic without a config ([#5001](https://github.com/starship/starship/issues/5001)) ([ce7f984](https://github.com/starship/starship/commit/ce7f984932a97b4ad3cd6e6ece8e1c3b6022ba99))
|
||||
* ensure nested style variables are processed during formatting ([e5cec9e](https://github.com/starship/starship/commit/e5cec9ea50963a45bb1c209abc747ee1983dcabd))
|
||||
* **presets:** Added ($style) to format in module 'sudo' in Bracketed Segments Preset ([#5146](https://github.com/starship/starship/issues/5146)) ([1bd6db5](https://github.com/starship/starship/commit/1bd6db58307c1945c3b0cabec8d6663730394377))
|
||||
* **snap:** Update snapcraft.yaml to add personal-files interface ([#5131](https://github.com/starship/starship/issues/5131)) ([b3ccc0f](https://github.com/starship/starship/commit/b3ccc0f05e451ada800d233613ef32756682249f))
|
||||
* **style:** ensure nested style variables are processed during formatting ([#5120](https://github.com/starship/starship/issues/5120)) ([e5cec9e](https://github.com/starship/starship/commit/e5cec9ea50963a45bb1c209abc747ee1983dcabd))
|
||||
* update of presets and default configuration to reflect changes in Nerd Fonts 3.0 ([#5162](https://github.com/starship/starship/issues/5162)) ([2558c45](https://github.com/starship/starship/commit/2558c4588b5bcc404df474c948de0b72b109be01))
|
||||
|
||||
## [1.14.2](https://github.com/starship/starship/compare/v1.14.1...v1.14.2) (2023-04-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **git_commit:** resolve panic on 32-bit targets ([#5095](https://github.com/starship/starship/issues/5095)) ([5ef90a6](https://github.com/starship/starship/commit/5ef90a615f73a9f240a3c63ab601db1302adb01d))
|
||||
|
||||
## [1.14.1](https://github.com/starship/starship/compare/v1.14.0...v1.14.1) (2023-04-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bootstrap manifest for release-please ([#5087](https://github.com/starship/starship/issues/5087)) ([e392d14](https://github.com/starship/starship/commit/e392d14f4eb65d8761ea8bafb498d2a0d966dcef))
|
||||
* trigger release ([8bdb953](https://github.com/starship/starship/commit/8bdb953ad85068e182878c3295a94559a608ee31))
|
||||
* update the release-please manifest ([cd501ec](https://github.com/starship/starship/commit/cd501ecd9fb4b898d6d4472b46471a05a42b6052))
|
||||
|
||||
## [1.14.0](https://github.com/starship/starship/compare/v1.13.1...v1.14.0) (2023-04-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **aws:** add support for source_profile ([#3834](https://github.com/starship/starship/issues/3834)) ([d2801ac](https://github.com/starship/starship/commit/d2801ac44301dcef1f87ab5fd26abee36997f71d))
|
||||
* **aws:** add support for source_profile ([#4859](https://github.com/starship/starship/issues/4859)) ([d2801ac](https://github.com/starship/starship/commit/d2801ac44301dcef1f87ab5fd26abee36997f71d))
|
||||
* **aws:** Adds support for AWS_CREDENTIAL_EXPIRATION environment variable ([#5002](https://github.com/starship/starship/issues/5002)) ([74ce7fd](https://github.com/starship/starship/commit/74ce7fdbee071c28c77fd148d4ba02515f272d10))
|
||||
* **custom:** add option to check if pwd is in a repo ([#4822](https://github.com/starship/starship/issues/4822)) ([d29ce7c](https://github.com/starship/starship/commit/d29ce7c45d4ea21a6e14ad308bd50cb0e61d1ef8))
|
||||
* **fossil:** detection of Fossil check-outs in subdirectories ([#4910](https://github.com/starship/starship/issues/4910)) ([4bca74e](https://github.com/starship/starship/commit/4bca74eca29e159f0d6f27db432927012848408c))
|
||||
* **release:** handle chocolatey starship.portable and starship.install pkg publishing ([#4723](https://github.com/starship/starship/issues/4723)) ([b55774d](https://github.com/starship/starship/commit/b55774d3a68b32c0ed17983adeb6355e75c65f6b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **fossil_branch:** fossil checkout database file name on windows ([#4978](https://github.com/starship/starship/issues/4978)) ([c07a21d](https://github.com/starship/starship/commit/c07a21d48abe4e01a96a2d1b641876207e8d02fb))
|
||||
* **fossil_branch:** use proper fossil checkout database file name on windows ([c07a21d](https://github.com/starship/starship/commit/c07a21d48abe4e01a96a2d1b641876207e8d02fb))
|
||||
* **gradle:** add support for unstable Gradle versions ([#5021](https://github.com/starship/starship/issues/5021)) ([f7fe41f](https://github.com/starship/starship/commit/f7fe41f9c6c455e8ced284ad2d55d2a51a5da748))
|
||||
* **init:** avoid cygpath for starship binary path ([#4970](https://github.com/starship/starship/issues/4970)) ([0ad0465](https://github.com/starship/starship/commit/0ad0465a7a3296b3223693c655f370b7aae0d441))
|
||||
* **java:** wrong version number when using Android Studio JDK ([#4966](https://github.com/starship/starship/issues/4966)) ([de7e948](https://github.com/starship/starship/commit/de7e94884bc309814f6af79d68d664efb513e093))
|
||||
* **preset:** add output-flag to avoid encoding issues ([#4926](https://github.com/starship/starship/issues/4926)) ([5e78226](https://github.com/starship/starship/commit/5e78226a3fbe722331f6f0a1d352bbc48d38247f))
|
||||
* **pulumi:** Fix formatting on pulumi module when using version ([#5038](https://github.com/starship/starship/issues/5038)) ([aef799b](https://github.com/starship/starship/commit/aef799bfb089c5d259354208a6bcd5a0b639888f))
|
||||
|
||||
## [1.13.1](https://github.com/starship/starship/compare/v1.13.0...v1.13.1) (2023-02-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* trigger release ([ff82fb9](https://github.com/starship/starship/commit/ff82fb99af88c007a18c7655fb0150c4415bb5db))
|
||||
|
||||
## [1.13.0](https://github.com/starship/starship/compare/v1.12.0...v1.13.0) (2023-02-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add pijul_channel module ([#4765](https://github.com/starship/starship/issues/4765)) ([67b6376](https://github.com/starship/starship/commit/67b6376e2ef0835350e3e856ade6602b6c187c42))
|
||||
* **config:** Adds support for --profile <custom profile name> ([#3467](https://github.com/starship/starship/issues/3467)) ([10433e3](https://github.com/starship/starship/commit/10433e31effb4040c47d02d565d1643bcf984fa6))
|
||||
* **env_var:** Add support for env_var.VAR in format ([#4497](https://github.com/starship/starship/issues/4497)) ([5d4cb6f](https://github.com/starship/starship/commit/5d4cb6ff8f6bd1915aa2c16162950b270f1759b1))
|
||||
* **fennel:** add fennel module ([#4717](https://github.com/starship/starship/issues/4717)) ([e93dbf8](https://github.com/starship/starship/commit/e93dbf86301e19a89bd64997d95ba63a64f473aa))
|
||||
* **fossil_branch:** add fossil_branch module ([#4806](https://github.com/starship/starship/issues/4806)) ([41eb98b](https://github.com/starship/starship/commit/41eb98b310cd8134cec7bd8dcb55869a984653cf))
|
||||
* **gradle:** add gradle module ([#4423](https://github.com/starship/starship/issues/4423)) ([220844d](https://github.com/starship/starship/commit/220844daa014046bedbc9ce703f8b18fbe267e3c))
|
||||
* **hg_branch:** Add support for mercurial topics and find hg root dir ([#4771](https://github.com/starship/starship/issues/4771)) ([8d2256a](https://github.com/starship/starship/commit/8d2256ab1d0ba288fb6ba9b9248bc2210ca01059))
|
||||
* **java:** Add `.sdkmanrc` for Java ([#4888](https://github.com/starship/starship/issues/4888)) ([07c2298](https://github.com/starship/starship/commit/07c2298965ee67300319c012bdf5fadbc8db4931))
|
||||
* **logger:** delete old logs & avoid more dup logs ([#4348](https://github.com/starship/starship/issues/4348)) ([e47ea57](https://github.com/starship/starship/commit/e47ea57db21125372aeeae87ce555855a98adaab))
|
||||
* **nix:** support new `nix shell` command ([#4724](https://github.com/starship/starship/issues/4724)) ([19fdf9b](https://github.com/starship/starship/commit/19fdf9bba59f6ae5a756b81d221a9dc3185208f5))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 'to to' -> 'to' ([8c2135f](https://github.com/starship/starship/commit/8c2135f55d4a8b1026ce3cf7055efde6ab47d13d))
|
||||
* **container:** reduce docker, podman and systemd confusion ([#4832](https://github.com/starship/starship/issues/4832)) ([85d683d](https://github.com/starship/starship/commit/85d683daf235854ffc356354c6b3ba7096de6193))
|
||||
* **fish:** enable transient prompt when in vi mode ([#4826](https://github.com/starship/starship/issues/4826)) ([9ac924e](https://github.com/starship/starship/commit/9ac924eb3f0f8faa6da0375d92fc1dc22b8ba721))
|
||||
* **git_commit:** fix potential test failure ([#4734](https://github.com/starship/starship/issues/4734)) ([27d167b](https://github.com/starship/starship/commit/27d167b7a202cd1da39a731813df155dacb4c81b))
|
||||
* Improve regex for extracting gradle package version from gradle.properties ([#4759](https://github.com/starship/starship/issues/4759)) ([9093891](https://github.com/starship/starship/commit/9093891acbe2c86b1615c37386dadbb0cc632199))
|
||||
* let-env warning when using nushell ([#4893](https://github.com/starship/starship/issues/4893)) ([e6c5571](https://github.com/starship/starship/commit/e6c5571fc9c1f47c711d5fcdd1799ced5b546454))
|
||||
* **nodejs:** apply `style` even if node version is unavailable ([#4713](https://github.com/starship/starship/issues/4713)) ([e88484d](https://github.com/starship/starship/commit/e88484d5674b7c038346ff1c89089e535d2e2d6d))
|
||||
* **package:** Improve regex for extracting gradle version from gradle.properties ([#4760](https://github.com/starship/starship/issues/4760)) ([9093891](https://github.com/starship/starship/commit/9093891acbe2c86b1615c37386dadbb0cc632199))
|
||||
* Remove vulnerable time-0.1.x chrono dependency ([#4750](https://github.com/starship/starship/issues/4750)) ([255f91c](https://github.com/starship/starship/commit/255f91c3ce896f71b874f260b61f86232485d823))
|
||||
|
||||
## [1.12.0](https://github.com/starship/starship/compare/v1.11.0...v1.12.0) (2022-12-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Haxe support ([#4395](https://github.com/starship/starship/issues/4395)) ([2766c78](https://github.com/starship/starship/commit/2766c78749e638282d1dee56f7afcc195c16c064))
|
||||
* Add operating system module ([#4109](https://github.com/starship/starship/issues/4109)) ([3109943](https://github.com/starship/starship/commit/3109943822a15b22faaa6cdfda17ca9554bcd800))
|
||||
* **aws:** add a fallback for `expiration` key ([#4455](https://github.com/starship/starship/issues/4455)) ([5a2c85d](https://github.com/starship/starship/commit/5a2c85d078c1a8c83cc055dd0e56033abb15c2bf))
|
||||
* **azure:** add username to azure module config ([#4323](https://github.com/starship/starship/issues/4323)) ([6e15c00](https://github.com/starship/starship/commit/6e15c00238a06e92cf411a669590002eb22324e7))
|
||||
* **bug-report:** ask for confirmation before opening issue ([#4543](https://github.com/starship/starship/issues/4543)) ([8bb9038](https://github.com/starship/starship/commit/8bb9038431cd369e953ca156ed09aabd7c2ba326))
|
||||
* **directory:** add before_repo_root_style ([#4595](https://github.com/starship/starship/issues/4595)) ([ea6249b](https://github.com/starship/starship/commit/ea6249b5243acf0cce2352a1b580479546b92340))
|
||||
* **git_commit:** support showing lightweight tags ([#4632](https://github.com/starship/starship/issues/4632)) ([ac37792](https://github.com/starship/starship/commit/ac37792c19d7c545d4c51cf712f13e5e81559511))
|
||||
* **guix_shell:** Initial implementation ([#4397](https://github.com/starship/starship/issues/4397)) ([d4bcc51](https://github.com/starship/starship/commit/d4bcc519e61524e1fe30f82412a09af113d75287))
|
||||
* **init:** Use which-rs to resolve starship path ([cc2c8c4](https://github.com/starship/starship/commit/cc2c8c4a5450f2811612129abfbdc1aba12def91))
|
||||
* **localip:** use reserved remote address ([#4648](https://github.com/starship/starship/issues/4648)) ([ddd54e9](https://github.com/starship/starship/commit/ddd54e9b20427b716e13d83884b4b0db03953210)), closes [#4614](https://github.com/starship/starship/issues/4614)
|
||||
* **nu:** enable right prompt ([#4490](https://github.com/starship/starship/issues/4490)) ([a7abc0f](https://github.com/starship/starship/commit/a7abc0f4508b5357e44bc1d0a8b0ed363201824c)), closes [#3982](https://github.com/starship/starship/issues/3982)
|
||||
* Open Policy Agent module ([#1740](https://github.com/starship/starship/issues/1740)) ([#4441](https://github.com/starship/starship/issues/4441)) ([865e68d](https://github.com/starship/starship/commit/865e68da3ad752a2bc85b923258f2dbd5287ada8))
|
||||
* **package:** added showing gradle version based on the gradle.properties file ([#4432](https://github.com/starship/starship/issues/4432)) ([14ee81b](https://github.com/starship/starship/commit/14ee81b9c31047993217f060b57fb327a58c0d38))
|
||||
* **preset:** Add No Empty Icons preset ([#4518](https://github.com/starship/starship/issues/4518)) ([1a3d51f](https://github.com/starship/starship/commit/1a3d51fe76c5a62d53533f5d14ceb4425d5a33a5))
|
||||
* **preset:** Add no-nerd-font preset ([#4517](https://github.com/starship/starship/issues/4517)) ([4d86a4c](https://github.com/starship/starship/commit/4d86a4c7ae70dff552cdea85d7ea7872e2321c2f))
|
||||
* **release:** add chocolatey publishing ([#4637](https://github.com/starship/starship/issues/4637)) ([df37e8d](https://github.com/starship/starship/commit/df37e8d40c7b3556f8428ce29c53f2882af2ce25))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **aws:** enable when using .aws/credentials ([#4604](https://github.com/starship/starship/issues/4604)) ([c8ac877](https://github.com/starship/starship/commit/c8ac8777a593358868813254c662da5fcb9fe6c8))
|
||||
* **buf:** broken icon on windows 10 ([#4689](https://github.com/starship/starship/issues/4689)) ([7341607](https://github.com/starship/starship/commit/7341607c294a633477005d777bd03b18522aabf4))
|
||||
* **ci:** cache after selecting the toolchain ([#4619](https://github.com/starship/starship/issues/4619)) ([e4dbff0](https://github.com/starship/starship/commit/e4dbff0fc7e88f792b90703f03f83e31d401b90e))
|
||||
* **config:** unrecognized config properties don't cause config error ([#4547](https://github.com/starship/starship/issues/4547)) ([1b03ef2](https://github.com/starship/starship/commit/1b03ef21f34fc4acf890b01cfca3d07158ef5c46))
|
||||
* **container:** avoid detecting WSL as a systemd-container ([#4593](https://github.com/starship/starship/issues/4593)) ([b47a4fe](https://github.com/starship/starship/commit/b47a4fe51470a36116b5c941c6e07ac5730585ea))
|
||||
* don't attempt to display cmd_duration notification if in TTY ([#4535](https://github.com/starship/starship/issues/4535)) ([0427863](https://github.com/starship/starship/commit/04278631687da388005f2c26f3da2115b9075bf5))
|
||||
* **git:** check `tag_disabled` option ([#4527](https://github.com/starship/starship/issues/4527)) ([fd165b9](https://github.com/starship/starship/commit/fd165b96cc9587f81ab68b580d371b71f4e0ff35))
|
||||
* **java:** Improved regex for Java version (starship[#4610](https://github.com/starship/starship/issues/4610)) ([#4616](https://github.com/starship/starship/issues/4616)) ([a9eb65e](https://github.com/starship/starship/commit/a9eb65ef35de948880cbf340ffbfe6af126e5e44))
|
||||
* **nu:** remove -c parameter from `term size` ([#4477](https://github.com/starship/starship/issues/4477)) ([4999530](https://github.com/starship/starship/commit/49995301ce90a0f63b2d5f9cbb30021a0f08f6ff))
|
||||
* **pwsh:** fix error log display on older versions of pwsh ([#4650](https://github.com/starship/starship/issues/4650)) ([ef83e7a](https://github.com/starship/starship/commit/ef83e7a0928231b02650b3554ccd5bf21164aaff))
|
||||
* **status:** replace multiply with cross mark emoji ([#4461](https://github.com/starship/starship/issues/4461)) ([186d99e](https://github.com/starship/starship/commit/186d99e623d22fe9e2f7e52378f2ec4015f713d4))
|
||||
|
||||
## [1.11.0](https://github.com/starship/starship/compare/v1.10.3...v1.11.0) (2022-10-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add user-defined color palette ([#4209](https://github.com/starship/starship/issues/4209)) ([d93074d](https://github.com/starship/starship/commit/d93074d0569db4bafb1788aa3f39136b734b5370))
|
||||
* **fish:** Enable left and right transience ([#4204](https://github.com/starship/starship/issues/4204)) ([06281c2](https://github.com/starship/starship/commit/06281c268d74a85d5b28e953bea251a2115f5568))
|
||||
* **module:** Add a meson devenv indicator ([#4389](https://github.com/starship/starship/issues/4389)) ([355800f](https://github.com/starship/starship/commit/355800f8147b1755a5289dc679e2147abd662daf))
|
||||
* **schema:** deny unknown keys ([#4270](https://github.com/starship/starship/issues/4270)) ([b5d3d8f](https://github.com/starship/starship/commit/b5d3d8fcf331cdff6d0e687dcdbac77351731475))
|
||||
* **status:** Support formatting of pipestatus separator ([#4264](https://github.com/starship/starship/issues/4264)) ([6e35dfa](https://github.com/starship/starship/commit/6e35dfa85aeebb3f714389a9286623dc0f60d799))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **buf:** fix spacing & harmonize docs with actual configuration ([#4450](https://github.com/starship/starship/issues/4450)) ([3d45236](https://github.com/starship/starship/commit/3d452367bdde22a2554cc74bee4d1adfee7e8e04))
|
||||
* **directory:** don't strip duplicate directory names twice ([#4295](https://github.com/starship/starship/issues/4295)) ([801fbab](https://github.com/starship/starship/commit/801fbab720e1bb94c32bb1aa10966a0637a10e63))
|
||||
* **pwsh:** avoid potential deadlock in init ([#4335](https://github.com/starship/starship/issues/4335)) ([fd55397](https://github.com/starship/starship/commit/fd5539796f7a2b3750d1889b55a563d84b628bee))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **directory:** Skip repo resolution if unused by directory config ([#4401](https://github.com/starship/starship/issues/4401)) ([227ec32](https://github.com/starship/starship/commit/227ec32d9d7e9d673360d487062fd4bef184e844))
|
||||
|
||||
## [1.10.3](https://github.com/starship/starship/compare/v1.10.2...v1.10.3) (2022-09-07)
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **git_commit:** only use exact match for tag by default ([#4281](https://github.com/starship/starship/issues/4281)) ([5984f08](https://github.com/starship/starship/commit/5984f0829ef5369e83c28108378fe0065a617b3c))
|
||||
|
||||
## [1.10.2](https://github.com/starship/starship/compare/v1.10.1...v1.10.2) (2022-08-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **git:** upgrade `gitoxide` to v0.21 ([#4277](https://github.com/starship/starship/issues/4277)) ([f52ae55](https://github.com/starship/starship/commit/f52ae552d3ef2c0c0c6de6429cee7b8271f14671))
|
||||
|
||||
## [1.10.1](https://github.com/starship/starship/compare/v1.10.0...v1.10.1) (2022-08-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Disable multithreading in `jwalk` (via `gitoxide`) as workaround for [#4251](https://github.com/starship/starship/issues/4251) ([#4258](https://github.com/starship/starship/issues/4258)) ([37b54f7](https://github.com/starship/starship/commit/37b54f7ac3ba53ea851b478501a96a7c4e188fc4))
|
||||
|
||||
## [1.10.0](https://github.com/starship/starship/compare/v1.9.1...v1.10.0) (2022-08-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add bun module ([#4187](https://github.com/starship/starship/issues/4187)) ([85692d1](https://github.com/starship/starship/commit/85692d1bf6a8477b6879adaf8b51007389df4328))
|
||||
* Add starship preset command ([#4112](https://github.com/starship/starship/issues/4112)) ([c8a5adb](https://github.com/starship/starship/commit/c8a5adb412e98b07017ffa0edea5554b0a23b840))
|
||||
* Add support for blink, hidden, and strikethrough styles. ([#4138](https://github.com/starship/starship/issues/4138)) ([aaab920](https://github.com/starship/starship/commit/aaab920f88015eb0a44e6514bf19b1db2b14829f))
|
||||
* Add the ability to have some file extensions *prevent* a module from triggering ([#4043](https://github.com/starship/starship/issues/4043)) ([dd73447](https://github.com/starship/starship/commit/dd73447329e637ee207b1103ecb6a4bdbdc89324))
|
||||
* Enable transience for Cmd and PowerShell ([#4143](https://github.com/starship/starship/issues/4143)) ([6e9c013](https://github.com/starship/starship/commit/6e9c013e60e59660cb7ae6289af5ed129ca85996))
|
||||
* **git:** replace `git2` with `git-repository` ([#3883](https://github.com/starship/starship/issues/3883)) ([ac55a01](https://github.com/starship/starship/commit/ac55a01d0ffe907ef7af48c9597c0bca4dbd8c69))
|
||||
* **k8s:** Add folder detection to the k8s module. ([#4157](https://github.com/starship/starship/issues/4157)) ([5c5969c](https://github.com/starship/starship/commit/5c5969c50b2490309b7ae9f7e6f5f75ea04a512d))
|
||||
* **package:** support cargo workspace versions ([#4161](https://github.com/starship/starship/issues/4161)) ([0a1235e](https://github.com/starship/starship/commit/0a1235e27944f152ca195c32e7eef8985d475989))
|
||||
* **status:** Add pipestatus_segment_format option to status module ([#4103](https://github.com/starship/starship/issues/4103)) ([6143848](https://github.com/starship/starship/commit/61438484bdc76601a185298f14337cfb4d5b4e0b))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **aws:** support official `AWS_SHARED_CREDENTIALS_FILE` variable ([#4242](https://github.com/starship/starship/issues/4242)) ([1390036](https://github.com/starship/starship/commit/13900368826cf1aca160fd650f19cecc1a047372))
|
||||
* **timings:** count time spent on custom on 'when' command failure ([#4121](https://github.com/starship/starship/issues/4121)) ([aae1ed0](https://github.com/starship/starship/commit/aae1ed04babf4c7d8baaad670c076947d7200675))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **pulumi:** allow disabling upwards discovery ([#4159](https://github.com/starship/starship/issues/4159)) ([af15de9](https://github.com/starship/starship/commit/af15de93c4494bb08d8c2cb3dbf54951f6bc9239))
|
||||
* **rust:** avoid calling `rustup` in more conditions ([#4174](https://github.com/starship/starship/issues/4174)) ([d8ac940](https://github.com/starship/starship/commit/d8ac940098eb16417742723c627d0de864597410))
|
||||
|
||||
|
||||
### Miscellaneous Chores
|
||||
|
||||
* **master:** release 1.10.0 ([b974610](https://github.com/starship/starship/commit/b9746100e2ee3746ea418e26ebc50494710a9d03))
|
||||
|
||||
## [1.9.1](https://github.com/starship/starship/compare/v1.9.0...v1.9.1) (2022-06-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* regenerate changelog ([8a6be8c](https://github.com/starship/starship/commit/8a6be8c941de8e31330417bdb232204969a814ff))
|
||||
|
||||
|
||||
### Miscellaneous Chores
|
||||
|
||||
* **master:** release 1.9.1 ([6cbc362](https://github.com/starship/starship/commit/6cbc3620c9ee7695fe1dabc067b6fd339b8d2526))
|
||||
|
||||
## [1.9.0](https://github.com/starship/starship/compare/v1.8.0...v1.9.0) (2022-06-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Raku module ([#4048](https://github.com/starship/starship/issues/4048)) ([1a4fac6](https://github.com/starship/starship/commit/1a4fac63f78c9408756c19eb26af5181a7cf537e))
|
||||
* **winget:** Add support for winget package manager ([#4042](https://github.com/starship/starship/issues/4042)) ([ef52f9e](https://github.com/starship/starship/commit/ef52f9e77ec66f5189a18acfdce399882c37fdd8))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **character:** Standadise Vim config names ([#4081](https://github.com/starship/starship/issues/4081)) ([6761938](https://github.com/starship/starship/commit/67619386cdd7537f0ab9af77e701409e97a87917))
|
||||
* **install:** Have fixed a spacing issue in output ([#4082](https://github.com/starship/starship/issues/4082)) ([2ffe173](https://github.com/starship/starship/commit/2ffe1737f06db4ce89a21b2b5238f3ad76c94bca))
|
||||
|
||||
## [1.8.0](https://github.com/starship/starship/compare/v1.7.1...v1.8.0) (2022-06-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add support for Daml ([#4004](https://github.com/starship/starship/issues/4004)) ([3fe6cc0](https://github.com/starship/starship/commit/3fe6cc023cd52917ae60a4d06ee6f1f78baa19e7))
|
||||
* **kubernetes:** add user alias ([#4008](https://github.com/starship/starship/issues/4008)) ([df5c2d8](https://github.com/starship/starship/commit/df5c2d8836622677460e34fa8082faa6b1a52835))
|
||||
* **release:** add windows msi installers ([#4031](https://github.com/starship/starship/issues/4031)) ([89fd532](https://github.com/starship/starship/commit/89fd5320af248207e8b253790bd191d8daa88dbe))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* escape text segments in meta variables ([#3563](https://github.com/starship/starship/issues/3563)) ([7d31bac](https://github.com/starship/starship/commit/7d31bac1cc3f39bd02f2e188e69283c566b816ed))
|
||||
* **fish:** add proper vi mode detection for fish shell ([#3839](https://github.com/starship/starship/issues/3839)) ([1469763](https://github.com/starship/starship/commit/146976351ec804ab1594d5262a1e0dd2d2de4972))
|
||||
* **install:** ignore tarfile ownership values when installing as root ([#4046](https://github.com/starship/starship/issues/4046)) ([1a91510](https://github.com/starship/starship/commit/1a91510beda1de2c3b149b7aacc0d76cf4652482))
|
||||
* **nu:** don't use `cygpath` for starship binary path in init ([#4001](https://github.com/starship/starship/issues/4001)) ([9b52475](https://github.com/starship/starship/commit/9b52475e541f751e8c650587cd8c1615fe00b1d0))
|
||||
* some typos ([e7c1976](https://github.com/starship/starship/commit/e7c19765282eb31daf85e5eba26e13828bc2f6c7))
|
||||
|
||||
### [1.7.1](https://github.com/starship/starship/compare/v1.7.0...v1.7.1) (2022-05-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* trigger release ([2cdf902](https://github.com/starship/starship/commit/2cdf902b57cd16dba42d4026e2e740537a82b0ee))
|
||||
|
||||
## [1.7.0](https://github.com/starship/starship/compare/v1.6.3...v1.7.0) (2022-05-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **go:** check for go.work file to show Go module in prompt ([#3968](https://github.com/starship/starship/issues/3968)) ([9ebfce1](https://github.com/starship/starship/commit/9ebfce1e366656bd1c199bb50cc7e1bd6cdb90ad))
|
||||
* **hostname:** add `ssh_symbol` for ssh connections ([#3806](https://github.com/starship/starship/issues/3806)) ([2bf30dc](https://github.com/starship/starship/commit/2bf30dc89fbce6f4da37657b8af6077f15a543d0))
|
||||
* **package:** Extract package version from PEP 621 compliant pyproject.toml ([#3950](https://github.com/starship/starship/issues/3950)) ([1b938fd](https://github.com/starship/starship/commit/1b938fd48420ceedf1e9886bd95ea738374680f7))
|
||||
* **rust:** Display toolchain names ([#3414](https://github.com/starship/starship/issues/3414)) ([393d62c](https://github.com/starship/starship/commit/393d62c726573a0e6c351f422dbef4b17a5944bf))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** Version bump and fix Crowdin Pretranslate ([#3992](https://github.com/starship/starship/issues/3992)) ([a0a6c94](https://github.com/starship/starship/commit/a0a6c942fe3fc85d599aec883406224c9ecb589f))
|
||||
* Do not panic in config if editor not found ([#3766](https://github.com/starship/starship/issues/3766)) ([2e80aec](https://github.com/starship/starship/commit/2e80aec5cb6f7376359e7a25a76a492a98717554))
|
||||
* **module:** list option not working ([#3919](https://github.com/starship/starship/issues/3919)) ([6fe6735](https://github.com/starship/starship/commit/6fe6735927170b9f2aaa10cb84fa3a4d754e3bd6))
|
||||
* **nu:** use the most recent starship init ([#3908](https://github.com/starship/starship/issues/3908)) ([382445d](https://github.com/starship/starship/commit/382445dc4d21d190959f5582fb9b9febe056299a))
|
||||
* Use git2::Repository::open_ext() instead of discover() ([#3591](https://github.com/starship/starship/issues/3591)) ([81a696a](https://github.com/starship/starship/commit/81a696a914f6761d42b69f139018c3fa663ff197))
|
||||
|
||||
### [1.6.3](https://github.com/starship/starship/compare/v1.6.2...v1.6.3) (2022-04-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **git_branch:** correct variable name for remote branch ([#3897](https://github.com/starship/starship/issues/3897)) ([bd7957f](https://github.com/starship/starship/commit/bd7957f01c7fa2b14f068e4130f1aedea61f4a76))
|
||||
* **schema:** move config-schema into docs folder ([#3878](https://github.com/starship/starship/issues/3878)) ([094f982](https://github.com/starship/starship/commit/094f982df184eecd85ea2832b3bf638629118c10))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **package:** only try to read files that exist ([#3904](https://github.com/starship/starship/issues/3904)) ([2a650bf](https://github.com/starship/starship/commit/2a650bfd140d561f955705cae124fb254ec549a1))
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* **schema:** move config-schema back into .github folder ([#3886](https://github.com/starship/starship/issues/3886)) ([9b2ce42](https://github.com/starship/starship/commit/9b2ce4240c602df368f966996d870ef9197e65ac))
|
||||
|
||||
### [1.6.2](https://github.com/starship/starship/compare/v1.6.1...v1.6.2) (2022-04-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* trigger another release ([81d2ce6](https://github.com/starship/starship/commit/81d2ce68ec05ea77151639267115d4daf73f5019))
|
||||
|
||||
### [1.6.1](https://github.com/starship/starship/compare/v1.6.0...v1.6.1) (2022-04-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fix release-please permissions ([23be606](https://github.com/starship/starship/commit/23be606516b5815fafea211aa59d2315ddb77df7))
|
||||
|
||||
## [1.6.0](https://github.com/starship/starship/compare/v1.5.4...v1.6.0) (2022-04-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add a module for C projects ([#3631](https://github.com/starship/starship/issues/3631)) ([0863146](https://github.com/starship/starship/commit/0863146f072ae8382be63db26dcf9ddeff967aea))
|
||||
* allow printing config file schema ([#3737](https://github.com/starship/starship/issues/3737)) ([18ad26f](https://github.com/starship/starship/commit/18ad26f98dd1bfcc01e2b092a5b6165a7b093631))
|
||||
* **aws:** add option to force AWS display ([#3720](https://github.com/starship/starship/issues/3720)) ([e04f126](https://github.com/starship/starship/commit/e04f126a107eba2e40009f21942c14894385d6b0))
|
||||
* **cmd_duration:** make notify feature optional (compat with nix darwin) ([#3855](https://github.com/starship/starship/issues/3855)) ([efaab49](https://github.com/starship/starship/commit/efaab49e4753bee1ce90ad08311a1d4dc04052b8))
|
||||
* **spack:** Add `Spack` module ([#3639](https://github.com/starship/starship/issues/3639)) ([3014284](https://github.com/starship/starship/commit/3014284e952f75deae87973cbe2763b7a0a0aab5))
|
||||
* **username:** Detect Admin access in Windows ([#2791](https://github.com/starship/starship/issues/2791)) ([c89c130](https://github.com/starship/starship/commit/c89c13038a34a52291d253e6d4b15c0dd4aa5dfa))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bash:** ensure `checkwinsize` is enabled for `$COLUMNS` ([#3832](https://github.com/starship/starship/issues/3832)) ([0334327](https://github.com/starship/starship/commit/03343272b778260016216266facd190936f9e7d3))
|
||||
* **directory:** enable repo_root_style when truncation_length is zero. ([#3536](https://github.com/starship/starship/issues/3536)) ([441ebb3](https://github.com/starship/starship/commit/441ebb39b9cd451564959d259409d2395e7afb01))
|
||||
* **docker_context:** ignore the "default" context ([#3803](https://github.com/starship/starship/issues/3803)) ([#3804](https://github.com/starship/starship/issues/3804)) ([230e85b](https://github.com/starship/starship/commit/230e85be37a0fc12999d1e6ff1209e7d5f99ecd1))
|
||||
* **fish:** allow generating session keys in older versions of fish ([#3697](https://github.com/starship/starship/issues/3697)) ([0fb4219](https://github.com/starship/starship/commit/0fb421969058ec07a09f7c927dddc1258de75631))
|
||||
* **init:** Change Elvish init to `catch` for 0.18 ([#3769](https://github.com/starship/starship/issues/3769)) ([538329d](https://github.com/starship/starship/commit/538329d9b406cd6358d0fe31d58e0c9f578ceffa))
|
||||
* **nu:** Use `=` instead of space to pass command line parameters ([#3833](https://github.com/starship/starship/issues/3833)) ([2608db3](https://github.com/starship/starship/commit/2608db3a38b0dca13d91e94950fb4246b0ed1d82))
|
||||
* **nu:** use shell-provided terminal width ([#3800](https://github.com/starship/starship/issues/3800)) ([859b780](https://github.com/starship/starship/commit/859b780b46780fdcac8141a9d165066880c36261))
|
||||
+50
-106
@@ -2,131 +2,75 @@
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
## Our Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
coc@starship.rs.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
reported by contacting the project team at starship@matchai.me. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
||||
at [https://www.contributor-covenant.org/translations][translations].
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
|
||||
+30
-225
@@ -8,9 +8,9 @@ If you have any questions that aren't addressed in this document, please don't h
|
||||
|
||||
## Glossary
|
||||
|
||||
- **Module**: A component in the prompt giving information based on contextual information from your OS. For example, the `rust` module shows the version of Rust that is currently installed on your computer, if your current directory is a Rust project.
|
||||
- **Module**: A component in the prompt giving information based on contextual information from your OS. For example, the `nodejs` module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project.
|
||||
|
||||
- **Segment**: Smaller subcomponents that compose a module. For example, the `symbol` segment in the `rust` module contains the character that is shown before the version number (`🦀` by default).
|
||||
- **Segment**: Smaller sub-components that compose a module. For example, the `symbol` segment in the `nodejs` module contains the character that is shown before the version number (`⬢` by default).
|
||||
|
||||
## Philosophy
|
||||
|
||||
@@ -24,251 +24,83 @@ The project begins in [`main.rs`](src/main.rs), where the appropriate `print::`
|
||||
|
||||
Any styling that is applied to a module is inherited by its segments. Module prefixes and suffixes by default don't have any styling applied to them.
|
||||
|
||||
## Environment Variables and external commands
|
||||
|
||||
We have custom functions to be able to test our modules better. Here we show you how.
|
||||
|
||||
### Environment Variables
|
||||
|
||||
To get an environment variable we have special function to allow for mocking of vars. Here's a quick example:
|
||||
|
||||
```rust
|
||||
use super::{Context, Module, RootModuleConfig};
|
||||
|
||||
use crate::configs::php::PhpConfig;
|
||||
use crate::formatter::StringFormatter;
|
||||
|
||||
|
||||
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
// Here `my_env_var` will be either the contents of the var or the function
|
||||
// will exit if the variable is not set.
|
||||
let my_env_var = context.get_env("MY_VAR")?;
|
||||
|
||||
// Then you can happily use the value
|
||||
}
|
||||
```
|
||||
|
||||
## External commands
|
||||
|
||||
To run an external command (e.g. to get the version of a tool) and to allow for mocking use the `context.exec_cmd` function. Here's a quick example:
|
||||
|
||||
```rust
|
||||
use super::{Context, Module, ModuleConfig};
|
||||
|
||||
use crate::configs::php::PhpConfig;
|
||||
use crate::formatter::StringFormatter;
|
||||
|
||||
|
||||
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
// Here `output` will be either the stdout of the called command or the function
|
||||
// will exit if the called program was not installed or could not be run.
|
||||
let output = context.exec_cmd("my_command", &["first_arg", "second_arg"])?.stdout;
|
||||
|
||||
// Then you can happily use the output
|
||||
}
|
||||
```
|
||||
|
||||
If using `context.exec_cmd` isn't possible, please use `crate::utils::create_command` instead of `std::process::Command::new`.
|
||||
|
||||
## Absolute Filenames
|
||||
|
||||
To use absolute filenames in your module, use `crate::utils::context_path()` to create a `PathBuf` from an absolute pathname.
|
||||
In the test environment the root directory will be replaced with a `Tempdir`, which you can get via `ModuleRenderer::root_path()`.
|
||||
So, you can populate that mocked root directory with any files you want.
|
||||
|
||||
```rust
|
||||
use crate::utils::context_path;
|
||||
|
||||
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
if !context_path(context, "/run/test/testfile").exists() {
|
||||
return None
|
||||
}
|
||||
// ..
|
||||
}
|
||||
```
|
||||
|
||||
```rust
|
||||
#[test]
|
||||
fn test_testfile() {
|
||||
let renderer = ModuleRenderer::new("mymodule");
|
||||
|
||||
let root_path = renderer.root_path();
|
||||
|
||||
// This creates `$TEMPDIR/run/test/testfile`
|
||||
|
||||
let mut absolute_test_file = PathBuf::from(root_path);
|
||||
|
||||
absolute_test_file.push("run");
|
||||
absolute_test_file.push("test");
|
||||
std::fs::DirBuilder::new()
|
||||
.recursive(true)
|
||||
.create(&absolute_test_file)?;
|
||||
|
||||
absolute_test_file.push("testfile");
|
||||
std::fs::File::create(&absolute_test_file)?;
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## Logging
|
||||
|
||||
Debug logging in starship is done with our custom logger implementation.
|
||||
To run starship with debug logs, set the `STARSHIP_LOG` environment variable to the log level needed.
|
||||
Debug logging in starship is done with [pretty_env_logger](https://crates.io/crates/pretty_env_logger).
|
||||
To run starship with debug logs, set the `RUST_LOG` environment variable to the log level needed.
|
||||
For example, to enable the trace logs, run the following:
|
||||
|
||||
```sh
|
||||
# Run installed starship
|
||||
STARSHIP_LOG=trace starship
|
||||
RUST_LOG=starship=trace starship
|
||||
|
||||
# Run with cargo
|
||||
STARSHIP_LOG=trace cargo run
|
||||
RUST_LOG=starship=trace cargo run
|
||||
```
|
||||
|
||||
## Linting
|
||||
|
||||
Starship source files are linted with [clippy](https://crates.io/crates/clippy). Clippy will be run as part of CI. Linting errors will fail a build, so it is suggested that you run Clippy locally:
|
||||
Starship source files are linted with [clippy](https://crates.io/crates/clippy). Clippy will be ran as part of CI. Linting errors will fail a build, so it is suggested that you run Clippy locally:
|
||||
|
||||
```sh
|
||||
rustup component add clippy
|
||||
cargo clippy --all-targets --all-features
|
||||
cargo clippy
|
||||
```
|
||||
|
||||
## Formatting
|
||||
|
||||
Starship source files are formatted with [rustfmt](https://crates.io/crates/rustfmt-nightly). Markdown and TOML files (among others) are formatted with [dprint](https://github.com/dprint/dprint). Unformatted code will fail the CI, so it is suggested that you run these tools locally.
|
||||
|
||||
For rustfmt:
|
||||
Starship source files are formatted with [rustfmt](https://crates.io/crates/rustfmt-nightly). Rustfmt will be ran as part of CI. Unformatted code will fail a build, so it is suggested that you run rustfmt locally:
|
||||
|
||||
```sh
|
||||
rustup component add rustfmt
|
||||
cargo fmt
|
||||
```
|
||||
|
||||
For dprint:
|
||||
|
||||
```sh
|
||||
cargo install dprint
|
||||
dprint fmt
|
||||
```
|
||||
|
||||
Editor plugins/functionality may help you run these automatically so that you don't accidentally create a PR that fails.
|
||||
|
||||
If your changes cause changes to the configuration, you will need to update the configuration schema in `.github/config-schema.json` with `cargo run --features config-schema -- config-schema > .github/config-schema.json`.
|
||||
|
||||
## Testing
|
||||
|
||||
Testing is critical to making sure starship works as intended on systems big and small. Starship interfaces with many applications and system APIs when generating the prompt, so there's a lot of room for bugs to slip in.
|
||||
|
||||
Unit tests are written using the built-in Rust testing library in the same file as the implementation, as is traditionally done in Rust codebases. These tests can be run with `cargo test` and are run on GitHub as part of our GitHub Actions continuous integration to ensure consistent behavior.
|
||||
Unit tests and a subset of integration tests can be run with `cargo test`.
|
||||
The full integration test suite is run on GitHub as part of our GitHub Actions continuous integration.
|
||||
|
||||
All tests that test the rendered output of a module should use `ModuleRenderer`. For Example:
|
||||
### Unit Testing
|
||||
|
||||
```rust
|
||||
use super::{Context, Module, ModuleConfig};
|
||||
|
||||
use crate::configs::php::PhpConfig;
|
||||
use crate::formatter::StringFormatter;
|
||||
use crate::utils;
|
||||
|
||||
|
||||
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
/* This is where your module code goes */
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::test::ModuleRenderer;
|
||||
use nu_ansi_term::Color;
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
|
||||
|
||||
#[test]
|
||||
fn should_render() -> io::Result<()> {
|
||||
// Here you setup the testing environment
|
||||
let tempdir = tempfile::tempdir()?;
|
||||
// Create some file needed to render the module
|
||||
File::create(tempdir.path().join("YOUR_FILE"))?.sync_all()?;
|
||||
|
||||
// The output of the module
|
||||
let actual = ModuleRenderer::new("YOUR_MODULE_NAME")
|
||||
// For a custom path
|
||||
.path(&tempdir.path())
|
||||
// For a custom config
|
||||
.config(toml::toml!{
|
||||
[YOUR_MODULE_NAME]
|
||||
val = 1
|
||||
})
|
||||
// For env mocking
|
||||
.env("KEY","VALUE")
|
||||
// Run the module and collect the output
|
||||
.collect();
|
||||
|
||||
// The value that should be rendered by the module.
|
||||
let expected = Some(format!("{} ",Color::Black.paint("THIS SHOULD BE RENDERED")));
|
||||
|
||||
// Assert that the actual and expected values are the same
|
||||
assert_eq!(actual, expected);
|
||||
|
||||
// Close the tempdir
|
||||
tempdir.close()
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If a module depends on output of another program, then that output should be added to the match statement in [`utils.rs`](src/utils.rs). The match has to be exactly the same as the call to `utils::exec_cmd()`, including positional arguments and flags. The array of arguments is joined by a `" "`, so `utils::exec_cmd("program", &["arg", "more_args"])` would match with the `program arg more_args` match statement.
|
||||
|
||||
If the program cannot be mocked (e.g. It performs some filesystem operations, either writing or reading files) then it has to added to the project's GitHub Actions workflow file([`.github/workflows/workflow.yml`](.github/workflows/workflow.yml)) and the test has to be marked with an `#[ignored]`. This ensures that anyone can run the test suite locally without needing to pre-configure their environment. The `#[ignored]` attribute is bypassed during CI runs in GitHub Actions.
|
||||
Unit tests are written using the built-in Rust testing library in the same file as the implementation, as is traditionally done in Rust codebases. These tests can be run with `cargo test`.
|
||||
|
||||
Unit tests should be fully isolated, only testing a given function's expected output given a specific input, and should be reproducible on any machine. Unit tests should not expect the computer running them to be in any particular state. This includes having any applications pre-installed, having any environment variables set, etc.
|
||||
|
||||
The previous point should be emphasized: even seemingly innocuous ideas like "if we can see the directory, we can read it" or "nobody will have their home directory be a git repo" have bitten us in the past. Having even a single test fail can completely break installation on some platforms, so be careful with tests!
|
||||
|
||||
### Test Programming Guidelines
|
||||
### Integration Testing
|
||||
|
||||
Any tests that depend on File I/O should use [`sync_all()`](https://doc.rust-lang.org/std/fs/struct.File.html#method.sync_all) when creating files or after writing to files.
|
||||
Integration tests are located in the [`tests/`](tests) directory and are also written using the built-in Rust testing library.
|
||||
|
||||
Any tests that use `tempfile::tempdir` should take care to call `dir.close()` after usage to ensure the lifecycle of the directory can be reasoned about. This includes `fixture_repo()` as it returns a TempDir that should be closed.
|
||||
Integration tests should test full modules or the entire prompt. All integration tests that expect the testing environment to have pre-existing state or tests that make permanent changes to the filesystem should have the `#[ignore]` attribute added to them. All tests that don't depend on any preexisting state will be run alongside the unit tests with `cargo test`.
|
||||
|
||||
## Documentation
|
||||
For tests that depend on having preexisting state, whatever needed state will have to be added to the project's GitHub Actions workflow file([`.github/workflows/workflow.yml`](.github/workflows/workflow.yml)).
|
||||
|
||||
### Crowdin Translated Pages
|
||||
## Running the Documentation Website Locally
|
||||
|
||||
Many documentation pages have versions in non-English languages. These
|
||||
translated pages are managed by
|
||||
[Crowdin](https://crowdin.com/project/starship-prompt). Please do not edit
|
||||
these pages directly, even for changes that do not need to be translated (e.g.
|
||||
whitespace or emoji changes), since this can cause merges to fail.
|
||||
If you are contributing to the design of Starship's website, the following section will help you get started.
|
||||
|
||||
If you would like to contribute translations or corrections to the Crowdin
|
||||
generated pages, please visit our Crowdin site.
|
||||
### Setup
|
||||
|
||||
### Running the Documentation Website Locally
|
||||
|
||||
Changes to documentation can be viewed in a rendered state from the GitHub PR page
|
||||
(go to the CI section at the bottom of the page and look for "deploy preview", then
|
||||
click on "details"). If you want to view changes locally as well, follow these steps.
|
||||
|
||||
After cloning the project, you can do the following to run the VitePress website on your local machine:
|
||||
After cloning the project, you can do the following to run the VuePress website on your local machine:
|
||||
|
||||
1. `cd` into the `/docs` directory.
|
||||
2. Install the project dependencies:
|
||||
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
```
|
||||
$ npm install
|
||||
```
|
||||
3. Start the project in development mode:
|
||||
```
|
||||
$ npm run dev
|
||||
```
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
```
|
||||
Once setup is complete, you can refer to VuePress documentation on the actual implementation here: https://vuepress.vuejs.org/guide/.
|
||||
|
||||
Once setup is complete, you can refer to VitePress documentation on the actual implementation here: <https://vitepress.dev/guide/getting-started>.
|
||||
|
||||
## Git/GitHub workflow
|
||||
### Git/GitHub workflow
|
||||
|
||||
This is our preferred process for opening a PR on GitHub:
|
||||
|
||||
@@ -278,31 +110,4 @@ This is our preferred process for opening a PR on GitHub:
|
||||
4. When your changes are ready for review, push your branch: `git push origin my-feature-branch`
|
||||
5. Create a pull request from your branch to `starship/master`
|
||||
6. No need to assign the pull request to anyone, we'll review it when we can
|
||||
7. When the changes have been reviewed and approved, someone will squash and merge for you
|
||||
|
||||
## New Module Checklist
|
||||
|
||||
We love getting new modules for starship! While we try to keep the barrier for
|
||||
writing new modules low, starship provides a lot of functionality for a module,
|
||||
which requires quite a few things be done. These are listed here to help
|
||||
everyone remember what they are. Don't worry: most of them are quite simple!
|
||||
|
||||
- [ ] Add a section to `docs/config/README.md` describing the module, and
|
||||
its configuration options/variables (more documentation is often
|
||||
appropriate--this is a bare minimum).
|
||||
- [ ] Add the variable to the appropriate location in the "Default Prompt
|
||||
Format" section of the documentation
|
||||
- [ ] Add an appropriate choice of options to each preset in `docs/public/presets/toml`
|
||||
- [ ] Update the config file schema by running `cargo run --features config-schema -- config-schema > .github/config-schema.json`
|
||||
- [ ] Create configs structs/traits in `src/configs/<module>.rs` and add the
|
||||
following:
|
||||
- [ ] An entry in `PROMPT_ORDER` (`src/configs/starship_root.rs`)
|
||||
- [ ] An entry in `FullConfig` and the `Default` impl (`src/configs/mod.rs`)
|
||||
- [ ] An entry in `ALL_MODULES` (`src/module.rs`)
|
||||
- [ ] A `mod` declaration at the top of `src/modules/mod.rs`
|
||||
- [ ] An entry in `handle()` (`src/modules/mod.rs`)
|
||||
- [ ] A description for the `description()` function (`src/modules/mod.rs`)
|
||||
|
||||
Finally, you should make sure to write your module's code in `src/modules`
|
||||
and add any commands that need to be mocked when testing in `src/utils.rs`.
|
||||
Command output can also be mocked in test by using `ModuleRenderer::cmd`.
|
||||
7. When the changes have been reviewed and approved, someone will squash and merge for you
|
||||
Generated
+1086
-2999
File diff suppressed because it is too large
Load Diff
+46
-114
@@ -1,136 +1,68 @@
|
||||
[package]
|
||||
name = "starship"
|
||||
version = "1.17.1"
|
||||
authors = ["Starship Contributors"]
|
||||
build = "build.rs"
|
||||
categories = ["command-line-utilities"]
|
||||
documentation = "https://starship.rs/guide/"
|
||||
edition = "2021"
|
||||
version = "0.37.0"
|
||||
edition = "2018"
|
||||
authors = ["Matan Kushner <hello@matchai.me>"]
|
||||
homepage = "https://starship.rs"
|
||||
# Keep `/` in front of `README.md` to exclude localized readmes
|
||||
include = [
|
||||
"src/**/*",
|
||||
"/starship.exe.manifest",
|
||||
"media/icon.ico",
|
||||
"build.rs",
|
||||
"LICENSE",
|
||||
"/README.md",
|
||||
"docs/.vuepress/public/presets/toml/",
|
||||
".github/config-schema.json",
|
||||
]
|
||||
keywords = ["prompt", "shell", "bash", "fish", "zsh"]
|
||||
license = "ISC"
|
||||
readme = "README.md"
|
||||
documentation = "https://starship.rs/guide/"
|
||||
repository = "https://github.com/starship/starship"
|
||||
# Note: MSRV is only intended as a hint, and only the latest version is officially supported in starship.
|
||||
rust-version = "1.65"
|
||||
readme = "README.md"
|
||||
license = "ISC"
|
||||
keywords = ["prompt", "shell", "bash", "fish", "zsh"]
|
||||
categories = ["command-line-utilities"]
|
||||
description = """
|
||||
The minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️
|
||||
"""
|
||||
exclude = ["docs/**/*", "media/**/*"]
|
||||
|
||||
[badges]
|
||||
is-it-maintained-issue-resolution = { repository = "starship/starship" }
|
||||
is-it-maintained-open-issues = { repository = "starship/starship" }
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
||||
[features]
|
||||
default = ["battery", "notify", "gix-max-perf"]
|
||||
battery = ["starship-battery"]
|
||||
config-schema = ["schemars"]
|
||||
notify = ["notify-rust"]
|
||||
|
||||
# Enables most of the `max-performance` features of the `gix` module for better performance.
|
||||
# This can be more difficult to build in some conditions and requires cmake.
|
||||
gix-max-perf = ["gix-features/zlib-ng", "gix/fast-sha1"]
|
||||
# Slower than `git-repository-max-perf`, but better than the default.
|
||||
# Unlike `git-repository-max-perf` this does not require cmake and allows dynamic zlib linking.
|
||||
gix-faster = ["gix-features/zlib-stock", "gix/fast-sha1"]
|
||||
default = ["battery"]
|
||||
|
||||
[dependencies]
|
||||
chrono = { version = "0.4.34", default-features = false, features = ["clock", "std", "wasmbind"] }
|
||||
clap = { version = "4.5.1", features = ["derive", "cargo", "unicode"] }
|
||||
clap_complete = "4.5.1"
|
||||
dirs-next = "2.0.0"
|
||||
dunce = "1.0.4"
|
||||
gethostname = "0.4.3"
|
||||
# default feature restriction addresses https://github.com/starship/starship/issues/4251
|
||||
gix = { version = "0.58.0", default-features = false, features = ["max-performance-safe", "revision"] }
|
||||
gix-features = { version = "0.38.0", optional = true }
|
||||
indexmap = { version = "2.2.3", features = ["serde"] }
|
||||
log = { version = "0.4.20", features = ["std"] }
|
||||
# notify-rust is optional (on by default) because the crate doesn't currently build for darwin with nix
|
||||
# see: https://github.com/NixOS/nixpkgs/issues/160876
|
||||
notify-rust = { version = "4.10.0", optional = true }
|
||||
nu-ansi-term = "0.50.0"
|
||||
once_cell = "1.19.0"
|
||||
open = "5.0.1"
|
||||
# update os module config and tests when upgrading os_info
|
||||
os_info = "3.7.0"
|
||||
path-slash = "0.2.1"
|
||||
pest = "2.7.7"
|
||||
pest_derive = "2.7.7"
|
||||
quick-xml = "0.31.0"
|
||||
rand = "0.8.5"
|
||||
rayon = "1.8.1"
|
||||
regex = { version = "1.10.3", default-features = false, features = ["perf", "std", "unicode-perl"] }
|
||||
rust-ini = "0.20.0"
|
||||
semver = "1.0.22"
|
||||
serde = { version = "1.0.196", features = ["derive"] }
|
||||
serde_json = "1.0.113"
|
||||
sha1 = "0.10.6"
|
||||
shadow-rs = { version = "0.26.1", default-features = false }
|
||||
clap = "2.33.0"
|
||||
ansi_term = "0.12.1"
|
||||
dirs = "2.0.2"
|
||||
git2 = { version = "0.11.0", default-features = false, features = [] }
|
||||
toml = "0.5.6"
|
||||
serde_json = "1.0.48"
|
||||
rayon = "1.3.0"
|
||||
pretty_env_logger = "0.4.0"
|
||||
log = "0.4.8"
|
||||
# battery is optional (on by default) because the crate doesn't currently build for Termux
|
||||
# see: https://github.com/svartalf/rust-battery/issues/33
|
||||
starship-battery = { version = "0.8.2", optional = true }
|
||||
strsim = "0.10.1"
|
||||
systemstat = "=0.2.3"
|
||||
terminal_size = "0.3.0"
|
||||
toml = { version = "0.8.10", features = ["preserve_order"] }
|
||||
toml_edit = "0.22.6"
|
||||
unicode-segmentation = "1.11.0"
|
||||
unicode-width = "0.1.11"
|
||||
urlencoding = "2.1.3"
|
||||
versions = "6.1.0"
|
||||
which = "6.0.0"
|
||||
yaml-rust = "0.4.5"
|
||||
|
||||
process_control = { version = "4.1.0", features = ["crossbeam-channel"] }
|
||||
|
||||
guess_host_triple = "0.1.3"
|
||||
home = "0.5.9"
|
||||
shell-words = "1.1.0"
|
||||
|
||||
[dependencies.schemars]
|
||||
version = "0.8.16"
|
||||
optional = true
|
||||
features = ["preserve_order", "indexmap2"]
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
deelevate = "0.2.0"
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
version = "0.52.0"
|
||||
features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_UI_Shell",
|
||||
"Win32_Security",
|
||||
"Win32_System_Threading",
|
||||
"Win32_Storage_FileSystem",
|
||||
]
|
||||
|
||||
[target.'cfg(not(windows))'.dependencies]
|
||||
nix = { version = "0.27.1", default-features = false, features = ["feature", "fs", "user"] }
|
||||
|
||||
[build-dependencies]
|
||||
shadow-rs = { version = "0.26.1", default-features = false }
|
||||
dunce = "1.0.4"
|
||||
|
||||
[target.'cfg(windows)'.build-dependencies]
|
||||
winres = "0.1.12"
|
||||
battery = { version = "0.7.5", optional = true }
|
||||
path-slash = "0.1.1"
|
||||
unicode-segmentation = "1.6.0"
|
||||
gethostname = "0.2.1"
|
||||
once_cell = "1.3.1"
|
||||
chrono = "0.4"
|
||||
sysinfo = "0.11.2"
|
||||
byte-unit = "3.0.3"
|
||||
starship_module_config_derive = { version = "0.1.0", path = "starship_module_config_derive" }
|
||||
yaml-rust = "0.4"
|
||||
nom = "5.1.0"
|
||||
regex = "1.3.1"
|
||||
os_info = "2.0.0"
|
||||
urlencoding = "1.0.0"
|
||||
open = "1.3.4"
|
||||
# OpenSSL causes problems when building a MUSL release. Opting to use native SSL implementation
|
||||
# see: https://github.com/richfelker/musl-cross-make/issues/65#issuecomment-509790889
|
||||
reqwest = { version = "0.10.1", default-features = false, features = ["blocking", "rustls-tls"] }
|
||||
unicode-width = "0.1.7"
|
||||
textwrap = "0.11.0"
|
||||
term_size = "0.3.1"
|
||||
|
||||
[dev-dependencies]
|
||||
mockall = "0.12"
|
||||
tempfile = "3.10.0"
|
||||
tempfile = "3.1.0"
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
strip = true
|
||||
|
||||
[[bin]]
|
||||
name = "starship"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2019-2022, Starship Contributors
|
||||
Copyright (c) 2019, Starship Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/actions/workflow/status/starship/starship/workflow.yml?branch=master&label=workflow&style=flat-square"
|
||||
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
@@ -22,7 +22,7 @@
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
alt="Packaging status"/></a
|
||||
><br />
|
||||
<a href="https://discord.gg/starship"
|
||||
<a href="https://discord.gg/8Jzqu3T"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat on Discord"
|
||||
@@ -32,17 +32,12 @@
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
<a href="https://stand-with-ukraine.pp.ua"
|
||||
><img
|
||||
src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraineFlat.svg"
|
||||
alt="Stand With Ukraine"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs">Website</a>
|
||||
·
|
||||
<a href="#🚀-installation">Installation</a>
|
||||
<a href="#-installation">Installation</a>
|
||||
·
|
||||
<a href="https://starship.rs/config/">Configuration</a>
|
||||
</p>
|
||||
@@ -55,46 +50,6 @@
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
|
||||
alt="Bahasa Indonesia"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
|
||||
alt="Italiano"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
@@ -104,11 +59,11 @@
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||
alt="Português do Brasil"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@@ -120,19 +75,11 @@
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/uk-UA/guide/README.md"
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ua.png"
|
||||
alt="Українська"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@@ -143,12 +90,18 @@
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
<a href="https://translate.starship.rs/project/starship-prompt/es"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a href="https://translate.starship.rs/project/starship-prompt/fr"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
@@ -161,8 +114,10 @@
|
||||
align="right"
|
||||
/>
|
||||
|
||||
|
||||
**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**
|
||||
|
||||
|
||||
- **Fast:** it's fast – _really really_ fast! 🚀
|
||||
- **Customizable:** configure every aspect of your prompt.
|
||||
- **Universal:** works on any shell, on any operating system.
|
||||
@@ -171,271 +126,113 @@
|
||||
- **Easy:** quick to install – start using it in minutes.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/config/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
<a href="https://starship.rs/"><strong>Explore the Starship docs ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
- A [Powerline font](https://github.com/powerline/fonts) installed and enabled in your terminal (for example, try [Fira Code](https://github.com/tonsky/FiraCode)).
|
||||
|
||||
### Step 1. Install Starship
|
||||
### Getting Started
|
||||
|
||||
Select your operating system from the list below to view installation instructions:
|
||||
1. Install the **starship** binary:
|
||||
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
#### Install Latest Version
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
##### From prebuilt binary, with Shell:
|
||||
|
||||
| Repository | Instructions |
|
||||
| ---------- | ---------------------- |
|
||||
| [Termux] | `pkg install starship` |
|
||||
```sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
```
|
||||
|
||||
</details>
|
||||
##### From source on [crates.io](https://crates.io/):
|
||||
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
```sh
|
||||
cargo install starship
|
||||
```
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
#### Install via Package Manager
|
||||
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------ | --------------- | --------------------------------- |
|
||||
| **_Any_** | **[crates.io]** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts] | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc] | `pkgin install starship` |
|
||||
##### With [Homebrew](https://brew.sh/):
|
||||
|
||||
</details>
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
##### With [Scoop](https://scoop.sh):
|
||||
|
||||
Install the latest version for your system:
|
||||
```powershell
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
1. Add the init script to your shell's config file:
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
#### Bash
|
||||
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------------ | ----------------------- | ------------------------------------------------------------- |
|
||||
| **_Any_** | **[crates.io]** | `cargo install starship --locked` |
|
||||
| _Any_ | [conda-forge] | `conda install -c conda-forge starship` |
|
||||
| _Any_ | [Linuxbrew] | `brew install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages] | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Extra] | `pacman -S starship` |
|
||||
| CentOS 7+ | [Copr] | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Gentoo | [Gentoo Packages] | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs] | `nix-env -iA nixpkgs.starship` |
|
||||
| openSUSE | [OSS] | `zypper in starship` |
|
||||
| Void Linux | [Void Linux Packages] | `xbps-install -S starship` |
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
|
||||
</details>
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
||||
<details>
|
||||
<summary>macOS</summary>
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
Install the latest version for your system:
|
||||
#### Fish
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
| Repository | Instructions |
|
||||
| --------------- | --------------------------------------- |
|
||||
| **[crates.io]** | `cargo install starship --locked` |
|
||||
| [conda-forge] | `conda install -c conda-forge starship` |
|
||||
| [Homebrew] | `brew install starship` |
|
||||
| [MacPorts] | `port install starship` |
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
</details>
|
||||
#### Zsh
|
||||
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
|
||||
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
| Repository | Instructions |
|
||||
| --------------- | --------------------------------------- |
|
||||
| **[crates.io]** | `cargo install starship --locked` |
|
||||
| [Chocolatey] | `choco install starship` |
|
||||
| [conda-forge] | `conda install -c conda-forge starship` |
|
||||
| [Scoop] | `scoop install starship` |
|
||||
| [winget] | `winget install --id Starship.Starship` |
|
||||
#### PowerShell
|
||||
|
||||
</details>
|
||||
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
|
||||
|
||||
### Step 2. Set up your shell to use Starship
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
Configure your shell to initialize starship. Select yours from the list below:
|
||||
#### Ion
|
||||
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
|
||||
Add the following to the end of `~/.bashrc`:
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd.
|
||||
Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
|
||||
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
Note: Only Elvish v0.18+ is supported
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
Add the following to the end of `~/.config/fish/config.fish`:
|
||||
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
Add the following to the end of `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
Note: Only Nushell v0.78+ is supported
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
Add the following to the end of `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Step 3. Configure Starship
|
||||
|
||||
Start a new shell instance, and you should see your beautiful new shell prompt.
|
||||
If you're happy with the defaults, enjoy!
|
||||
|
||||
If you're looking to further customize Starship:
|
||||
|
||||
- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking
|
||||
|
||||
- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
||||
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋
|
||||
|
||||
## 💭 Inspired By
|
||||
|
||||
Please check out these previous works that helped inspire the creation of starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** - A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** - Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
## ❤️ Sponsors
|
||||
|
||||
Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
|
||||
|
||||
**Supporter Tier**
|
||||
|
||||
- [Appwrite](https://appwrite.io/)
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** - A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
@@ -446,22 +243,3 @@ Support this project by [becoming a sponsor](https://github.com/sponsors/starshi
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br>
|
||||
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
|
||||
[alpine linux packages]: https://pkgs.alpinelinux.org/packages?name=starship
|
||||
[arch linux extra]: https://archlinux.org/packages/extra/x86_64/starship
|
||||
[chocolatey]: https://community.chocolatey.org/packages/starship
|
||||
[conda-forge]: https://anaconda.org/conda-forge/starship
|
||||
[copr]: https://copr.fedorainfracloud.org/coprs/atim/starship
|
||||
[crates.io]: https://crates.io/crates/starship
|
||||
[freshports]: https://www.freshports.org/shells/starship
|
||||
[gentoo packages]: https://packages.gentoo.org/packages/app-shells/starship
|
||||
[linuxbrew]: https://formulae.brew.sh/formula/starship
|
||||
[homebrew]: https://formulae.brew.sh/formula/starship
|
||||
[macports]: https://ports.macports.org/port/starship
|
||||
[nixpkgs]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix
|
||||
[OSS]: https://software.opensuse.org/package/starship
|
||||
[pkgsrc]: https://pkgsrc.se/shells/starship
|
||||
[scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json
|
||||
[termux]: https://github.com/termux/termux-packages/tree/master/packages/starship
|
||||
[void linux packages]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship
|
||||
[winget]: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
use std::fs::{self, File};
|
||||
use std::io;
|
||||
use std::io::Write;
|
||||
|
||||
use shadow_rs::SdResult;
|
||||
|
||||
fn main() -> SdResult<()> {
|
||||
shadow_rs::new_hook(gen_presets_hook)?;
|
||||
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set_manifest_file("starship.exe.manifest")
|
||||
.set_icon("media/icon.ico");
|
||||
res.compile()?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn gen_presets_hook(mut file: &File) -> SdResult<()> {
|
||||
println!("cargo:rerun-if-changed=docs/public/presets/toml");
|
||||
let paths = fs::read_dir("docs/public/presets/toml")?;
|
||||
let mut sortedpaths = paths.collect::<io::Result<Vec<_>>>()?;
|
||||
sortedpaths.sort_by_key(std::fs::DirEntry::path);
|
||||
|
||||
let mut presets = String::new();
|
||||
let mut match_arms = String::new();
|
||||
for unwrapped in sortedpaths {
|
||||
let file_name = unwrapped.file_name();
|
||||
let full_path = dunce::canonicalize(unwrapped.path())?;
|
||||
let full_path = full_path.to_str().expect("failed to convert to string");
|
||||
let name = file_name
|
||||
.to_str()
|
||||
.and_then(|v| v.strip_suffix(".toml"))
|
||||
.expect("Failed to process filename");
|
||||
presets.push_str(format!("print::Preset(\"{name}\"),\n").as_str());
|
||||
match_arms.push_str(format!(r#""{name}" => include_bytes!(r"{full_path}"),"#).as_str());
|
||||
}
|
||||
|
||||
writeln!(
|
||||
file,
|
||||
r#"
|
||||
use crate::print;
|
||||
|
||||
pub fn get_preset_list<'a>() -> &'a [print::Preset] {{
|
||||
&[
|
||||
{presets}
|
||||
]
|
||||
}}
|
||||
|
||||
pub fn get_preset_content(name: &str) -> &[u8] {{
|
||||
match name {{
|
||||
{match_arms}
|
||||
_ => unreachable!(),
|
||||
}}
|
||||
}}
|
||||
"#
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
disallowed-methods = [
|
||||
# std::process::Command::new may inadvertly run executables from the current working directory
|
||||
"std::process::Command::new",
|
||||
# Setting environment variables can cause issues with non-rust code
|
||||
"std::env::set_var",
|
||||
# use `dunce` to avoid UNC/verbatim paths, where possible
|
||||
"std::fs::canonicalize",
|
||||
]
|
||||
@@ -1,4 +1,3 @@
|
||||
pull_request_title: 'docs(i18n): new Crowdin updates'
|
||||
files:
|
||||
- source: /docs/**/*.md
|
||||
ignore:
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
[advisories]
|
||||
vulnerability = "deny"
|
||||
unmaintained = "warn"
|
||||
yanked = "warn"
|
||||
notice = "warn"
|
||||
|
||||
# A list of advisory IDs to ignore. Note that ignored advisories will still
|
||||
# output a note when they are encountered.
|
||||
ignore = [
|
||||
|
||||
|
||||
# "RUSTSEC-0000-0000",
|
||||
]
|
||||
|
||||
[licenses]
|
||||
# The lint level for crates which do not have a detectable license
|
||||
unlicensed = "deny"
|
||||
# List of explicitly allowed licenses
|
||||
allow = [
|
||||
"Apache-2.0 WITH LLVM-exception",
|
||||
"Apache-2.0",
|
||||
"BSD-2-Clause",
|
||||
"BSD-3-Clause",
|
||||
"CC0-1.0",
|
||||
"ISC",
|
||||
"MIT-0",
|
||||
"MIT",
|
||||
"MPL-2.0",
|
||||
"Unicode-DFS-2016",
|
||||
"Unlicense",
|
||||
"WTFPL",
|
||||
"Zlib",
|
||||
]
|
||||
confidence-threshold = 0.8
|
||||
|
||||
[bans]
|
||||
multiple-versions = "allow"
|
||||
wildcards = "warn"
|
||||
|
||||
[sources]
|
||||
unknown-registry = "warn"
|
||||
unknown-git = "warn"
|
||||
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
|
||||
allow-git = []
|
||||
@@ -1,415 +0,0 @@
|
||||
import { defineConfig } from "vitepress";
|
||||
|
||||
const sidebar = (lang: string | undefined, override = {}) =>
|
||||
[
|
||||
{ page: "guide", text: "Guide" }, // README, which should always have a override
|
||||
// Overrides for any page below is an inconsistency between the sidebar title and page title
|
||||
{ page: "installing", text: "Installation" },
|
||||
{ page: "config", text: "Configuration" },
|
||||
{ page: "advanced-config", text: "Advanced Configuration" },
|
||||
{ page: "faq", text: "FAQ" },
|
||||
{ page: "presets", text: "Presets" },
|
||||
].map(item => {
|
||||
let path = "/";
|
||||
|
||||
if (lang) {
|
||||
path += `${lang}/`;
|
||||
}
|
||||
|
||||
if (item.page) {
|
||||
path += `${item.page}/`;
|
||||
}
|
||||
|
||||
// If no override is set for current page, let VitePress fallback to page title
|
||||
return { link: path, text: override?.[item.page] ?? item.text };
|
||||
});
|
||||
|
||||
const editLinkPattern = 'https://github.com/starship/starship/edit/master/docs/:path';
|
||||
|
||||
export default defineConfig({
|
||||
locales: {
|
||||
root: {
|
||||
label: "English",
|
||||
lang: "en-US",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!",
|
||||
|
||||
themeConfig: {
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Configuration", link: "/config/"}],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("", {
|
||||
guide: "Guide",
|
||||
}),
|
||||
// Enable edit links
|
||||
editLink: {
|
||||
text: "Edit this page on GitHub",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
}
|
||||
},
|
||||
"de-DE": {
|
||||
label: "Deutsch",
|
||||
lang: "de-DE",
|
||||
title: "Starship",
|
||||
description: "Minimale, super schnelle und unendlich anpassbare Prompt für jede Shell!",
|
||||
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Sprachen",
|
||||
returnToTopLabel: "Zurück zum Seitenanfang",
|
||||
sidebarMenuLabel: "Menü",
|
||||
|
||||
nav: [{ text: "Konfiguration", link: "/de-DE/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("de-DE", {
|
||||
guide: "Anleitung",
|
||||
installing: "Erweiterte Installation",
|
||||
faq: "Häufig gestellte Fragen",
|
||||
presets: "Konfigurations-Beispiele",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Bearbeite diese Seite auf GitHub",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
}
|
||||
},
|
||||
"es-ES": {
|
||||
label: "Español",
|
||||
lang: "es-ES",
|
||||
title: "Starship",
|
||||
description:
|
||||
"¡El prompt minimalista, ultrarápido e infinitamente personalizable para cualquier intérprete de comandos!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Idiomas",
|
||||
returnToTopLabel: "Volver arriba",
|
||||
sidebarMenuLabel: "Menú",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Configuración", link: "/es-ES/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("es-ES", {
|
||||
guide: "Guía",
|
||||
installing: "Instalación avanzada",
|
||||
faq: "Preguntas frecuentes",
|
||||
presets: "Ajustes predeterminados",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Edita esta página en GitHub",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"fr-FR": {
|
||||
label: "Français",
|
||||
lang: "fr-FR",
|
||||
title: "Starship",
|
||||
description: "L'invite minimaliste, ultra-rapide et personnalisable à l'infini pour n'importe quel shell !",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Langues",
|
||||
returnToTopLabel: "Retour en haut",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Configuration", link: "/fr-FR/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("fr-FR", {
|
||||
guide: "Guide",
|
||||
installing: "Installation avancée",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Éditez cette page sur GitHub",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"id-ID": {
|
||||
label: "Bahasa Indonesia",
|
||||
lang: "id-ID",
|
||||
title: "Starship",
|
||||
description: "Prompt yang minimal, super cepat, dan dapat disesuaikan tanpa batas untuk shell apa pun!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Languages",
|
||||
returnToTopLabel: "Kembali ke atas",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Konfigurasi", link: "/id-ID/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("id-ID", {
|
||||
guide: "Petunjuk",
|
||||
installing: "Advanced Installation",
|
||||
faq: "Pertanyaan Umum",
|
||||
presets: "Prasetel",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Sunting halaman ini di Github",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"it-IT": {
|
||||
label: "Italiano",
|
||||
lang: "it-IT",
|
||||
title: "Starship",
|
||||
description: "Il prompt minimalista, super veloce e infinitamente personalizzabile per qualsiasi shell!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Languages",
|
||||
returnToTopLabel: "Torna all'inizio",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Configuration", link: "/it-IT/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("it-IT", {
|
||||
guide: "Guide",
|
||||
installing: "Installazione Avanzata",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Modifica questa pagina in Github",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"ja-JP": {
|
||||
label: "日本語",
|
||||
lang: "ja-JP",
|
||||
title: "Starship",
|
||||
description: "シェル用の最小限の、非常に高速で、無限にカスタマイズ可能なプロンプトです!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "言語",
|
||||
returnToTopLabel: "ページの先頭へ",
|
||||
sidebarMenuLabel: "メニュー",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "設定", link: "/ja-JP/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("ja-JP", {
|
||||
guide: "ガイド",
|
||||
installing: "高度なインストール",
|
||||
}),
|
||||
editLink: {
|
||||
text: "GitHub で編集する",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"pt-BR": {
|
||||
label: "Português do Brasil",
|
||||
lang: "pt-BR",
|
||||
title: "Starship",
|
||||
description:
|
||||
"O prompt minimalista, extremamente rápido e infinitamente personalizável para qualquer shell!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Languages",
|
||||
returnToTopLabel: "Voltar ao topo",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Configuração", link: "/pt-BR/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("pt-BR", {
|
||||
guide: "Guia",
|
||||
installing: "Instalação avançada",
|
||||
faq: "Perguntas frequentes",
|
||||
presets: "Predefinições",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Edite esta página no Github",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"ru-RU": {
|
||||
label: "Русский",
|
||||
lang: "ru-RU",
|
||||
title: "Starship",
|
||||
description: "Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Языки",
|
||||
returnToTopLabel: "Наверх",
|
||||
sidebarMenuLabel: "Меню",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Настройка", link: "/ru-RU/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("ru-RU", {
|
||||
guide: "Руководство",
|
||||
installing: "Advanced Installation",
|
||||
config: "Настройка",
|
||||
"advanced-config": "Расширенная Настройка",
|
||||
faq: "Часто Задаваемые Вопросы",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Редактировать эту страницу на GitHub",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"uk-UA": {
|
||||
label: "Українська",
|
||||
lang: "uk-UA",
|
||||
title: "Starship",
|
||||
description: "Простий, супер швидкий та безмежно адаптивний командний рядок для будь-якої оболонки!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Мови",
|
||||
returnToTopLabel: "Догори",
|
||||
sidebarMenuLabel: "Меню",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Налаштування", link: "/uk-UA/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("uk-UA", {
|
||||
guide: "Керівництво",
|
||||
installing: "Розширене встановлення",
|
||||
config: "Налаштування",
|
||||
"advanced-config": "Розширені налаштування",
|
||||
faq: "Часті питання",
|
||||
presets: "Шаблони",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Редагувати цю сторінку на GitHub",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"vi-VN": {
|
||||
label: "Tiếng Việt",
|
||||
lang: "vi-VN",
|
||||
title: "Starship",
|
||||
description: "Nhỏ gọn, cực nhanh, và khả năng tuỳ chỉnh vô hạn prompt cho bất kì shell nào!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "Ngôn ngữ",
|
||||
returnToTopLabel: "Quay lại đầu trang",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Cấu hình", link: "/vi-VN/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("vi-VN", {
|
||||
guide: "Hướng dẫn",
|
||||
installing: "Cài đặt nâng cao",
|
||||
faq: "Các hỏi thường gặp",
|
||||
}),
|
||||
editLink: {
|
||||
text: "Chỉnh sửa trang này trên GitHub",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"zh-CN": {
|
||||
label: "简体中文",
|
||||
lang: "zh-CN",
|
||||
title: "Starship",
|
||||
description: "轻量级、反应迅速,可定制的高颜值终端!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "语言",
|
||||
returnToTopLabel: "返回顶部",
|
||||
sidebarMenuLabel: "目录",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "配置", link: "/zh-CN/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("zh-CN", {
|
||||
guide: "指南",
|
||||
installing: "高级安装",
|
||||
presets: "社区配置分享",
|
||||
}),
|
||||
editLink: {
|
||||
text: "在 GitHub 上修改此页",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
"zh-TW": {
|
||||
label: "繁體中文",
|
||||
lang: "zh-TW",
|
||||
title: "Starship",
|
||||
description: "適合任何 shell 的最小、極速、無限客製化的提示字元!",
|
||||
themeConfig: {
|
||||
// text for the language dropdown
|
||||
langMenuLabel: "語言",
|
||||
returnToTopLabel: "返回頂部",
|
||||
sidebarMenuLabel: "目錄",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "設定", link: "/zh-TW/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: sidebar("zh-TW", {
|
||||
guide: "指引",
|
||||
installing: "進階安裝",
|
||||
}),
|
||||
editLink: {
|
||||
text: "在 GitHub 上修改此頁面",
|
||||
pattern: editLinkPattern,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
// prettier-ignore
|
||||
head: [
|
||||
["link", { rel: "icon", href: "/icon.png" }],
|
||||
["meta", { property: "og:title", content: "Starship: Cross-Shell Prompt" }],
|
||||
["meta", {
|
||||
property: "og:description",
|
||||
content:
|
||||
"Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and Powershell.",
|
||||
}],
|
||||
["meta", { property: "og:type", content: "website" }],
|
||||
["meta", { property: "og:url", content: "https://starship.rs/" }],
|
||||
["meta", { property: "og:image", content: "https://starship.rs/icon.png" }],
|
||||
["meta", { name: "twitter:card", content: "summary" }],
|
||||
["meta", { name: "twitter:title", content: "Starship: Cross-Shell Prompt" }],
|
||||
["meta", {
|
||||
name: "twitter:description",
|
||||
content:
|
||||
"Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and Powershell.",
|
||||
}],
|
||||
["meta", { name: "twitter:image", content: "https://starship.rs/icon.png" }],
|
||||
["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt" }],
|
||||
// Google Analytics
|
||||
[
|
||||
"script",
|
||||
{
|
||||
async: '',
|
||||
src: "https://www.googletagmanager.com/gtag/js?id=G-N3M0VJ9NL6",
|
||||
},
|
||||
],
|
||||
[
|
||||
"script",
|
||||
{},
|
||||
"window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-N3M0VJ9NL6');",
|
||||
],
|
||||
],
|
||||
sitemap: {
|
||||
hostname: 'https://starship.rs'
|
||||
},
|
||||
vite: {
|
||||
resolve: {
|
||||
preserveSymlinks: true
|
||||
}
|
||||
},
|
||||
cleanUrls: true,
|
||||
markdown: {
|
||||
theme: "github-dark"
|
||||
},
|
||||
ignoreDeadLinks: [
|
||||
/\/toml\/.*/,
|
||||
],
|
||||
// VitePress doesn't support README.md as index files
|
||||
// Rewrite README.md to index.md at different levels
|
||||
rewrites: {
|
||||
"README.md": "index.md",
|
||||
":c0/README.md": ":c0/index.md",
|
||||
":c0/:c1/README.md": ":c0/:c1/index.md",
|
||||
":c0/:c1/:c2/README.md": ":c0/:c1/:c2/index.md",
|
||||
":c0/:c1/:c2/:c3/README.md": ":c0/:c1/:c2/:c3/index.md",
|
||||
},
|
||||
themeConfig: {
|
||||
logo: "/icon.png",
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/starship/starship' },
|
||||
],
|
||||
|
||||
// enables Algolia DocSearch
|
||||
algolia: {
|
||||
apiKey: "44118471f56286dcda7db941a043370d",
|
||||
indexName: "starship",
|
||||
appId: "M3XUO3SQOR",
|
||||
},
|
||||
}
|
||||
});
|
||||
@@ -1,4 +0,0 @@
|
||||
import DefaultTheme from "vitepress/theme";
|
||||
import "./index.styl";
|
||||
|
||||
export default DefaultTheme;
|
||||
@@ -1,87 +0,0 @@
|
||||
@import "palette"
|
||||
|
||||
.VPHero .container
|
||||
flex-direction: column
|
||||
text-align: center !important
|
||||
gap: 10px
|
||||
|
||||
.VPHero .image
|
||||
order: 0
|
||||
margin: 0
|
||||
|
||||
.VPHero .image-container
|
||||
transform: none
|
||||
height: auto
|
||||
|
||||
.VPHero .image img
|
||||
max-height: 130px
|
||||
max-width: none
|
||||
position: static
|
||||
transform: none
|
||||
|
||||
.VPHero .container .actions
|
||||
justify-content: center !important
|
||||
|
||||
.VPHero .main
|
||||
margin: 0 auto
|
||||
|
||||
.demo-video
|
||||
max-width: 700px // The width of the video
|
||||
width: 100%
|
||||
margin: 50px auto
|
||||
border-radius: 6px
|
||||
|
||||
.action-button
|
||||
background-color: #dd0b78 !important
|
||||
border-bottom: #c6096b !important
|
||||
|
||||
p[align="center"]
|
||||
img
|
||||
display: inline-block
|
||||
img[height="20"]
|
||||
height: 20px
|
||||
|
||||
@font-face
|
||||
font-family: 'Nerd Font'
|
||||
src: url("/nerd-font.woff2") format("woff2")
|
||||
font-weight: 400
|
||||
font-style: normal
|
||||
unicode-range: e000-f8ff, f0000-fffff, 100000-10ffff
|
||||
|
||||
code
|
||||
overflow-wrap: break-word
|
||||
|
||||
.vp-doc [class*='language-'] > button.copy
|
||||
top: unset
|
||||
bottom: 12px
|
||||
|
||||
:root
|
||||
--vp-font-family-mono: 'Nerd Font', source-code-pro, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace
|
||||
--vp-c-brand-1: darken($accentColor, 30%)
|
||||
--vp-c-brand-2: lighten($accentColor, 10%)
|
||||
--vp-c-brand-3: $accentColor
|
||||
--vp-c-brand-soft: rgba($accentColor, 0.14)
|
||||
|
||||
/* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css#L319-L362 */
|
||||
--vp-code-block-bg: $codeBgLightColor
|
||||
--vp-code-color: $codeBgLightColor
|
||||
--vp-code-block-divider-color: $dark-gutter
|
||||
|
||||
--vp-code-lang-color: $dark-text-3
|
||||
|
||||
--vp-code-line-highlight-color: $dark-default-soft
|
||||
--vp-code-line-number-color: $dark-text-3
|
||||
|
||||
--vp-code-copy-code-border-color: $dark-divider
|
||||
--vp-code-copy-code-bg: $dark-bg-soft
|
||||
--vp-code-copy-code-hover-border-color: $dark-divider
|
||||
--vp-code-copy-code-hover-bg: $dark-bg
|
||||
--vp-code-copy-code-active-text: $dark-text-2
|
||||
|
||||
.dark
|
||||
--vp-c-brand-1: lighten($accentDarkColor, 30%)
|
||||
--vp-c-brand-2: darken($accentDarkColor, 10%)
|
||||
--vp-c-brand-3: $accentDarkColor
|
||||
--vp-c-brand-soft: rgba($accentDarkColor, 0.14)
|
||||
|
||||
--vp-code-color: $preTextLightColor
|
||||
@@ -1,19 +0,0 @@
|
||||
$accentColor = #DD0B78
|
||||
$accentDarkColor = #ff33b8
|
||||
$textColor = #2c3e50
|
||||
$borderColor = #eaecef
|
||||
$codeBgLightColor = #282c34
|
||||
$preTextLightColor = #fff
|
||||
|
||||
/* Colors extracted from the dark VitePress theme */
|
||||
$dark-bg = #1b1b1f
|
||||
$dark-bg-alt = #161618
|
||||
$dark-bg-elv = #202127
|
||||
$dark-bg-soft = #202127
|
||||
$dark-border = #3c3f44
|
||||
$dark-divider = #2e2e32
|
||||
$dark-gutter = #000
|
||||
$dark-text-1 = rgba(255, 255, 245, 0.86)
|
||||
$dark-text-2 = rgba(235, 235, 245, 0.6)
|
||||
$dark-text-3 = rgba(235, 235, 245, 0.38)
|
||||
$dark-default-soft = rgba(101, 117, 133, 0.16)
|
||||
@@ -0,0 +1,198 @@
|
||||
module.exports = {
|
||||
locales: {
|
||||
"/": {
|
||||
lang: "en-US",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!"
|
||||
},
|
||||
"/de-DE/": {
|
||||
lang: "de-DE",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!"
|
||||
},
|
||||
"/ru-RU/": {
|
||||
lang: "ru-RU",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!"
|
||||
},
|
||||
"/ja-JP/": {
|
||||
lang: "ja-JP",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!"
|
||||
},
|
||||
"/zh-CN/": {
|
||||
lang: "zh-CN",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!"
|
||||
},
|
||||
"/zh-TW/": {
|
||||
lang: "zh-TW",
|
||||
title: "Starship",
|
||||
description: "The minimal, blazing-fast, and infinitely customizable prompt for any shell!"
|
||||
}
|
||||
},
|
||||
// prettier-ignore
|
||||
head: [
|
||||
["link", { rel: "icon", href: "/icon.png" }],
|
||||
["meta", { property: "og:title", content: "Starship: Cross-Shell Prompt" }],
|
||||
["meta", { property: "og:description", content: "Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and Powershell."}],
|
||||
["meta", { property: "og:type", content: "website" }],
|
||||
["meta", { property: "og:url", content: "https://starship.rs/" }],
|
||||
["meta", { property: "og:image", content: "https://starship.rs/icon.png" }],
|
||||
["meta", { name: "twitter:card", content: "summary"}],
|
||||
["meta", { name: "twitter:title", content: "Starship: Cross-Shell Prompt"}],
|
||||
["meta", { name: "twitter:description", content: "Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and Powershell."}],
|
||||
["meta", { name: "twitter:image", content: "https://starship.rs/icon.png"}],
|
||||
["meta", { name: "twitter:alt", content: "Starship: Cross-Shell Prompt"}],
|
||||
],
|
||||
theme: "default-prefers-color-scheme",
|
||||
themeConfig: {
|
||||
logo: "/icon.png",
|
||||
// the GitHub repo path
|
||||
repo: "starship/starship",
|
||||
// the label linking to the repo
|
||||
repoLabel: "GitHub",
|
||||
// if your docs are not at the root of the repo:
|
||||
docsDir: "docs",
|
||||
// defaults to false, set to true to enable
|
||||
editLinks: true,
|
||||
// enables Algolia DocSearch
|
||||
algolia: {
|
||||
apiKey: "107bdc34b894d5d1dd0824b420184c2d",
|
||||
indexName: "starship"
|
||||
},
|
||||
postcss: {
|
||||
plugins: [
|
||||
require('css-prefers-color-scheme/postcss'),
|
||||
]
|
||||
},
|
||||
locales: {
|
||||
"/": {
|
||||
// text for the language dropdown
|
||||
selectText: "Languages",
|
||||
// label for this locale in the language dropdown
|
||||
label: "English",
|
||||
// Custom text for edit link. Defaults to "Edit this page"
|
||||
editLinkText: "Edit this page on GitHub",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Configuration", link: "/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: [
|
||||
"/",
|
||||
["/guide/", "Guide"],
|
||||
["/config/", "Configuration"],
|
||||
["/advanced-config/", "Advanced Configuration"],
|
||||
["/faq/", "Frequently Asked Questions"],
|
||||
["/presets/", "Presets"]
|
||||
]
|
||||
},
|
||||
"/de-DE/": {
|
||||
// text for the language dropdown
|
||||
selectText: "Sprachen",
|
||||
// label for this locale in the language dropdown
|
||||
label: "Deutsch",
|
||||
// Custom text for edit link. Defaults to "Edit this page"
|
||||
editLinkText: "Bearbeite diese Seite auf GitHub",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Konfiguration", link: "/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: [
|
||||
"/de-DE/",
|
||||
["/de-DE/guide/", "Anleitung"],
|
||||
["/de-DE/config/", "Konfiguration"],
|
||||
["/de-DE/advanced-config/", "Erweiterte Konfiguration"],
|
||||
["/de-DE/faq/", "Häufig gestellte Fragen"],
|
||||
["/de-DE/presets/", "Konfigurations-Beispiele"]
|
||||
]
|
||||
},
|
||||
"/ru-RU/": {
|
||||
// text for the language dropdown
|
||||
selectText: "Языки",
|
||||
// label for this locale in the language dropdown
|
||||
label: "Русский",
|
||||
// Custom text for edit link. Defaults to "Edit this page"
|
||||
editLinkText: "Редактировать эту страницу на GitHub",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "Настройка", link: "/ru-RU/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: [
|
||||
"/ru-RU/",
|
||||
["/ru-RU/guide/", "Руководство"],
|
||||
["/ru-RU/config/", "Настройка"],
|
||||
["/ru-RU/advanced-config/", "Расширенная Настройка"],
|
||||
["/ru-RU/faq/", "Часто Задаваемые Вопросы"],
|
||||
["/ru-RU/presets/", "Предустановки"]
|
||||
]
|
||||
},
|
||||
"/ja-JP/": {
|
||||
// text for the language dropdown
|
||||
selectText: "言語",
|
||||
// label for this locale in the language dropdown
|
||||
label: "日本語",
|
||||
// Custom text for edit link. Defaults to "Edit this page"
|
||||
editLinkText: "GitHub で編集する",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "設定", link: "/ja-JP/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: [
|
||||
"/ja-JP/",
|
||||
["/ja-JP/guide/", "ガイド"],
|
||||
["/ja-JP/config/", "設定"],
|
||||
["/ja-JP/advanced-config/", "高度な設定"],
|
||||
["/ja-JP/faq/", "FAQ"],
|
||||
["/ja-JP/presets/", "準備するもの"]
|
||||
]
|
||||
},
|
||||
"/zh-TW/": {
|
||||
// text for the language dropdown
|
||||
selectText: "語言",
|
||||
// label for this locale in the language dropdown
|
||||
label: "繁體中文",
|
||||
// Custom text for edit link. Defaults to "Edit this page"
|
||||
editLinkText: "在 GitHub 上修改此頁面",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "設定", link: "/zh-TW/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: [
|
||||
"/zh-TW/",
|
||||
["/zh-TW/guide/", "指引"],
|
||||
["/zh-TW/config/", "設定"],
|
||||
["/zh-TW/advanced-config/", "進階設定"]
|
||||
]
|
||||
},
|
||||
"/zh-CN/": {
|
||||
// text for the language dropdown
|
||||
selectText: "语言",
|
||||
// label for this locale in the language dropdown
|
||||
label: "简体中文",
|
||||
// Custom text for edit link. Defaults to "Edit this page"
|
||||
editLinkText: "在 GitHub 上修改此页",
|
||||
// Custom navbar values
|
||||
nav: [{ text: "配置", link: "/zh-CN/config/" }],
|
||||
// Custom sidebar values
|
||||
sidebar: [
|
||||
"/zh-CN/",
|
||||
["/zh-CN/guide/", "指南"],
|
||||
["/zh-CN/config/", "配置"],
|
||||
["/zh-CN/advanced-config/", "高级配置"],
|
||||
["/zh-CN/faq/", "常见问题"],
|
||||
["/zh-CN/presets/", "社区配置分享"]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
[
|
||||
"@vuepress/google-analytics",
|
||||
{
|
||||
ga: "UA-71160903-4"
|
||||
}
|
||||
],
|
||||
[
|
||||
"sitemap",
|
||||
{
|
||||
hostname: "https://starship.rs"
|
||||
}
|
||||
]
|
||||
]
|
||||
};
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../../media/icon.png
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../../install/install.sh
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../../media/logo.png
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../../media/logo.svg
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 334 KiB |
@@ -0,0 +1,28 @@
|
||||
.home .hero img
|
||||
max-width: 500px !important
|
||||
min-width: 300px
|
||||
width: 100%
|
||||
|
||||
.center
|
||||
margin 0 auto;
|
||||
width: 80%
|
||||
.demo-video
|
||||
width: 100%
|
||||
margin: 50px 0
|
||||
border-radius: 6px
|
||||
|
||||
.hero
|
||||
margin: 150px 25px 70px
|
||||
|
||||
.action-button
|
||||
background-color: #dd0b78 !important
|
||||
border-bottom: #c6096b !important
|
||||
|
||||
@font-face
|
||||
font-family: 'Nerd Font';
|
||||
src: url("/nerd-font.woff2") format("woff2");
|
||||
font-weight: 400;
|
||||
font-style: normal
|
||||
|
||||
code
|
||||
font-family: 'Nerd Font', source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||
@@ -0,0 +1,6 @@
|
||||
$accentColor = #DD0B78
|
||||
$accentDarkColor = #ff33b8
|
||||
$textColor = #2c3e50
|
||||
$borderColor = #eaecef
|
||||
$codeBgLightColor = #282c34
|
||||
$preTextLightColor = #fff
|
||||
+19
-92
@@ -1,13 +1,10 @@
|
||||
---
|
||||
layout: home
|
||||
hero:
|
||||
image: /logo.svg
|
||||
text: null
|
||||
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Get Started →
|
||||
link: ./guide/
|
||||
home: true
|
||||
heroImage: /logo.svg
|
||||
heroText: null
|
||||
tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
||||
actionText: Get Started →
|
||||
actionLink: ./guide/
|
||||
features:
|
||||
- title: Compatibility First
|
||||
details: Works on the most common shells on the most common operating systems. Use it everywhere!
|
||||
@@ -19,17 +16,15 @@ footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
|
||||
# Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell.
|
||||
---
|
||||
|
||||
<video class="demo-video" muted autoplay loop playsinline>
|
||||
<source src="/demo.webm" type="video/webm">
|
||||
<source src="/demo.mp4" type="video/mp4">
|
||||
</video>
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
<div class="center">
|
||||
<video class="demo-video" muted autoplay loop playsinline>
|
||||
<source src="/demo.webm" type="video/webm">
|
||||
<source src="/demo.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### Quick Install
|
||||
|
||||
@@ -40,11 +35,9 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
curl -fsSL https://starship.rs/install.sh | bash
|
||||
```
|
||||
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
With [Homebrew](https://brew.sh/):
|
||||
@@ -53,10 +46,10 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
brew install starship
|
||||
```
|
||||
|
||||
With [Winget](https://github.com/microsoft/winget-cli):
|
||||
With [Scoop](https://scoop.sh):
|
||||
|
||||
```powershell
|
||||
winget install starship
|
||||
scoop install starship
|
||||
```
|
||||
|
||||
1. Add the init script to your shell's config file:
|
||||
@@ -93,9 +86,11 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
#### Powershell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
Add the following to the end of `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` (or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix):
|
||||
|
||||
```sh
|
||||
# ~\Documents\PowerShell\Profile.ps1
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
@@ -108,71 +103,3 @@ description: Starship is the minimal, blazing fast, and extremely customizable p
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning
|
||||
|
||||
Only elvish v0.18 or higher is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to the end of `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
#### Tcsh
|
||||
|
||||
Add the following to the end of `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning
|
||||
|
||||
This will change in the future.
|
||||
Only Nushell v0.78+ is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
#### Xonsh
|
||||
|
||||
Add the following to the end of `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
#### Cmd
|
||||
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
+21
-298
@@ -10,169 +10,6 @@ The configurations in this section are subject to change in future releases of S
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This
|
||||
is useful in cases where all the prompt information is not always needed. To enable
|
||||
this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put
|
||||
this statement in your `$PROFILE`. Transience can be disabled on-the-fly with
|
||||
`Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this,
|
||||
define a new function called `Invoke-Starship-TransientFunction`. For example, to
|
||||
display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This
|
||||
is useful in cases where all the prompt information is not always needed. To enable
|
||||
this, run `clink set prompt.transient <value>` where \<value\> can be one of:
|
||||
|
||||
- `always`: always replace the previous prompt
|
||||
- `same_dir`: replace the previous prompt only if the working directory is same
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua`
|
||||
to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this,
|
||||
define a new function called `starship_transient_prompt_func`. This function
|
||||
receives the current prompt as a string that you can utilize. For example, to
|
||||
display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new
|
||||
function called `starship_transient_rprompt_func`. This function receives the
|
||||
current prompt as a string that you can utilize. For example, to display
|
||||
the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Fish
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This
|
||||
is useful in cases where all the prompt information is not always needed. To enable
|
||||
this, run `enable_transience` in the shell session. To make it permanent, put
|
||||
this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with
|
||||
`disable_transience`.
|
||||
|
||||
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty,
|
||||
and syntactically correct.
|
||||
|
||||
- By default, the left side of input gets replaced with a bold-green `❯`. To customize this,
|
||||
define a new function called `starship_transient_prompt_func`. For example, to
|
||||
display Starship's `character` module here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_prompt_func
|
||||
starship module character
|
||||
end
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new
|
||||
function called `starship_transient_rprompt_func`. For example, to display
|
||||
the time at which the last command was started here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_rprompt_func
|
||||
starship module time
|
||||
end
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Bash
|
||||
|
||||
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework allows you to replace
|
||||
the previous-printed prompt with custom strings. This is useful in cases where all
|
||||
the prompt information is not always needed. To enable this, put this in `~/.bashrc`
|
||||
`bleopt prompt_ps1_transient=<value>`:
|
||||
|
||||
The \<value\> here is a colon-separated list of `always`, `same-dir` and `trim`.
|
||||
When `prompt_ps1_final` is empty and this option has a non-empty value,
|
||||
the prompt specified by `PS1` is erased on leaving the current command line.
|
||||
If the value contains a field `trim`, only the last line of multiline `PS1` is
|
||||
preserved and the other lines are erased. Otherwise, the command line will be
|
||||
redrawn as if `PS1=` is specified. When a field `same-dir` is contained in the
|
||||
value and the current working directory is different from the final directory of
|
||||
the previous command line, this option `prompt_ps1_transient` is ignored.
|
||||
|
||||
Make the following changes to your `~/.bashrc` to customize what gets displayed on
|
||||
the left and on the right:
|
||||
|
||||
- To customize what the left side of input gets replaced with, configure the
|
||||
`prompt_ps1_final` Ble.sh option. For example, to display Starship's `character`
|
||||
module here, you would do
|
||||
|
||||
```bash
|
||||
bleopt prompt_ps1_final="$(starship module character)"
|
||||
```
|
||||
|
||||
- To customize what the right side of input gets replaced with, configure the
|
||||
`prompt_rps1_final` Ble.sh option. For example, to display
|
||||
the time at which the last command was started here, you would do
|
||||
|
||||
```bash
|
||||
bleopt prompt_rps1_final="$(starship module time)"
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Cmd
|
||||
|
||||
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands
|
||||
in Cmd shell. It is fairly simple to use with Starship. Make the following changes
|
||||
to your `starship.lua` file as per your requirements:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new
|
||||
function called `starship_preprompt_user_func`. This function receives
|
||||
the current prompt as a string that you can utilize. For example, to
|
||||
draw a rocket before the prompt, you would do
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
print("🚀")
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- To run a custom function right before a command is executed, define a new
|
||||
function called `starship_precmd_user_func`. This function receives
|
||||
the current commandline as a string that you can utilize. For example, to
|
||||
print the command that's about to be executed, you would do
|
||||
|
||||
```lua
|
||||
function starship_precmd_user_func(line)
|
||||
print("Executing: "..line)
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Bash
|
||||
|
||||
Bash does not have a formal preexec/precmd framework like most other shells.
|
||||
@@ -191,9 +28,9 @@ function blastoff(){
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the
|
||||
- To run a custom function right before a command runs, you can use the
|
||||
[`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/).
|
||||
However, you **must** trap the DEBUG signal _before_ initializing Starship!
|
||||
However, you **must** trap the DEBUG signal *before* initializing Starship!
|
||||
Starship can preserve the value of the DEBUG trap, but if the trap is overwritten
|
||||
after starship starts up, some functionality will break.
|
||||
|
||||
@@ -202,32 +39,15 @@ function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells.
|
||||
Because of this, it is difficult to provide fully customizable hooks in `powershell`.
|
||||
However, Starship does give you limited ability to insert your own functions
|
||||
into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to
|
||||
Some shell prompts will automatically change the window title for you (e.g. to
|
||||
reflect your working directory). Fish even does it by default.
|
||||
Starship does not do this, but it's fairly straightforward to add this
|
||||
functionality to `bash`, `zsh`, `cmd` or `powershell`.
|
||||
functionality to `bash` or `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
@@ -252,129 +72,32 @@ In `zsh`, add this to the `precmd_functions` array:
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file
|
||||
(`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
For example, if you want to display your current directory in your terminal tab title,
|
||||
add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; $(basename "$PWD") \007"
|
||||
}
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a"
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can
|
||||
set the content of the right prompt using the `right_format` option. Any module that can be used
|
||||
in `format` is also supported in `right_format`. The `$all` variable will only contain modules
|
||||
not explicitly used in either `format` or `right_format`.
|
||||
|
||||
Note: The right prompt is a single line following the input location. To right align modules above
|
||||
the input line in a multi-line prompt, see the [`fill` module](../config/#fill).
|
||||
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell, bash.
|
||||
|
||||
Note: The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework should be installed in order to use right prompt in bash.
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A minimal left prompt
|
||||
format = """$character"""
|
||||
|
||||
# move the rest of the prompt to the right
|
||||
right_format = """$all"""
|
||||
```
|
||||
|
||||
Produces a prompt like the following:
|
||||
|
||||
```
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
```
|
||||
|
||||
## Continuation Prompt
|
||||
|
||||
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
|
||||
|
||||
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `'[∙](bright-black) '`.
|
||||
|
||||
Note: `continuation_prompt` should be set to a literal string without any variables.
|
||||
|
||||
Note: Continuation prompts are only available in the following shells:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A continuation prompt that displays two filled in arrows
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
If you like the result, add these lines to your shell configuration file
|
||||
(`~/.bashrc` or `~/.zsrhc`) to make it permanent.
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
- `bold`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
The `none` token overrides all other tokens in a string, so that e.g. `fg:red none fg:blue` will still create a string with no styling. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`,
|
||||
`yellow`, `purple`, `cyan`, `white`. You can optionally prefix these
|
||||
with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an
|
||||
[RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`,
|
||||
`yellow`, `purple`, `cyan`, `white`. You can optionally prefix these
|
||||
with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an
|
||||
[RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
|
||||
@@ -1,191 +0,0 @@
|
||||
---
|
||||
layout: home
|
||||
hero:
|
||||
image: /logo.svg
|
||||
text: null
|
||||
tagline: التخصيص البسيط و السريع و الغير محدود لي ال"shell"!
|
||||
actions:
|
||||
- theme: brand
|
||||
text: البدء مع Starship ←
|
||||
link: ./guide/
|
||||
features:
|
||||
-
|
||||
title: التوافق أولاً
|
||||
details: يعمل على أكثر موجهات الأوامر شيوعاً في أكثر نظم التشغيل شيوعاً. استخدمه في كل مكان!
|
||||
-
|
||||
title: Rust-Powered
|
||||
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
|
||||
-
|
||||
title: قابل للتخصيص
|
||||
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
<video class="demo-video" muted autoplay loop playsinline>
|
||||
<source src="/demo.webm" type="video/webm">
|
||||
<source src="/demo.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك.
|
||||
|
||||
### تثبيت سريع
|
||||
|
||||
1. تثبيت **starship**:
|
||||
|
||||
|
||||
#### تثبيت أحدث إصدار
|
||||
|
||||
بإستخدام Shell:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
لتحديث Starship نفسه، أعد تشغيل البرنامج النصي أعلاه. سيتم استبدال الإصدار الحالي بدون لمس تكوين Starship.
|
||||
|
||||
|
||||
#### التثبيت عبر مدير الحزم
|
||||
|
||||
بإستخدام [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
With [Winget](https://github.com/microsoft/winget-cli):
|
||||
|
||||
```powershell
|
||||
winget install starship
|
||||
```
|
||||
|
||||
1. أضف ما يلي إلى ملف تكوين موجه الأوامر الخاص بك:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
|
||||
#### Fish
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
|
||||
#### Zsh
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
|
||||
#### Ion
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning
|
||||
|
||||
Only elvish v0.18 or higher is supported.
|
||||
|
||||
:::
|
||||
|
||||
أضف ما يلي إلى نهاية الملف `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning
|
||||
|
||||
This will change in the future. Only Nushell v0.78+ is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Cmd
|
||||
|
||||
عليك بإستخدام [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) مع Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
@@ -1,284 +0,0 @@
|
||||
# الإعداد المتقدم
|
||||
|
||||
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
|
||||
|
||||
::: تحذير
|
||||
|
||||
The configurations in this section are subject to change in future releases of Starship.
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
|
||||
|
||||
- `always`: always replace the previous prompt
|
||||
- `same_dir`: replace the previous prompt only if the working directory is same
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Fish
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`.
|
||||
|
||||
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
|
||||
|
||||
- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_prompt_func
|
||||
starship module character
|
||||
end
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_rprompt_func
|
||||
starship module time
|
||||
end
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Cmd
|
||||
|
||||
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
print("🚀")
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
|
||||
|
||||
```lua
|
||||
function starship_precmd_user_func(line)
|
||||
print("Executing: "..line)
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Bash
|
||||
|
||||
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; $(basename "$PWD") \007"
|
||||
}
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a"
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
||||
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](../config/#fill).
|
||||
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell.
|
||||
|
||||
### مثال
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A minimal left prompt
|
||||
format = """$character"""
|
||||
|
||||
# move the rest of the prompt to the right
|
||||
right_format = """$all"""
|
||||
```
|
||||
|
||||
Produces a prompt like the following:
|
||||
|
||||
```
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
```
|
||||
|
||||
## Continuation Prompt
|
||||
|
||||
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
|
||||
|
||||
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `'[∙](bright-black) '`.
|
||||
|
||||
Note: `continuation_prompt` should be set to a literal string without any variables.
|
||||
|
||||
Note: Continuation prompts are only available in the following shells:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### مثال
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A continuation prompt that displays two filled in arrows
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,130 +0,0 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## What is the configuration used in the demo GIF?
|
||||
|
||||
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
|
||||
- **Theme**: Minimal
|
||||
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Shell**: [Fish Shell](https://fishshell.com/)
|
||||
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## How do I get command completion as shown in the demo GIF?
|
||||
|
||||
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
|
||||
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
|
||||
|
||||
- Disabling modules is more explicit than omitting them from the top level `format`
|
||||
- Newly created modules will be added to the prompt as Starship is updated
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
|
||||
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](../config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARSHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARSHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a GitHub issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
|
||||
- You are using a [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
|
||||
1. Delete the Starship binary.
|
||||
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(command -v 'starship')"'
|
||||
```
|
||||
|
||||
## How do I install Starship without `sudo`?
|
||||
|
||||
The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
|
||||
|
||||
For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
|
||||
|
||||
When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
|
||||
@@ -1,445 +0,0 @@
|
||||
<p align="center">
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/actions/workflow/status/starship/starship/workflow.yml?branch=master&label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="إصدار Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
alt="واقع التغليف" /></a
|
||||
><br />
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="الدردشة على Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="تابع @StarshipPrompt على تويتر"
|
||||
/></a>
|
||||
<a href="https://stand-with-ukraine.pp.ua"
|
||||
><img
|
||||
src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraineFlat.svg"
|
||||
alt="Stand With Ukraine"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/ar-SA">الموقع</a>
|
||||
·
|
||||
<a href="#🚀-installation">التثبيت</a>
|
||||
·
|
||||
<a href="https://starship.rs/ar-SA/config/">الإعدادات</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/blob/master/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
|
||||
alt="Bahasa Indonesia"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
|
||||
alt="الإيطالية"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||
alt="Português do Brasil"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/uk-UA/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ua.png"
|
||||
alt="Українська"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**التخصيص البسيط و السريع و الغير محدود لي ال"shell"!**
|
||||
|
||||
- **Fast:** إنها _في غاية_ السرعة! 🚀
|
||||
- ** Customizable:** قم بتهيئة ال"prompt" من كل النواحي.
|
||||
- **Universal:** يعمل على أي shell، على أي نظام تشغيل.
|
||||
- ** Customizable:** تظهر المعلومات ذات الصلة في لمح البصر.
|
||||
- **Feature rich:** تدعم جميع الأدوات المفضلة لديك.
|
||||
- **Easy:** سريع التثبيت – استخدمها في دقائق معدودة.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/ar-SA/config/"><strong>تصفّح مستندات Starship ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 التثبيت
|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### الخطوة الأولى. تثبيت starship
|
||||
|
||||
حدد نظام التشغيل الخاص بك من القائمة أدناه لعرض تعليمات التثبيت:
|
||||
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
يمكنك تثبيت starship باستخدام احد ال package managers التالية:
|
||||
|
||||
| Repository | Instructions |
|
||||
| --------------------------------------------------------------------------------- | ---------------------- |
|
||||
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
يمكنك تثبيت starship باستخدام احد ال package managers التالية:
|
||||
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------ | -------------------------------------------------------- | --------------------------------- |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
|
||||
قم بتثبيت أحدث إصدار للنظام الخاص بك:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
يمكنك تثبيت starship باستخدام احد ال package managers التالية:
|
||||
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` |
|
||||
| CentOS +7 | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
|
||||
| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` |
|
||||
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>macOS</summary>
|
||||
|
||||
قم بتثبيت أحدث إصدار للنظام الخاص بك:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
يمكنك تثبيت starship باستخدام احد ال package managers التالية:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
|
||||
قم بتثبيت أحدث إصدار للنظام الخاص بك مع MSI-installers من قسم الإصدارات [](https://github.com/starship/starship/releases/latest).
|
||||
|
||||
يمكنك تثبيت starship باستخدام احد ال package managers التالية:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
|
||||
| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
|
||||
|
||||
</details>
|
||||
|
||||
### الخطوة الثانية. Set up your shell to use Starship
|
||||
|
||||
لإعداد ال starship قم بإعداد ال shell الخاص بك. اختر ما يناسبك من هذه القائمة:
|
||||
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
عليك بإستخدام [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) مع Cmd. قم بإنشاء ملف في المسار `%LocalAppData%\clink\starship.lua` و ضع فيه المحتوى التالي:
|
||||
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية الملف `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
ملاحظة: فقط +Elvish v0.18 مدعوم
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.config/fish/config.fish`:
|
||||
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
Note: Only Nushell v0.78+ is supported
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.xonshrc`:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
أضف ما يلي إلى نهاية `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### الخطوة الثالثة. تهيئة starship
|
||||
|
||||
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
|
||||
|
||||
If you're looking to further customize Starship:
|
||||
|
||||
- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking
|
||||
|
||||
- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others
|
||||
|
||||
## 🤝 المساهمة
|
||||
|
||||
نبحث دائماً عن مساهمين من **جميع المستويات**! إذا كنت تتطلع إلى تسهيل طريقك إلى المشروع، جرب [إنشاء اول مشكلة](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).
|
||||
|
||||
إذا كنت تتحدث بطلاقة بلغة غير إنجليزية، فإننا نقدر أي مساعدة للحفاظ على ترجمة المستندات وتحديثها بلغات أخرى. إذا كنت ترغب في المساعدة، يمكن المساهمة بالترجمة على [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
إذا كنت مهتما بالمساهمة في starship، يرجى إلقاء نظرة على [دليل المساهمة](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) لدينا. أيضا، لا تتردد في أن تنضم لنا في [Discord](https://discord.gg/8Jzqu3T) وقُل مرحبا. 👋
|
||||
|
||||
## 💭 مستوحاة من قبل
|
||||
|
||||
يرجى التحقق من هذه الأعمال السابقة التي ساعدت على إنشاء starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
## ❤️ Sponsors
|
||||
|
||||
Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
|
||||
|
||||
**Supporter Tier**
|
||||
|
||||
- [Appwrite](https://appwrite.io/)
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 الترخيص
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.
|
||||
@@ -1,93 +0,0 @@
|
||||
# التثبيت المتقدم
|
||||
|
||||
To install starship, you need to do two things:
|
||||
|
||||
1. Get the **starship** binary onto your computer
|
||||
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
||||
|
||||
For most users, the instructions on [the main page](../guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### التثبيت
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### التثبيت
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### التثبيت
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
||||
#### Imperatively
|
||||
|
||||
```sh
|
||||
nix-env -iA nixos.starship
|
||||
```
|
||||
|
||||
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
@@ -1,267 +0,0 @@
|
||||
# Migrating to v0.45.0
|
||||
|
||||
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
||||
|
||||
This guide is intended to walk you through the breaking changes.
|
||||
|
||||
## `prompt_order` has been replaced by a root-level `format`
|
||||
|
||||
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
prompt_order = [
|
||||
"username",
|
||||
"hostname",
|
||||
"directory",
|
||||
"git_branch",
|
||||
"git_commit",
|
||||
"git_state",
|
||||
"git_status",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
"time",
|
||||
"character",
|
||||
]
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
format = """\
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_commit\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$custom\
|
||||
$line_break\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$character\
|
||||
"""
|
||||
```
|
||||
|
||||
## Module `prefix` and `suffix` have been replaced by `format`
|
||||
|
||||
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
prefix = "took "
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
# $duration – The command duration (e.g. "15s")
|
||||
# $style – The default style of the module (e.g. "bold yellow")
|
||||
format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
### Affected Modules
|
||||
|
||||
#### Character
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------------- | ---------------- |
|
||||
| `symbol` | `success_symbol` |
|
||||
| `use_symbol_for_status` | `error_symbol` |
|
||||
| `style_success` | `success_symbol` |
|
||||
| `style_failure` | `error_symbol` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[character]
|
||||
-- symbol = "❯"
|
||||
-- error_symbol = "✖"
|
||||
-- use_symbol_for_status = true
|
||||
-- vicmd_symbol = "❮"
|
||||
++ success_symbol = "[❯](bold green)"
|
||||
++ error_symbol = "[❯](bold red)"
|
||||
++ vicmd_symbol = "[❮](bold green)"
|
||||
```
|
||||
|
||||
Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code.
|
||||
|
||||
With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties.
|
||||
|
||||
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
|
||||
|
||||
```toml
|
||||
[character]
|
||||
error_symbol = "[✖](bold red)"
|
||||
```
|
||||
|
||||
_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
|
||||
#### Command Duration
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[cmd_duration]
|
||||
-- prefix = "took "
|
||||
++ format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
#### Directory
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[directory]
|
||||
-- prefix = "in "
|
||||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||
```
|
||||
|
||||
#### Environment Variable
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[env_var]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "with [$env_value]($style) "
|
||||
```
|
||||
|
||||
#### Git Commit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[git_commit]
|
||||
-- prefix = "("
|
||||
-- suffix = ")"
|
||||
++ format = '[\($hash\)]($style) '
|
||||
```
|
||||
|
||||
#### Git Status
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[git_status]
|
||||
-- prefix = "["
|
||||
-- suffix = "]"
|
||||
-- show_sync_count = false
|
||||
++ format = '([\[$all_status$ahead_behind\]]($style) )'
|
||||
```
|
||||
|
||||
Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch.
|
||||
|
||||
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
|
||||
|
||||
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
|
||||
|
||||
```toml
|
||||
[git_status]
|
||||
ahead = "⇡${count}"
|
||||
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
||||
behind = "⇣${count}"
|
||||
```
|
||||
|
||||
#### Hostname
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[hostname]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "[$hostname]($style) in "
|
||||
```
|
||||
|
||||
#### Singularity
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[singularity]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Time
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[time]
|
||||
-- format = "🕙[ %T ]"
|
||||
++ time_format = "%T"
|
||||
++ format = "at 🕙[$time]($style) "
|
||||
```
|
||||
|
||||
#### Custom Commands
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[custom.example]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "[$symbol$output]($style) "
|
||||
```
|
||||
@@ -1,71 +0,0 @@
|
||||
# Presets
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
|
||||
To get details on how to use a preset, simply click on the image.
|
||||
|
||||
## [Nerd Font Symbols](./nerd-font.md)
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||
[](./nerd-font)
|
||||
|
||||
## [No Nerd Fonts](./no-nerd-font.md)
|
||||
|
||||
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
|
||||
|
||||
::: tip
|
||||
|
||||
This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
|
||||
|
||||
:::
|
||||
|
||||
[Click to view No Nerd Font preset](./no-nerd-font)
|
||||
|
||||
## [Bracketed Segments](./bracketed-segments.md)
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
[](./bracketed-segments)
|
||||
|
||||
## [Plain Text Symbols](./plain-text.md)
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||
[](./plain-text)
|
||||
|
||||
## [No Runtime Versions](./no-runtimes.md)
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
|
||||
[](./no-runtimes)
|
||||
|
||||
## [No Empty Icons](./no-empty-icons.md)
|
||||
|
||||
This preset does not show icons if the toolset is not found.
|
||||
|
||||
[](./no-empty-icons.md)
|
||||
|
||||
## [Pure Prompt](./pure-preset.md)
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
[](./pure-preset)
|
||||
|
||||
## [Pastel Powerline](./pastel-powerline.md)
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||
[](./pastel-powerline)
|
||||
|
||||
## [Tokyo Night](./tokyo-night.md)
|
||||
|
||||
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
|
||||
[](./tokyo-night)
|
||||
|
||||
## [Gruvbox Rainbow](./gruvbox-rainbow.md)
|
||||
|
||||
This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
|
||||
|
||||
[](./gruvbox-rainbow)
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#bracketed-segments)
|
||||
|
||||
# Bracketed Segments Preset
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset bracketed-segments -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/bracketed-segments.toml)
|
||||
|
||||
<<< @/public/presets/toml/bracketed-segments.toml
|
||||
@@ -1,21 +0,0 @@
|
||||
[Return to Presets](./#gruvbox-rainbow)
|
||||
|
||||
# Gruvbox Rainbow Preset
|
||||
|
||||
This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
|
||||
|
||||

|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset gruvbox-rainbow -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
|
||||
|
||||
<<< @/public/presets/toml/gruvbox-rainbow.toml
|
||||
@@ -1,24 +0,0 @@
|
||||
[Return to Presets](./#jetpack)
|
||||
|
||||
# Jetpack Preset
|
||||
|
||||
This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
|
||||
|
||||
> Jetpack uses the terminal's color theme.
|
||||
|
||||

|
||||
|
||||
### Prerequisite
|
||||
|
||||
- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
|
||||
- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset jetpack -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/jetpack.toml)
|
||||
|
||||
<<< @/public/presets/toml/jetpack.toml
|
||||
@@ -1,21 +0,0 @@
|
||||
[Return to Presets](./#nerd-font-symbols)
|
||||
|
||||
# Nerd Font Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||

|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset nerd-font-symbols -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
|
||||
|
||||
<<< @/public/presets/toml/nerd-font-symbols.toml
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#no-empty-icons)
|
||||
|
||||
# No Empty Icons Preset
|
||||
|
||||
If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined.
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset no-empty-icons -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-empty-icons.toml)
|
||||
|
||||
<<< @/public/presets/toml/no-empty-icons.toml
|
||||
@@ -1,19 +0,0 @@
|
||||
[Return to Presets](./#no-nerd-fonts)
|
||||
|
||||
# No Nerd Fonts Preset
|
||||
|
||||
This preset restricts the use of symbols to those from emoji and powerline sets.
|
||||
|
||||
This means that even without a Nerd Font installed, you should be able to view all module symbols.
|
||||
|
||||
This preset will become the default preset in a future release of starship.
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset no-nerd-font -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-nerd-font.toml)
|
||||
|
||||
<<< @/public/presets/toml/no-nerd-font.toml
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#no-runtime-versions)
|
||||
|
||||
# No Runtime Versions Preset
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset no-runtime-versions -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
|
||||
|
||||
<<< @/public/presets/toml/no-runtime-versions.toml
|
||||
@@ -1,21 +0,0 @@
|
||||
[Return to Presets](./#pastel-powerline)
|
||||
|
||||
# Pastel Powerline Preset
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||

|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset pastel-powerline -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pastel-powerline.toml)
|
||||
|
||||
<<< @/public/presets/toml/pastel-powerline.toml
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#plain-text-symbols)
|
||||
|
||||
## Plain Text Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset plain-text-symbols -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
|
||||
|
||||
<<< @/public/presets/toml/plain-text-symbols.toml
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#pure)
|
||||
|
||||
# Pure Preset
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset pure-preset -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pure-preset.toml)
|
||||
|
||||
<<< @/public/presets/toml/pure-preset.toml
|
||||
@@ -1,21 +0,0 @@
|
||||
[Return to Presets](./#pastel-powerline)
|
||||
|
||||
# Tokyo Night Preset
|
||||
|
||||
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
|
||||

|
||||
|
||||
### المتطلبات الأساسية
|
||||
|
||||
- تثبيت [Nerd Font](https://www.nerdfonts.com/) وتمكينه في موجه الأوامر الخاصة بك
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset tokyo-night -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/tokyo-night.toml)
|
||||
|
||||
<<< @/public/presets/toml/tokyo-night.toml
|
||||
@@ -1,191 +0,0 @@
|
||||
---
|
||||
layout: home
|
||||
hero:
|
||||
image: /logo.svg
|
||||
text: null
|
||||
tagline: আপনার টার্মিনাল এর জন্য একটি সহজ, প্রচণ্ড দ্রুত এবং অশেষভাবে কাস্টমাইজ করার মতো সুবিধাসম্পন্ন একটি প্রম্প্ট!
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Get Started →
|
||||
link: ./guide/
|
||||
features:
|
||||
-
|
||||
title: Compatibility First
|
||||
details: Works on the most common shells on the most common operating systems. Use it everywhere!
|
||||
-
|
||||
title: Rust-Powered
|
||||
details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
|
||||
-
|
||||
title: Customizable
|
||||
details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be.
|
||||
footer: ISC Licensed | Copyright © 2019-present Starship Contributors
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: Cross-Shell Prompt"
|
||||
description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
<video class="demo-video" muted autoplay loop playsinline>
|
||||
<source src="/demo.webm" type="video/webm">
|
||||
<source src="/demo.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### পূর্বশর্ত
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal.
|
||||
|
||||
### Quick Install
|
||||
|
||||
1. Install the **starship** binary:
|
||||
|
||||
|
||||
#### Install Latest Version
|
||||
|
||||
With Shell:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
To update the Starship itself, rerun the above script. It will replace the current version without touching Starship's configuration.
|
||||
|
||||
|
||||
#### Install via Package Manager
|
||||
|
||||
With [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
With [Winget](https://github.com/microsoft/winget-cli):
|
||||
|
||||
```powershell
|
||||
winget install starship
|
||||
```
|
||||
|
||||
1. Add the init script to your shell's config file:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
`~/.bashrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
|
||||
#### Fish
|
||||
|
||||
`~/.config/fish/config.fish` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
|
||||
#### Zsh
|
||||
|
||||
`~/.zshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
|
||||
#### Ion
|
||||
|
||||
`~/.config/ion/initrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning
|
||||
|
||||
Only elvish v0.18 or higher is supported.
|
||||
|
||||
:::
|
||||
|
||||
`~/.elvish/rc.elv` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
`~/.tcshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning
|
||||
|
||||
This will change in the future. Only Nushell v0.78+ is supported.
|
||||
|
||||
:::
|
||||
|
||||
আপনার Nushell env ফাইলের (Nushell এ `$nu.env-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনগুলি যোগ করুন:
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
এরপর আপনার Nushell কনফিগের (Nushell এ `$nu.config-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনটি যোগ করুন:
|
||||
|
||||
```sh
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
`~/.xonshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Cmd
|
||||
|
||||
আপনাকে Cmd এর সাথে [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) ব্যবহার করতে হবে । Add the following to a file `starship.lua` and place this file in Clink scripts directory:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
@@ -1,284 +0,0 @@
|
||||
# Advanced Configuration
|
||||
|
||||
While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship.
|
||||
|
||||
::: warning
|
||||
|
||||
The configurations in this section are subject to change in future releases of Starship.
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
|
||||
|
||||
- `always`: always replace the previous prompt
|
||||
- `same_dir`: replace the previous prompt only if the working directory is same
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Fish
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`.
|
||||
|
||||
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
|
||||
|
||||
- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_prompt_func
|
||||
starship module character
|
||||
end
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_rprompt_func
|
||||
starship module time
|
||||
end
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Cmd
|
||||
|
||||
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
print("🚀")
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
|
||||
|
||||
```lua
|
||||
function starship_precmd_user_func(line)
|
||||
print("Executing: "..line)
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Bash
|
||||
|
||||
Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; $(basename "$PWD") \007"
|
||||
}
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a"
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
||||
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](../config/#fill).
|
||||
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell.
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A minimal left prompt
|
||||
format = """$character"""
|
||||
|
||||
# move the rest of the prompt to the right
|
||||
right_format = """$all"""
|
||||
```
|
||||
|
||||
Produces a prompt like the following:
|
||||
|
||||
```
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
```
|
||||
|
||||
## Continuation Prompt
|
||||
|
||||
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
|
||||
|
||||
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `'[∙](bright-black) '`.
|
||||
|
||||
Note: `continuation_prompt` should be set to a literal string without any variables.
|
||||
|
||||
Note: Continuation prompts are only available in the following shells:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A continuation prompt that displays two filled in arrows
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
- `underline`
|
||||
- `dimmed`
|
||||
- `inverted`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `none`
|
||||
|
||||
where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing, though this may change in the future. `inverted` swaps the background and foreground colors. The order of words in the string does not matter.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,130 +0,0 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## What is the configuration used in the demo GIF?
|
||||
|
||||
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
|
||||
- **Theme**: Minimal
|
||||
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Shell**: [Fish Shell](https://fishshell.com/)
|
||||
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## How do I get command completion as shown in the demo GIF?
|
||||
|
||||
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
|
||||
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
|
||||
|
||||
- Disabling modules is more explicit than omitting them from the top level `format`
|
||||
- Newly created modules will be added to the prompt as Starship is updated
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
|
||||
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](../config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARSHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARSHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a GitHub issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
|
||||
- You are using a [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
|
||||
1. Delete the Starship binary.
|
||||
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(command -v 'starship')"'
|
||||
```
|
||||
|
||||
## How do I install Starship without `sudo`?
|
||||
|
||||
The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
|
||||
|
||||
For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
|
||||
|
||||
When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
|
||||
@@ -1,445 +0,0 @@
|
||||
<p align="center">
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship – Cross-shell prompt"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/actions/workflow/status/starship/starship/workflow.yml?branch=master&label=workflow&style=flat-square"
|
||||
alt="GitHub Actions workflow status"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="Crates.io version"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
alt="Packaging status" /></a
|
||||
><br />
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="Chat on Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="Follow @StarshipPrompt on Twitter"
|
||||
/></a>
|
||||
<a href="https://stand-with-ukraine.pp.ua"
|
||||
><img
|
||||
src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraineFlat.svg"
|
||||
alt="Stand With Ukraine"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/bn-BD">ওয়েবসাইট</a>
|
||||
·
|
||||
<a href="#🚀-installation">ইন্সটল</a>
|
||||
·
|
||||
<a href="https://starship.rs/bn-BD/config/"> কনফিগ</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/blob/master/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
|
||||
alt="Bahasa Indonesia"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
|
||||
alt="Italiano"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||
alt="Português do Brasil"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/uk-UA/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ua.png"
|
||||
alt="Українська"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship with iTerm2 and the Snazzy theme"
|
||||
width="50%"
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**আপনার টার্মিনাল এর জন্য একটি সহজ, প্রচণ্ড দ্রুত এবং অশেষভাবে কাস্টমাইজ করার মতো সুবিধাসম্পন্ন একটি প্রম্প্ট!**
|
||||
|
||||
- **দ্রুত:** দ্রুত - সত্যি সত্যিই _অনেক_ দ্রুত! 🚀
|
||||
- **কাস্টমাইজ করার সুবিধা:** প্রম্পটের প্রতিটি দিক কনফিগ করুন মন মত ।
|
||||
- **ব্যতিক্রমহীন:** যেকোনো অপারেটিং সিস্টেম ও শেলে কাজ করে ।
|
||||
- **চালাক:** এক নজরে দরকারি সকল তথ্য দেখা যায় ।
|
||||
- **ফিচার সমৃদ্ধ:** আপনার প্রিয় সকল টুল ব্যবহার করতে পারবেন ।
|
||||
- **সহজ:** অনায়াসে ইন্সটল করুন – মিনিটের মধ্যে ব্যবহার শুরু করে দিন ।
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/bn-BD/config/"><strong>Starship এর ডকুমেন্টেশন ঘুরে দেখুন ▶</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 ইন্সটল
|
||||
|
||||
### পূর্বশর্ত
|
||||
|
||||
- আপনার থেকে টার্মিনালে একটি [Nerd Font](https://www.nerdfonts.com/) ব্যবহার করতে হবে (উদাহরণস্বরূপ আপনি [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads) টি ব্যবহার করতে পারেন) ।
|
||||
|
||||
### ধাপ ১. Starship ইন্সটল করুন
|
||||
|
||||
ইনস্টলেশন নির্দেশিকা দেখতে নিচের তালিকা থেকে আপনার অপারেটিং সিস্টেম বাছাই করুন:
|
||||
|
||||
<details>
|
||||
<summary>অ্যান্ড্রয়েড</summary>
|
||||
|
||||
নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন:
|
||||
|
||||
| রিপোজিটরি | নির্দেশাবলী |
|
||||
| --------------------------------------------------------------------------------- | ---------------------- |
|
||||
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>বিএসডি</summary>
|
||||
|
||||
নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন:
|
||||
|
||||
| ডিস্ট্রিবিউশন | রিপোজিটরি | নির্দেশাবলী |
|
||||
| ------------- | -------------------------------------------------------- | --------------------------------- |
|
||||
| **_যেকোনো_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>লিনাক্স </summary>
|
||||
|
||||
আপনার সিস্টেম এর জন্য লেটেস্ট সংস্করণটি ইন্সটল করুন:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
অথবা, নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন:
|
||||
|
||||
| ডিস্ট্রিবিউশন | রিপোজিটরি | নির্দেশাবলী |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| **_যেকোনো_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| _যেকোনো_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| _যেকোনো_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` |
|
||||
| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
|
||||
| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` |
|
||||
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>ম্যাক ওএস </summary>
|
||||
|
||||
আপনার সিস্টেম এর জন্য লেটেস্ট সংস্করণটি ইন্সটল করুন:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
অথবা, নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন:
|
||||
|
||||
| রিপোজিটরি | নির্দেশাবলী |
|
||||
| -------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>উইন্ডোজ</summary>
|
||||
|
||||
আপনার সিস্টেম এর জন্য লেটেস্ট সংস্করণটি [রিলিজ সেকশনে](https://github.com/starship/starship/releases/latest) থাকা MSI-ইন্সটলার ব্যবহার করে ইন্সটল করুন ।
|
||||
|
||||
নিম্নলিখিত প্যাকেজ ম্যানেজার গুলোর মধ্যে থেকে যেকোনো একটি ব্যবহার করে Starship ইন্সটল করুন:
|
||||
|
||||
| রিপোজিটরি | নির্দেশাবলী |
|
||||
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
|
||||
| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
|
||||
|
||||
</details>
|
||||
|
||||
### ধাপ ২. Starship ব্যবহার করার জন্য আপনার শেল প্রস্তুত করুন
|
||||
|
||||
Starship চালু করতে আপনার শেল কে ঠিক মতো কনফিগার করুন । নিম্নলিখিত তালিকা থেকে আপনার শেল বাছাই করুন:
|
||||
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
`~/.bashrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
আপনাকে Cmd এর সাথে [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) ব্যবহার করতে হবে । `%LocalAppData%\clink\starship.lua` ফাইল টি তৈরি করে তার মধ্যে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
`~/.elvish/rc.elv` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
বিঃদ্রঃ শুধুমাত্র Elvish v0.18+ কাজ করবে ।
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
`~/.config/fish/config.fish` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
`~/.config/ion/initrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
আপনার Nushell env ফাইলের (Nushell এ `$nu.env-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনগুলি যোগ করুন:
|
||||
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
এরপর আপনার Nushell কনফিগের (Nushell এ `$nu.config-path` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনটি যোগ করুন:
|
||||
|
||||
```sh
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
বিঃদ্রঃ শুধুমাত্র Nushell v0.78+ কাজ করবে ।
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
আপনার PowerShell কনফিগের (PowerShell এ `$PROFILE` কমান্ডটি রান করে ফাইলটি খুঁজে বের করুন) শেষে নিম্নলিখিত লাইনটি যোগ করুন:
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
`~/.tcshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
`~/.xonshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
`~/.zshrc` এর শেষে নিম্নলিখিত লাইন টি যোগ করুন:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### ধাপ ৩. Starship কনফিগার করুন
|
||||
|
||||
নতুন একটি শেল চালু করুন, এরপর আপনি আপনার সুন্দর নতুন শেল প্রম্প্ট দেখতে পাবেন । পূর্ব নির্ধারিত কনফিগ যদি ভালো লেগে থাকে, তাহলে উপভোগ করুন!
|
||||
|
||||
আপনি যদি Starship কে নিজের মতো করে কাস্টমাইজ করতে চান:
|
||||
|
||||
- **[কনফিগারেশন](https://starship.rs/config/)** – আপনার নিজের ইচ্ছা মতো নিজের প্রম্প্টকে পরিবর্তন করতে শিখুন
|
||||
|
||||
- **[অন্যদের তৈরি কনফিগ](https://starship.rs/presets/)** – অন্যদের তৈরি করা সুন্দর কনফিগ দেখে অনুপ্রাণিত হন
|
||||
|
||||
## 🤝 নিজে অবদান রাখুন
|
||||
|
||||
আমরা সবসময় **সকল দক্ষতা স্তরের** অবদানকারীদের খুঁজছি! আপনি যদি সহজ ভাবে এই প্রোজেক্টে অবদান রাখতে চান তাইলে ["good first issue"](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) গুলির সমাধান করার চেষ্টা করতে পারেন ।
|
||||
|
||||
আপনি যদি ইংরেজি ছাড়া অন্য কোন ভাষায় সাবলীল হন, তাহলে আপনি আমাদের ডকুমেন্টেশন অনুবাদে এবং আপ-টু-ডেট রাখতে সহায়তা করতে পারেন, আমরা খুবই কৃতজ্ঞ হব । যদি এক্ষেত্রে সাহায্য করতে চান, তাহলে [Starship Crowdin](https://translate.starship.rs/) পেইজ এ গিয়ে আপনার অনুবাদ গুলি যোগ করতে পারবেন ।
|
||||
|
||||
আপনি যদি Starship এ অবদান রাখতে আগ্রহী হন, অনুগ্রহ করে আমাদের অবদান রাখার [নির্দেশিকা ও নিয়মকানুন](https://github.com/starship/starship/blob/master/CONTRIBUTING.md) দেখে নিবেন । এছাড়াও, নির্দ্বিধায় আমাদের [Discord](https://discord.gg/8Jzqu3T) সার্ভারে এসে হাই বলে যান । 👋
|
||||
|
||||
## 💭 অনুপ্রেরণা
|
||||
|
||||
অনুগ্রহ করে Starship এর পূর্ববর্তী এইসব প্রোজেক্ট থেকে ঘুরে আসুন, যারা Starship তৈরিতে অনেক অনুপ্রেরণা দিয়েছে । 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
## ❤️ স্পনসর
|
||||
|
||||
[একজন স্পনসর হয়ে](https://github.com/sponsors/starship) এই প্রোজেক্টটিকে আর্থিক ভাবে সহায়তা করুন । আপনার নাম অথবা লোগো নিম্নে দেখা যাবে আপনার ওয়েবসাইট এর লিঙ্ক সহ ।
|
||||
|
||||
**সমর্থক স্তর**
|
||||
|
||||
- [Appwrite](https://appwrite.io/)
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
|
||||
</p>
|
||||
|
||||
## 📝 লাইসেন্স
|
||||
|
||||
Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br /> এই প্রোজেক্টটি [ISC](https://github.com/starship/starship/blob/master/LICENSE) লাইসেন্সের অধিনে রয়েছে ।
|
||||
@@ -1,93 +0,0 @@
|
||||
# Advanced Installation
|
||||
|
||||
To install starship, you need to do two things:
|
||||
|
||||
1. Get the **starship** binary onto your computer
|
||||
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
||||
|
||||
For most users, the instructions on [the main page](../guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### পূর্বশর্ত
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### ইন্সটল
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### পূর্বশর্ত
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### ইন্সটল
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### ইন্সটল
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
||||
#### Imperatively
|
||||
|
||||
```sh
|
||||
nix-env -iA nixos.starship
|
||||
```
|
||||
|
||||
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
@@ -1,267 +0,0 @@
|
||||
# Migrating to v0.45.0
|
||||
|
||||
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
||||
|
||||
This guide is intended to walk you through the breaking changes.
|
||||
|
||||
## `prompt_order` has been replaced by a root-level `format`
|
||||
|
||||
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
prompt_order = [
|
||||
"username",
|
||||
"hostname",
|
||||
"directory",
|
||||
"git_branch",
|
||||
"git_commit",
|
||||
"git_state",
|
||||
"git_status",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
"time",
|
||||
"character",
|
||||
]
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
format = """\
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_commit\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$custom\
|
||||
$line_break\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$character\
|
||||
"""
|
||||
```
|
||||
|
||||
## Module `prefix` and `suffix` have been replaced by `format`
|
||||
|
||||
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
prefix = "took "
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
# $duration – The command duration (e.g. "15s")
|
||||
# $style – The default style of the module (e.g. "bold yellow")
|
||||
format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
### Affected Modules
|
||||
|
||||
#### Character
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------------- | ---------------- |
|
||||
| `symbol` | `success_symbol` |
|
||||
| `use_symbol_for_status` | `error_symbol` |
|
||||
| `style_success` | `success_symbol` |
|
||||
| `style_failure` | `error_symbol` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[character]
|
||||
-- symbol = "❯"
|
||||
-- error_symbol = "✖"
|
||||
-- use_symbol_for_status = true
|
||||
-- vicmd_symbol = "❮"
|
||||
++ success_symbol = "[❯](bold green)"
|
||||
++ error_symbol = "[❯](bold red)"
|
||||
++ vicmd_symbol = "[❮](bold green)"
|
||||
```
|
||||
|
||||
Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code.
|
||||
|
||||
With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties.
|
||||
|
||||
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
|
||||
|
||||
```toml
|
||||
[character]
|
||||
error_symbol = "[✖](bold red)"
|
||||
```
|
||||
|
||||
_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
|
||||
#### Command Duration
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[cmd_duration]
|
||||
-- prefix = "took "
|
||||
++ format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
#### Directory
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[directory]
|
||||
-- prefix = "in "
|
||||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||
```
|
||||
|
||||
#### Environment Variable
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[env_var]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "with [$env_value]($style) "
|
||||
```
|
||||
|
||||
#### Git Commit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[git_commit]
|
||||
-- prefix = "("
|
||||
-- suffix = ")"
|
||||
++ format = '[\($hash\)]($style) '
|
||||
```
|
||||
|
||||
#### Git Status
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[git_status]
|
||||
-- prefix = "["
|
||||
-- suffix = "]"
|
||||
-- show_sync_count = false
|
||||
++ format = '([\[$all_status$ahead_behind\]]($style) )'
|
||||
```
|
||||
|
||||
Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch.
|
||||
|
||||
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
|
||||
|
||||
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
|
||||
|
||||
```toml
|
||||
[git_status]
|
||||
ahead = "⇡${count}"
|
||||
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
||||
behind = "⇣${count}"
|
||||
```
|
||||
|
||||
#### Hostname
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[hostname]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "[$hostname]($style) in "
|
||||
```
|
||||
|
||||
#### Singularity
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[singularity]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Time
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[time]
|
||||
-- format = "🕙[ %T ]"
|
||||
++ time_format = "%T"
|
||||
++ format = "at 🕙[$time]($style) "
|
||||
```
|
||||
|
||||
#### Custom Commands
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[custom.example]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "[$symbol$output]($style) "
|
||||
```
|
||||
@@ -1,71 +0,0 @@
|
||||
# Presets
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
|
||||
To get details on how to use a preset, simply click on the image.
|
||||
|
||||
## [Nerd Font Symbols](./nerd-font.md)
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||
[](./nerd-font)
|
||||
|
||||
## [No Nerd Fonts](./no-nerd-font.md)
|
||||
|
||||
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
|
||||
|
||||
::: tip
|
||||
|
||||
This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
|
||||
|
||||
:::
|
||||
|
||||
[Click to view No Nerd Font preset](./no-nerd-font)
|
||||
|
||||
## [Bracketed Segments](./bracketed-segments.md)
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
[](./bracketed-segments)
|
||||
|
||||
## [Plain Text Symbols](./plain-text.md)
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||
[](./plain-text)
|
||||
|
||||
## [No Runtime Versions](./no-runtimes.md)
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
|
||||
[](./no-runtimes)
|
||||
|
||||
## [No Empty Icons](./no-empty-icons.md)
|
||||
|
||||
This preset does not show icons if the toolset is not found.
|
||||
|
||||
[](./no-empty-icons.md)
|
||||
|
||||
## [Pure Prompt](./pure-preset.md)
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
[](./pure-preset)
|
||||
|
||||
## [Pastel Powerline](./pastel-powerline.md)
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||
[](./pastel-powerline)
|
||||
|
||||
## [Tokyo Night](./tokyo-night.md)
|
||||
|
||||
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
|
||||
[](./tokyo-night)
|
||||
|
||||
## [Gruvbox Rainbow](./gruvbox-rainbow.md)
|
||||
|
||||
This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
|
||||
|
||||
[](./gruvbox-rainbow)
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#bracketed-segments)
|
||||
|
||||
# Bracketed Segments Preset
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset bracketed-segments -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/bracketed-segments.toml)
|
||||
|
||||
<<< @/public/presets/toml/bracketed-segments.toml
|
||||
@@ -1,21 +0,0 @@
|
||||
[Return to Presets](./#gruvbox-rainbow)
|
||||
|
||||
# Gruvbox Rainbow Preset
|
||||
|
||||
This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
|
||||
|
||||

|
||||
|
||||
### পূর্বশর্ত
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset gruvbox-rainbow -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/gruvbox-rainbow.toml)
|
||||
|
||||
<<< @/public/presets/toml/gruvbox-rainbow.toml
|
||||
@@ -1,24 +0,0 @@
|
||||
[Return to Presets](./#jetpack)
|
||||
|
||||
# Jetpack Preset
|
||||
|
||||
This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
|
||||
|
||||
> Jetpack uses the terminal's color theme.
|
||||
|
||||

|
||||
|
||||
### Prerequisite
|
||||
|
||||
- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
|
||||
- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset jetpack -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/jetpack.toml)
|
||||
|
||||
<<< @/public/presets/toml/jetpack.toml
|
||||
@@ -1,21 +0,0 @@
|
||||
[Return to Presets](./#nerd-font-symbols)
|
||||
|
||||
# Nerd Font Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||

|
||||
|
||||
### পূর্বশর্ত
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset nerd-font-symbols -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/nerd-font-symbols.toml)
|
||||
|
||||
<<< @/public/presets/toml/nerd-font-symbols.toml
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#no-empty-icons)
|
||||
|
||||
# No Empty Icons Preset
|
||||
|
||||
If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined.
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset no-empty-icons -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-empty-icons.toml)
|
||||
|
||||
<<< @/public/presets/toml/no-empty-icons.toml
|
||||
@@ -1,19 +0,0 @@
|
||||
[Return to Presets](./#no-nerd-fonts)
|
||||
|
||||
# No Nerd Fonts Preset
|
||||
|
||||
This preset restricts the use of symbols to those from emoji and powerline sets.
|
||||
|
||||
This means that even without a Nerd Font installed, you should be able to view all module symbols.
|
||||
|
||||
This preset will become the default preset in a future release of starship.
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset no-nerd-font -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-nerd-font.toml)
|
||||
|
||||
<<< @/public/presets/toml/no-nerd-font.toml
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#no-runtime-versions)
|
||||
|
||||
# No Runtime Versions Preset
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset no-runtime-versions -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-runtime-versions.toml)
|
||||
|
||||
<<< @/public/presets/toml/no-runtime-versions.toml
|
||||
@@ -1,21 +0,0 @@
|
||||
[Return to Presets](./#pastel-powerline)
|
||||
|
||||
# Pastel Powerline Preset
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||

|
||||
|
||||
### পূর্বশর্ত
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset pastel-powerline -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pastel-powerline.toml)
|
||||
|
||||
<<< @/public/presets/toml/pastel-powerline.toml
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#plain-text-symbols)
|
||||
|
||||
## Plain Text Symbols Preset
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset plain-text-symbols -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/plain-text-symbols.toml)
|
||||
|
||||
<<< @/public/presets/toml/plain-text-symbols.toml
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#pure)
|
||||
|
||||
# Pure Preset
|
||||
|
||||
This preset emulates the look and behavior of [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||

|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset pure-preset -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pure-preset.toml)
|
||||
|
||||
<<< @/public/presets/toml/pure-preset.toml
|
||||
@@ -1,21 +0,0 @@
|
||||
[Return to Presets](./#pastel-powerline)
|
||||
|
||||
# Tokyo Night Preset
|
||||
|
||||
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
|
||||

|
||||
|
||||
### পূর্বশর্ত
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
|
||||
|
||||
### Configuration
|
||||
|
||||
```sh
|
||||
starship preset tokyo-night -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/tokyo-night.toml)
|
||||
|
||||
<<< @/public/presets/toml/tokyo-night.toml
|
||||
@@ -1,191 +0,0 @@
|
||||
---
|
||||
layout: home
|
||||
hero:
|
||||
image: /logo.svg
|
||||
text: null
|
||||
tagline: promptـێکی سوکەڵە، خێرا، و بێسنور دڵخوازکراو بۆ هەر شێڵێک!
|
||||
actions:
|
||||
- theme: brand
|
||||
text: دەستپێبکە ←
|
||||
link: ./guide/
|
||||
features:
|
||||
-
|
||||
title: سەرەتا گونجان
|
||||
details: کاردەکات لەسەر زۆربەی شێڵە باوەکان لەسەر زۆربەی سیستەمە باوەکان. لە هەموو شوێنێک بەکاری بهێنە!
|
||||
-
|
||||
title: Rust لە پشتە
|
||||
details: باشترینی هاوتاکانی لە خێرایی و سەلامەتی Rust بەکارئەهێنێ بۆ ئەوەی promptـەکەت خێراترین و پشت پێبەستراوین بێ.
|
||||
-
|
||||
title: دڵخوازکراو
|
||||
details: هەموو وردەکارییەکی دڵخواز ئەکرێ بەوجۆرەی حەزت لێیە، بۆ ئەوەی promptـەکە سوکەڵە بێ و پڕ تایبەتمەندی بێت بەوجۆرەی حەزت لێیە ببێ.
|
||||
footer: لەژێر مۆڵەتی ISCـە | مافی پارێزراوە © 2019-ئێستا بەژداریکەرانی Starship
|
||||
#Used for the description meta tag, for SEO
|
||||
metaTitle: "Starship: یەکێ لە Promptـە شێڵ نەناسەکان"
|
||||
description: 'Starship: یەکێ لە promptـە سوکەڵە، خێرا، و بێسنور دڵخوازکراوەکان بۆ هەر شێڵێک! ئەو زانیارییانە پشان دەدات کە پێویستە، لەوکاتەیا بە ئارامی و سوکەڵەیی ئەمێنێتەوە. Quick installation available for Bash, Fish, ZSH, Ion, Tcsh, Elvish, Nu, Xonsh, Cmd, and PowerShell.'
|
||||
---
|
||||
|
||||
<div class="center">
|
||||
<video class="demo-video" muted autoplay loop playsinline>
|
||||
<source src="/demo.webm" type="video/webm">
|
||||
<source src="/demo.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
### پێشمەرجەکان
|
||||
|
||||
- [فۆنتێکی Nerd](https://www.nerdfonts.com/) دامەزراوە و چالاککراوە لە تێرمیناڵەکەتا.
|
||||
|
||||
### دامەزراندنی خێرا
|
||||
|
||||
1. باینەری **starship** دابمەزرێنە:
|
||||
|
||||
|
||||
#### کۆتا وەشان دابمەزرێنە
|
||||
|
||||
لەگەڵ شێڵ:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
بۆ نوێکردنەوەی Starship خۆی، نووسینەکەی سەرەوە ڕەن بکەوە. وەشانی ئێستا دەگۆڕێت بێ ئەوەی دەسکاری ڕێکخستنەکانی Starship بکات.
|
||||
|
||||
|
||||
#### دابمەزرێنە لەڕێگەی بەڕێوبەری گورزەوە
|
||||
|
||||
لەگەڵ [Homebrew](https://brew.sh/):
|
||||
|
||||
```sh
|
||||
brew install starship
|
||||
```
|
||||
With [Winget](https://github.com/microsoft/winget-cli):
|
||||
|
||||
```powershell
|
||||
winget install starship
|
||||
```
|
||||
|
||||
1. نوسینی init زیادبکە بۆ فایلی ڕێکخستنی شێڵەکەت:
|
||||
|
||||
|
||||
#### Bash
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
# ~/.bashrc
|
||||
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
|
||||
#### Fish
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/fish/config.fish`:
|
||||
|
||||
```sh
|
||||
# ~/.config/fish/config.fish
|
||||
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
|
||||
#### Zsh
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.zshrc
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `Microsoft.PowerShell_profile.ps1`. ئەتوانی شوێنی ئەم فایلە ببینیتەوە بە سەیرکردنی گۆڕاوی `$PROFILE` لە PowerShell. ئاسایی ڕێڕەوەکە بریتیە لە `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` یان `/.config/powershell/Microsoft.PowerShell_profile.ps1` لەسەر -Nix.
|
||||
|
||||
```sh
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
|
||||
#### Ion
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
# ~/.config/ion/initrc
|
||||
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
|
||||
#### Elvish
|
||||
|
||||
::: warning
|
||||
|
||||
Only elvish v0.18 or higher is supported.
|
||||
|
||||
:::
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
|
||||
#### Tcsh
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.tcshrc
|
||||
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
|
||||
#### Nushell
|
||||
|
||||
::: warning
|
||||
|
||||
This will change in the future. Only Nushell v0.78+ is supported.
|
||||
|
||||
:::
|
||||
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
|
||||
#### Xonsh
|
||||
|
||||
ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`:
|
||||
|
||||
```sh
|
||||
# ~/.xonshrc
|
||||
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
|
||||
#### Cmd
|
||||
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Add the following to a file `starship.lua` and place this file in Clink scripts directory:
|
||||
|
||||
```lua
|
||||
-- starship.lua
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
@@ -1,284 +0,0 @@
|
||||
# ڕێکخستنی پێشکەوتوو
|
||||
|
||||
لەگەڵ ئەوەی Starship شێڵێکە بەکارهێنانی زۆرە، هەندێک جار دەسکاری کردنی `starship.toml` بەس نییە بۆ ئەوەی وای لێبکەی هەندێک شتی دیاریکراو ئەنجام بدات. ئەم پەڕەیە ووردەکاری زیاتر ئەدات لەسەر هەندێک لە شێوازە ڕێکخستنە پێشکەوتووترەکان کە لە Starshipـدا بەکارهاتووە.
|
||||
|
||||
::: ئاگادارکردنەوە
|
||||
|
||||
ڕێکخستنەکانی ئەم بەشە شایەنی گۆڕانن لە وەشانەکانی داهاتووی Starshipدا.
|
||||
|
||||
:::
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
&starship module character
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
Enable-TransientPrompt
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
|
||||
|
||||
- `always`: always replace the previous prompt
|
||||
- `same_dir`: replace the previous prompt only if the working directory is same
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
return io.popen("starship module character"
|
||||
.." --keymap="..rl.getvariable('keymap')
|
||||
):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
return io.popen("starship module time"):read("*a")
|
||||
end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Fish
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`.
|
||||
|
||||
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
|
||||
|
||||
- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_prompt_func
|
||||
starship module character
|
||||
end
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_rprompt_func
|
||||
starship module time
|
||||
end
|
||||
starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in Cmd
|
||||
|
||||
Clink provides extremely flexible APIs to run pre-prompt and pre-exec commands in Cmd shell. It is fairly simple to use with Starship. Make the following changes to your `starship.lua` file as per your requirements:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function called `starship_preprompt_user_func`. This function receives the current prompt as a string that you can utilize. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
print("🚀")
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- To run a custom function right before a command is executed, define a new function called `starship_precmd_user_func`. This function receives the current commandline as a string that you can utilize. For example, to print the command that's about to be executed, you would do
|
||||
|
||||
```lua
|
||||
function starship_precmd_user_func(line)
|
||||
print("Executing: "..line)
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
## فرمانە کڕیاڕخوازەکانی pre-prompt و pre-execution لە Bashـدا
|
||||
|
||||
بەپێچەوانەی شێلەکانی دیکە Bash هیچ چوارچێوەیەکی فەرمی preexec/precmdـی نییە. لەبەر ئەوە، دابین کردنی قولابە تەواو کڕیارخوازکراوەکان ئاسان نییە لە `Bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
starship_precmd_user_func="blastoff"
|
||||
```
|
||||
|
||||
- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal _before_ initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break.
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
echo "🚀"
|
||||
}
|
||||
trap blastoff DEBUG # Trap DEBUG *before* running starship
|
||||
set -o functrace
|
||||
eval $(starship init bash)
|
||||
set +o functrace
|
||||
```
|
||||
|
||||
## Custom pre-prompt and pre-execution Commands in PowerShell
|
||||
|
||||
PowerShell does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `powershell`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure:
|
||||
|
||||
Create a function named `Invoke-Starship-PreCommand`
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.Write("🚀")
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
|
||||
Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash`, `zsh`, `cmd` or `powershell`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
|
||||
```bash
|
||||
precmd_functions+=(set_win_title)
|
||||
```
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; $(basename "$PWD") \007"
|
||||
}
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
For Cmd, you can change the window title using the `starship_preprompt_user_func` function.
|
||||
|
||||
```lua
|
||||
function starship_preprompt_user_func(prompt)
|
||||
console.settitle(os.getenv('USERNAME').."@"..os.getenv('COMPUTERNAME')..": "..os.getcwd())
|
||||
end
|
||||
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
You can also set a similar output with PowerShell by creating a function named `Invoke-Starship-PreCommand`.
|
||||
|
||||
```powershell
|
||||
# edit $PROFILE
|
||||
function Invoke-Starship-PreCommand {
|
||||
$host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a"
|
||||
}
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Enable Right Prompt
|
||||
|
||||
Some shells support a right prompt which renders on the same line as the input. Starship can set the content of the right prompt using the `right_format` option. Any module that can be used in `format` is also supported in `right_format`. The `$all` variable will only contain modules not explicitly used in either `format` or `right_format`.
|
||||
|
||||
Note: The right prompt is a single line following the input location. To right align modules above the input line in a multi-line prompt, see the [`fill` module](../config/#fill).
|
||||
|
||||
`right_format` is currently supported for the following shells: elvish, fish, zsh, xonsh, cmd, nushell.
|
||||
|
||||
### نموونە
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A minimal left prompt
|
||||
format = """$character"""
|
||||
|
||||
# move the rest of the prompt to the right
|
||||
right_format = """$all"""
|
||||
```
|
||||
|
||||
Produces a prompt like the following:
|
||||
|
||||
```
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
```
|
||||
|
||||
## Continuation Prompt
|
||||
|
||||
Some shells support a continuation prompt along with the normal prompt. This prompt is rendered instead of the normal prompt when the user has entered an incomplete statement (such as a single left parenthesis or quote).
|
||||
|
||||
Starship can set the continuation prompt using the `continuation_prompt` option. The default prompt is `'[∙](bright-black) '`.
|
||||
|
||||
Note: `continuation_prompt` should be set to a literal string without any variables.
|
||||
|
||||
Note: Continuation prompts are only available in the following shells:
|
||||
|
||||
- `bash`
|
||||
- `zsh`
|
||||
- `PowerShell`
|
||||
|
||||
### نموونە
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# A continuation prompt that displays two filled in arrows
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
- `تۆخ`
|
||||
- `لار`
|
||||
- `بنهێڵ`
|
||||
- `کاڵ کراو`
|
||||
- `پێچەوانە کراو`
|
||||
- `blink`
|
||||
- `hidden`
|
||||
- `strikethrough`
|
||||
- `bg:<color>`
|
||||
- `fg:<color>`
|
||||
- `<color>`
|
||||
- `هیچ`
|
||||
|
||||
کە `<color>` دیاریکەری ڕەنگێکە (لە ژێرەوە باسکراوە). `fg:<color>` و `<color>` لە ئێستادا هەمان شت ئەکەن، بەڵام ئەمە ڕەنگە لە داهاتووا بگۆڕێت. `inverted` ڕەنگی پاشبنەما و پێشبنەما ئەگۆڕێتەوە. ڕیزبەندی ووشەکان لە زنجیرەکەدا گرنگ نییە.
|
||||
|
||||
The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
|
||||
- One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`).
|
||||
- A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
|
||||
Not every style string will be displayed correctly by every terminal. In particular, the following known quirks exist:
|
||||
|
||||
- Many terminals disable support for `blink` by default
|
||||
- `hidden` is [not supported on iTerm](https://gitlab.com/gnachman/iterm2/-/issues/4564).
|
||||
- `strikethrough` is not supported by the default macOS Terminal.app
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,130 +0,0 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## ئەو ڕێکخستنە چییە لە GIF پێشاندانەکەدا بەکارهاتووە؟
|
||||
|
||||
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
|
||||
- **ڕووکار**: Minimal
|
||||
- **شێوازی ڕەنگەکان**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **فۆنت**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **شێڵ**: [شێڵی Fish](https://fishshell.com/)
|
||||
- **ڕێکخستن**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## How do I get command completion as shown in the demo GIF?
|
||||
|
||||
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
|
||||
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
|
||||
|
||||
- Disabling modules is more explicit than omitting them from the top level `format`
|
||||
- Newly created modules will be added to the prompt as Starship is updated
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
|
||||
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
The [Bash implementation](https://github.com/starship/starship/blob/master/src/init/starship.bash) built into Starship is slightly more complex to allow for advanced features like the [Command Duration module](https://starship.rs/config/#command-duration) and to ensure that Starship is compatible with pre-installed Bash configurations.
|
||||
|
||||
For a list of all flags accepted by `starship prompt`, use the following command:
|
||||
|
||||
```sh
|
||||
starship prompt --help
|
||||
```
|
||||
|
||||
The prompt will use as much context as is provided, but no flags are "required".
|
||||
|
||||
## How do I run Starship on Linux distributions with older versions of glibc?
|
||||
|
||||
If you get an error like "_version 'GLIBC_2.18' not found (required by starship)_" when using the prebuilt binary (for example, on CentOS 6 or 7), you can use a binary compiled with `musl` instead of `glibc`:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --platform unknown-linux-musl
|
||||
```
|
||||
|
||||
## Why do I see `Executing command "..." timed out.` warnings?
|
||||
|
||||
Starship executes different commands to get information to display in the prompt, for example the version of a program or the current git status. To make sure starship doesn't hang while trying to execute these commands we set a time limit, if a command takes longer than this limit starship will stop the execution of the command and output the above warning, this is expected behaviour. This time limit is configurable using the [`command_timeout`key](../config/#prompt) so if you want you can increase the time limit. You can also follow the debugging steps below to see which command is being slow and see if you can optimise it. Finally you can set the `STARSHIP_LOG` env var to `error` to hide these warnings.
|
||||
|
||||
## I see symbols I don't understand or expect, what do they mean?
|
||||
|
||||
If you see symbols that you don't recognise you can use `starship explain` to explain the currently showing modules.
|
||||
|
||||
## Starship is doing something unexpected, how can I debug it?
|
||||
|
||||
You can enable the debug logs by using the `STARSHIP_LOG` env var. These logs can be very verbose so it is often useful to use the `module` command if you are trying to debug a particular module, for example, if you are trying to debug the `rust` module you could run the following command to get the trace logs and output from the module.
|
||||
|
||||
```sh
|
||||
env STARSHIP_LOG=trace starship module rust
|
||||
```
|
||||
|
||||
If starship is being slow you can try using the `timings` command to see if there is a particular module or command that to blame.
|
||||
|
||||
```sh
|
||||
env STARSHIP_LOG=trace starship timings
|
||||
```
|
||||
|
||||
This will output the trace log and a breakdown of all modules that either took more than 1ms to execute or produced some output.
|
||||
|
||||
Finally if you find a bug you can use the `bug-report` command to create a GitHub issue.
|
||||
|
||||
```sh
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. You need to ensure that:
|
||||
|
||||
- Your locale is set to a UTF-8 value, like `de_DE.UTF-8` or `ja_JP.UTF-8`. If `LC_ALL` is not a UTF-8 value, [you will need to change it](https://www.tecmint.com/set-system-locales-in-linux/).
|
||||
- You have an emoji font installed. Most systems come with an emoji font by default, but some (notably Arch Linux) do not. You can usually install one through your system's package manager--[noto emoji](https://www.google.com/get/noto/help/emoji/) is a popular choice.
|
||||
- You are using a [Nerd Font](https://www.nerdfonts.com/).
|
||||
|
||||
To test your system, run the following commands in a terminal:
|
||||
|
||||
```sh
|
||||
echo -e "\xf0\x9f\x90\x8d"
|
||||
echo -e "\xee\x82\xa0"
|
||||
```
|
||||
|
||||
The first line should produce a [snake emoji](https://emojipedia.org/snake/), while the second should produce a [powerline branch symbol (e0a0)](https://github.com/ryanoasis/powerline-extra-symbols#glyphs).
|
||||
|
||||
If either symbol fails to display correctly, your system is still misconfigured. Unfortunately, getting font configuration correct is sometimes difficult. Users on the Discord may be able to help. If both symbols display correctly, but you still don't see them in starship, [file a bug report!](https://github.com/starship/starship/issues/new/choose)
|
||||
|
||||
## How do I uninstall Starship?
|
||||
|
||||
Starship is just as easy to uninstall as it is to install in the first place.
|
||||
|
||||
1. Remove any lines in your shell config (e.g. `~/.bashrc`) used to initialize Starship.
|
||||
1. Delete the Starship binary.
|
||||
|
||||
If Starship was installed using a package manager, please refer to their docs for uninstallation instructions.
|
||||
|
||||
If Starship was installed using the install script, the following command will delete the binary:
|
||||
|
||||
```sh
|
||||
# Locate and delete the starship binary
|
||||
sh -c 'rm "$(command -v 'starship')"'
|
||||
```
|
||||
|
||||
## How do I install Starship without `sudo`?
|
||||
|
||||
The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`.
|
||||
|
||||
For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options.
|
||||
|
||||
When using a package manager, see the documentation for your package manager about installing with or without `sudo`.
|
||||
@@ -1,441 +0,0 @@
|
||||
<p align="center">
|
||||
<img
|
||||
width="400"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
|
||||
alt="Starship - یەکێ لە promptـە شێڵ نەناسەکان"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/actions"
|
||||
><img
|
||||
src="https://img.shields.io/github/actions/workflow/status/starship/starship/workflow.yml?branch=master&label=workflow&style=flat-square"
|
||||
alt="دۆخی ڕێڕەوی کارەکان لە GitHub Actions"
|
||||
/></a>
|
||||
<a href="https://crates.io/crates/starship"
|
||||
><img
|
||||
src="https://img.shields.io/crates/v/starship?style=flat-square"
|
||||
alt="وەشانی Crates.io"
|
||||
/></a>
|
||||
<a href="https://repology.org/project/starship/versions"
|
||||
><img
|
||||
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
|
||||
alt="دۆخی پێچانەوە" /></a
|
||||
><br />
|
||||
<a href="https://discord.gg/starship"
|
||||
><img
|
||||
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
|
||||
alt="گفتوگۆ لە Discord"
|
||||
/></a>
|
||||
<a href="https://twitter.com/StarshipPrompt"
|
||||
><img
|
||||
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
|
||||
alt="شوێن @StarshipPrompt بکەوە لەسەر تویتەر"
|
||||
/></a>
|
||||
<a href="https://stand-with-ukraine.pp.ua"
|
||||
><img
|
||||
src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraineFlat.svg"
|
||||
alt="Stand With Ukraine"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/ckb-IR">ماڵپەڕ</a> · <a href="#🚀-installation">دامەزراندن</a> · <a href="https://starship.rs/ckb-IR/config/">رێکخستن</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/starship/starship/blob/master/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-us.png"
|
||||
alt="English"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/de-DE/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-de.png"
|
||||
alt="Deutsch"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/es-ES/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-es.png"
|
||||
alt="Español"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/fr-FR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-fr.png"
|
||||
alt="Français"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/id-ID/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-id.png"
|
||||
alt="Bahasa Indonesia"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/it-IT/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-it.png"
|
||||
alt="Italiano"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ja-JP/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-jp.png"
|
||||
alt="日本語"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/pt-BR/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-br.png"
|
||||
alt="پورتوگالیی بەڕازیل"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/ru-RU/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ru.png"
|
||||
alt="Русский"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/uk-UA/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ua.png"
|
||||
alt="Українська"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-vn.png"
|
||||
alt="Tiếng Việt"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-CN/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-cn.png"
|
||||
alt="简体中文"
|
||||
/></a>
|
||||
|
||||
<a
|
||||
href="https://github.com/starship/starship/blob/master/docs/zh-TW/guide/README.md"
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-tw.png"
|
||||
alt="繁體中文"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<h1></h1>
|
||||
|
||||
<img
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
|
||||
alt="Starship لەگەڵ iTerm2 و ڕووکاری Snazzy"
|
||||
width="50%"
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**promptـێکی سوکەڵە، خێرا، و بێسنور دڵخوازکراو بۆ هەر شێڵێک!**
|
||||
|
||||
- **خێرا:** خێرایە – _زۆر زۆر_ خێرایە! 🚀
|
||||
- **دڵخوازکراو:** هەموو سوچێکی promptـەکەت ڕێکبخە.
|
||||
- **گشتگیر:** لەسەر هەر شێڵێک، هەر سیستەمێک ئیش ئەکات.
|
||||
- **زیرەک:** زانیاری پەیوەندیدار لە چاوتروکانێک نیشان دەدات.
|
||||
- **دەوڵەمەند بە تایبەتمەندی:** پشتگیری هەموو ئامرازە دڵخوازەکانت ئەکات.
|
||||
- **ئاسان:** خێرا لە دامەزراندن – دەست ئەکەیت بە بەکارهێنانی لە چەند خولەکێکدا.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/ckb-IR/config/"><strong>بەڵگەنامەکانی Starship بگەڕێ ◀</strong></a>
|
||||
</p>
|
||||
|
||||
<a name="🚀-installation"></a>
|
||||
|
||||
## 🚀 دامەزراندن
|
||||
|
||||
### پێشمەرجەکان
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (for example, try the [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)).
|
||||
|
||||
### Step 1. Install Starship
|
||||
|
||||
Select your operating system from the list below to view installation instructions:
|
||||
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| --------------------------------------------------------------------------------- | ---------------------- |
|
||||
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------ | -------------------------------------------------------- | --------------------------------- |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
|
||||
| NetBSD | [pkgsrc](https://pkgsrc.se/shells/starship) | `pkgin install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Linux</summary>
|
||||
|
||||
Install the latest version for your system:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
| Distribution | Repository | Instructions |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| _Any_ | [Linuxbrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| Alpine Linux 3.13+ | [Alpine Linux Packages](https://pkgs.alpinelinux.org/packages?name=starship) | `apk add starship` |
|
||||
| Arch Linux | [Arch Linux Extra](https://archlinux.org/packages/extra/x86_64/starship) | `pacman -S starship` |
|
||||
| CentOS 7+ | [Copr](https://copr.fedorainfracloud.org/coprs/atim/starship) | `dnf copr enable atim/starship` <br /> `dnf install starship` |
|
||||
| Gentoo | [Gentoo Packages](https://packages.gentoo.org/packages/app-shells/starship) | `emerge app-shells/starship` |
|
||||
| Manjaro | | `pacman -S starship` |
|
||||
| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix) | `nix-env -iA nixpkgs.starship` |
|
||||
| openSUSE | [OSS](https://software.opensuse.org/package/starship) | `zypper in starship` |
|
||||
| Void Linux | [Void Linux Packages](https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship) | `xbps-install -S starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>macOS</summary>
|
||||
|
||||
Install the latest version for your system:
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
```
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Homebrew](https://formulae.brew.sh/formula/starship) | `brew install starship` |
|
||||
| [MacPorts](https://ports.macports.org/port/starship) | `port install starship` |
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Windows</summary>
|
||||
|
||||
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
| [Scoop](https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json) | `scoop install starship` |
|
||||
| [winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship) | `winget install --id Starship.Starship` |
|
||||
|
||||
</details>
|
||||
|
||||
### Step 2. Set up your shell to use Starship
|
||||
|
||||
Configure your shell to initialize starship. Select yours from the list below:
|
||||
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.bashrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init bash)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Cmd</summary>
|
||||
|
||||
You need to use [Clink](https://chrisant996.github.io/clink/clink.html) (v1.2.30+) with Cmd. Create a file at this path `%LocalAppData%\clink\starship.lua` with the following contents:
|
||||
|
||||
```lua
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.elvish/rc.elv`:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
Note: Only Elvish v0.18+ is supported
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Fish</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/fish/config.fish`:
|
||||
|
||||
```fish
|
||||
starship init fish | source
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Ion</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.config/ion/initrc`:
|
||||
|
||||
```sh
|
||||
eval $(starship init ion)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
Add the following to the end of your Nushell env file (find it by running `$nu.env-path` in Nushell):
|
||||
|
||||
```sh
|
||||
mkdir ~/.cache/starship
|
||||
starship init nu | save -f ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
And add the following to the end of your Nushell configuration (find it by running `$nu.config-path`):
|
||||
|
||||
```sh
|
||||
use ~/.cache/starship/init.nu
|
||||
```
|
||||
|
||||
Note: Only Nushell v0.78+ is supported
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>PowerShell</summary>
|
||||
|
||||
Add the following to the end of your PowerShell configuration (find it by running `$PROFILE`):
|
||||
|
||||
```powershell
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Tcsh</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.tcshrc`:
|
||||
|
||||
```sh
|
||||
eval `starship init tcsh`
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Xonsh</summary>
|
||||
|
||||
ئەمەی دێت زیادبکە بۆ کۆتایی پەڕگەی `~/.xonshrc`:
|
||||
|
||||
```python
|
||||
execx($(starship init xonsh))
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Zsh</summary>
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `~/.zshrc`:
|
||||
|
||||
```sh
|
||||
eval "$(starship init zsh)"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Step 3. Configure Starship
|
||||
|
||||
Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!
|
||||
|
||||
If you're looking to further customize Starship:
|
||||
|
||||
- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking
|
||||
|
||||
- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others
|
||||
|
||||
## 🤝 بەژداریکردن
|
||||
|
||||
ئێمە هەموو کات ئەگەڕێین بۆ بەژداریکەرێک لە هەر **ئاست و توانایەکدا بێت**! ئەگەر بەدوای ئەوەوەی کە بێیتە ئەم پڕۆژەیەوە [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue) تاقیبکەرەوە.
|
||||
|
||||
ئەگەر پاراویت لە زمانێک جگە لە ئینگلیزی، ئێمە زۆر خۆشحاڵدەبین بە هەر یارمەتییەک کە بەڵگەنامەکانمان بە وەرگێڕدراوی بهێڵێتەوە و نوێکراوی بهێڵێتەوە بە زمانەکانی دیکە. ئەگەر نیازت هەیە یارمەتی بدەیت، ئەتوانی بەژداری لە وەرگێڕاندا بکەیت لەسەر [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
ئەگەر حەزئەکەیت یارمەتی بدەیت بە بەژداریکردن لە starship، تکایە سەیری [ڕێبەری بەژداریکردن](https://github.com/starship/starship/blob/master/CONTRIBUTING.md)ـەکەمان بکە. هەروەها، شەرم مەکە وەرە نێوە [ڕاژەی Discord](https://discord.gg/8Jzqu3T)ـەکەمانەوە و سڵاوێک بکە. 👋
|
||||
|
||||
## 💭 ئیلهامبەخشەکان
|
||||
|
||||
تکایە ئەم کارە کۆنانە سەیربکەوە کە ئیلهامی دروستکردنی starship دا. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.
|
||||
|
||||
- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.
|
||||
|
||||
- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.
|
||||
|
||||
## ❤️ Sponsors
|
||||
|
||||
Support this project by [becoming a sponsor](https://github.com/sponsors/starship). Your name or logo will show up here with a link to your website.
|
||||
|
||||
**Supporter Tier**
|
||||
|
||||
- [Appwrite](https://appwrite.io/)
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="ئایکۆنی مووشەکی Starship">
|
||||
</p>
|
||||
|
||||
## 📝 مۆڵەتنامە
|
||||
|
||||
هەموو مافێکی پارێزراوە © 2019-ئێستا، [بەژداریکەرانی Starship](https://github.com/starship/starship/graphs/contributors). <br />ئەم پڕۆژەیە لە ژێر مۆڵەتنامەی [ISC](https://github.com/starship/starship/blob/master/LICENSE)ـە.
|
||||
@@ -1,93 +0,0 @@
|
||||
# Advanced Installation
|
||||
|
||||
To install starship, you need to do two things:
|
||||
|
||||
1. Get the **starship** binary onto your computer
|
||||
1. Tell your shell to use the starship binary as its prompt by modifying its init scripts
|
||||
|
||||
For most users, the instructions on [the main page](../guide/#🚀-installation) will work great. However, for some more specialized platforms, different instructions are needed.
|
||||
|
||||
There are so many platforms out there that they didn't fit into the main README.md file, so here are some installation instructions for other platforms from the community. Is yours not here? Please do add it here if you figure it out!
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### پێشمەرجەکان
|
||||
|
||||
Head over to the [Chocolatey installation page](https://chocolatey.org/install) and follow the instructions to install Chocolatey.
|
||||
|
||||
### دامەزراندن
|
||||
|
||||
```powershell
|
||||
choco install starship
|
||||
```
|
||||
|
||||
## [termux](https://termux.com)
|
||||
|
||||
### پێشمەرجەکان
|
||||
|
||||
```sh
|
||||
pkg install getconf
|
||||
```
|
||||
|
||||
### دامەزراندن
|
||||
|
||||
```sh
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir /data/data/com.termux/files/usr/bin
|
||||
```
|
||||
|
||||
## [Funtoo Linux](https://www.funtoo.org/Welcome)
|
||||
|
||||
### دامەزراندن
|
||||
|
||||
On Funtoo Linux, starship can be installed from [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) via Portage:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
```
|
||||
|
||||
## [Nix](https://nixos.wiki/wiki/Nix)
|
||||
|
||||
### Getting the Binary
|
||||
|
||||
#### Imperatively
|
||||
|
||||
```sh
|
||||
nix-env -iA nixos.starship
|
||||
```
|
||||
|
||||
#### Declarative, single user, via [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
Enable the `programs.starship` module in your `home.nix` file, and add your settings
|
||||
|
||||
```nix
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
then run
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
```
|
||||
|
||||
#### Declarative, system-wide, with NixOS
|
||||
|
||||
Add `pkgs.starship` to `environment.systemPackages` in your `configuration.nix`, then run
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
@@ -1,267 +0,0 @@
|
||||
# Migrating to v0.45.0
|
||||
|
||||
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
||||
|
||||
This guide is intended to walk you through the breaking changes.
|
||||
|
||||
## `prompt_order` has been replaced by a root-level `format`
|
||||
|
||||
Previously to v0.45.0, `prompt_order` would accept an array of module names in the order which they should be rendered by Starship.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
prompt_order = [
|
||||
"username",
|
||||
"hostname",
|
||||
"directory",
|
||||
"git_branch",
|
||||
"git_commit",
|
||||
"git_state",
|
||||
"git_status",
|
||||
"cmd_duration",
|
||||
"custom",
|
||||
"line_break",
|
||||
"jobs",
|
||||
"battery",
|
||||
"time",
|
||||
"character",
|
||||
]
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
format = """\
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_commit\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$cmd_duration\
|
||||
$custom\
|
||||
$line_break\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$character\
|
||||
"""
|
||||
```
|
||||
|
||||
## Module `prefix` and `suffix` have been replaced by `format`
|
||||
|
||||
Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in order to stylize the way that modules are rendered.
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
prefix = "took "
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
# $duration – The command duration (e.g. "15s")
|
||||
# $style – The default style of the module (e.g. "bold yellow")
|
||||
format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
### Affected Modules
|
||||
|
||||
#### Character
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------------- | ---------------- |
|
||||
| `symbol` | `success_symbol` |
|
||||
| `use_symbol_for_status` | `error_symbol` |
|
||||
| `style_success` | `success_symbol` |
|
||||
| `style_failure` | `error_symbol` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[character]
|
||||
-- symbol = "❯"
|
||||
-- error_symbol = "✖"
|
||||
-- use_symbol_for_status = true
|
||||
-- vicmd_symbol = "❮"
|
||||
++ success_symbol = "[❯](bold green)"
|
||||
++ error_symbol = "[❯](bold red)"
|
||||
++ vicmd_symbol = "[❮](bold green)"
|
||||
```
|
||||
|
||||
Previously, the `use_symbol_for_status` property was used to configure the prompt to show the `error_symbol` when the last command resulted in a non-zero status code.
|
||||
|
||||
With the release of v0.45.0, we now always use `error_symbol` after non-zero status codes, unifying `use_symbol_for_status` and `error_symbol` properties.
|
||||
|
||||
To configure the prompt to use the older `use_symbol_for_status = true` configuration, add the following to your config file:
|
||||
|
||||
```toml
|
||||
[character]
|
||||
error_symbol = "[✖](bold red)"
|
||||
```
|
||||
|
||||
_Note:_ The `character` element automatically adds a space after, so unlike the other `format` strings, we specifically do not add one in the above examples.
|
||||
|
||||
#### Command Duration
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[cmd_duration]
|
||||
-- prefix = "took "
|
||||
++ format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
#### Directory
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[directory]
|
||||
-- prefix = "in "
|
||||
++ format = "[$path]($style)[$read_only]($read_only_style) "
|
||||
```
|
||||
|
||||
#### Environment Variable
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[env_var]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "with [$env_value]($style) "
|
||||
```
|
||||
|
||||
#### Git Commit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[git_commit]
|
||||
-- prefix = "("
|
||||
-- suffix = ")"
|
||||
++ format = '[\($hash\)]($style) '
|
||||
```
|
||||
|
||||
#### Git Status
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[git_status]
|
||||
-- prefix = "["
|
||||
-- suffix = "]"
|
||||
-- show_sync_count = false
|
||||
++ format = '([\[$all_status$ahead_behind\]]($style) )'
|
||||
```
|
||||
|
||||
Previously, the `show_sync_count` property was used to configure the prompt to show the number of commits the branch was ahead or behind the remote branch.
|
||||
|
||||
With the release of v0.45.0, this has been replaced with three separate properties, `ahead`, `behind`, and `diverged`.
|
||||
|
||||
To configure the prompt to use the older `show_sync_count = true` configuration, set the following to your config file:
|
||||
|
||||
```toml
|
||||
[git_status]
|
||||
ahead = "⇡${count}"
|
||||
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
||||
behind = "⇣${count}"
|
||||
```
|
||||
|
||||
#### Hostname
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[hostname]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "[$hostname]($style) in "
|
||||
```
|
||||
|
||||
#### Singularity
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[singularity]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = '[$symbol\[$env\]]($style) '
|
||||
```
|
||||
|
||||
#### Time
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[time]
|
||||
-- format = "🕙[ %T ]"
|
||||
++ time_format = "%T"
|
||||
++ format = "at 🕙[$time]($style) "
|
||||
```
|
||||
|
||||
#### Custom Commands
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Changes to the Default Configuration**
|
||||
|
||||
```diff
|
||||
[custom.example]
|
||||
-- prefix = ""
|
||||
-- suffix = ""
|
||||
++ format = "[$symbol$output]($style) "
|
||||
```
|
||||
@@ -1,71 +0,0 @@
|
||||
# پێش ڕێکخستنەکان
|
||||
|
||||
ئەمە کۆکراوەیەکە لەو پێش ڕێکخستنانەی کە لەلایەن کۆمەڵگاوە نێردراون بۆ Starship. ئەگەر پێش ڕێکخستنێکت هەیە بۆ هاوبەشکردن، تکایە [PRـێک بنێرە](https://github.com/starship/starship/edit/master/docs/presets/README.md) کە ئەم پەڕگەیە نوێبکاتەوە! 😊
|
||||
|
||||
To get details on how to use a preset, simply click on the image.
|
||||
|
||||
## [هێماکانی Nerd Font](./nerd-font.md)
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
|
||||
[](./nerd-font)
|
||||
|
||||
## [No Nerd Fonts](./no-nerd-font.md)
|
||||
|
||||
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
|
||||
|
||||
::: tip
|
||||
|
||||
This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
|
||||
|
||||
:::
|
||||
|
||||
[Click to view No Nerd Font preset](./no-nerd-font)
|
||||
|
||||
## [پارچە کەوانەکراوەکان](./bracketed-segments.md)
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||
[](./bracketed-segments)
|
||||
|
||||
## [هێما نووسینەکییە ئاساییەکان](./plain-text.md)
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
|
||||
[](./plain-text)
|
||||
|
||||
## [No Runtime Versions](./no-runtimes.md)
|
||||
|
||||
ئەم پێش ڕێکخستنە وەشانی کاتی جێبەجێکردنی زمانەکان دەشارێتەوە. ئەگەر کاردەکەیت لەگەڵ containerو ژینگە خەیاڵییەکان، ئەمە بۆ تۆیە!
|
||||
|
||||
[](./no-runtimes)
|
||||
|
||||
## [No Empty Icons](./no-empty-icons.md)
|
||||
|
||||
This preset does not show icons if the toolset is not found.
|
||||
|
||||
[](./no-empty-icons.md)
|
||||
|
||||
## [Pure Prompt](./pure-preset.md)
|
||||
|
||||
ئەم پێش ڕێکخستنە لاسایی شێواز و ڕەفتاری [Pure](https://github.com/sindresorhus/pure) دەکاتەوە.
|
||||
|
||||
[](./pure-preset)
|
||||
|
||||
## [Pastel Powerline](./pastel-powerline.md)
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
|
||||
[](./pastel-powerline)
|
||||
|
||||
## [Tokyo Night](./tokyo-night.md)
|
||||
|
||||
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
|
||||
[](./tokyo-night)
|
||||
|
||||
## [Gruvbox Rainbow](./gruvbox-rainbow.md)
|
||||
|
||||
This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
|
||||
|
||||
[](./gruvbox-rainbow)
|
||||
@@ -1,17 +0,0 @@
|
||||
[Return to Presets](./#bracketed-segments)
|
||||
|
||||
# Bracketed Segments Preset
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
|
||||

|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
```sh
|
||||
starship preset bracketed-segments -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/bracketed-segments.toml)
|
||||
|
||||
<<< @/public/presets/toml/bracketed-segments.toml
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user