mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
docs(i18n): new Crowdin updates (#3218)
This commit is contained in:
@@ -43,35 +43,35 @@ function Invoke-Starship-PreCommand {
|
||||
}
|
||||
```
|
||||
|
||||
## Change Window Title
|
||||
## Mengubah Judul Window
|
||||
|
||||
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` or `zsh`.
|
||||
Beberapa prompt shell dengan otomatis akan mengubah judul window-nya untukmu (mis. untuk merefleksikan direktori kerjamu). Fish bahkan mengaturnya sebagai bawaan. Starship tidak, tapi mudah saja untuk menambahkan fungsi tersebut ke dalam `bash` ataupun `zsh`.
|
||||
|
||||
First, define a window title change function (identical in bash and zsh):
|
||||
Pertama, buatlah fungsi untuk mengubah judul window (bekerja pada bash dan zsh):
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007"
|
||||
echo -ne "\033]0; JUDUL_WINDOW_MU \007"
|
||||
}
|
||||
```
|
||||
|
||||
You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices).
|
||||
Kamu bisa menggunakan variabel untuk mengkustomisasi judulnya (`$USER`, `$HOSTNAME`, dan `$PWD` adalah opsi yang populer).
|
||||
|
||||
In `bash`, set this function to be the precmd starship function:
|
||||
Di dalam `bash`, atur fungsi berikut menjadi fungsi precmd untuk starship:
|
||||
|
||||
```bash
|
||||
starship_precmd_user_func="set_win_title"
|
||||
```
|
||||
|
||||
In `zsh`, add this to the `precmd_functions` array:
|
||||
Dalam `zsh`, pada array `precmd_functions`, tambahkan:
|
||||
|
||||
```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.
|
||||
Kalau kamu suka hasilnya, tambahkan baris (`~/.bashrc` or `~/.zshrc`) ke dalam file konfigurasi shell milikmu untuk membuatnya permanen.
|
||||
|
||||
For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`:
|
||||
Sebagai contoh, kalau kamu mau menampilkan lokasi direktori pada judul label terminalmu, tambahkan bagian berikut ke dalam `~/.bashrc` atau `~/.zshrc`:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@@ -97,7 +97,7 @@ Some shells support a right prompt which renders on the same line as the input.
|
||||
|
||||
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.
|
||||
`right_format` saat ini hanya tersedia pada shell: elvish, fish, zsh.
|
||||
|
||||
### Contoh
|
||||
|
||||
@@ -111,7 +111,7 @@ format = """$character"""
|
||||
right_format = """$all"""
|
||||
```
|
||||
|
||||
Produces a prompt like the following:
|
||||
Menghasilkan prompt seperti berikut:
|
||||
|
||||
```
|
||||
▶ starship on rprompt [!] is 📦 v0.57.0 via 🦀 v1.54.0 took 17s
|
||||
@@ -120,7 +120,7 @@ Produces a prompt like the following:
|
||||
|
||||
## Menata String
|
||||
|
||||
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:
|
||||
Style strings are a list of words, separated by whitespace. Kumpulan katanya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
|
||||
|
||||
- `bold`
|
||||
- `italic`
|
||||
@@ -132,14 +132,14 @@ Style strings are a list of words, separated by whitespace. The words are not ca
|
||||
- `<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.
|
||||
yang mana `<color>` merupakan sebuah penentu warna (dibahas di bawah). `fg:<color>` dan `<color>` untuk saat ini memiliki fungsi yang sama, meskipun bisa berubah di kemudian hari. `inverted` menggantikan warna pada latar depan dan belakang. Urutan kata pada string tidak jadi masalah.
|
||||
|
||||
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.
|
||||
`none` bisa menimpa nilai token lainnya di dalam string jika Ia tidak termaksud dalam penentu warna pada `bg:` sebagai contoh, `fg:red none fg:blue` akan tetap menjadi string yang tidak memiliki penataan. `bg:none` menjadikan warna pada latar belakang sebagai warna bawaan. Jadi, nilai `fg:red bg:none` sama dengan `red` atau `fg:red` dan nilai `bg:green fg:red bg:none` juga sama dengan `fg:red` ataupun `red`. Mungkin akan jadi masalah untuk menggunakan `none` dengan token lainnya di kemudian hari.
|
||||
|
||||
A color specifier can be one of the following:
|
||||
Penentuan warna bisa dilakukan dengan salah satu cara berikut:
|
||||
|
||||
- Warna terminal pada umumnya terdiri dari: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. Untuk memperoleh varian warna yang lebih cerah, kamu dapat menggunakan token `bright-` (mis. `bright-white`).
|
||||
- Menuliskannya dengan menggunakan `#` dan diikuti oleh enam digit angka hexadesimal. Spesifikasi [kode heksadesimal pada warna RGB](https://www.w3schools.com/colors/colors_hexadecimal.asp).
|
||||
- Menggunakan bilangan antara 0-255. Spesifikasi [8-bit Kode Warna ANSI](https://i.stack.imgur.com/KTSQa.png).
|
||||
|
||||
If multiple colors are specified for foreground/background, the last one in the string will take priority.
|
||||
Jika warna yang dipakai pada latar depan/latar belakang banyak, maka warna yang terbaru pada string yang akan diprioritaskan.
|
||||
|
||||
+582
-511
File diff suppressed because it is too large
Load Diff
@@ -223,6 +223,9 @@ format = '\[[$symbol($version)]($style)\]'
|
||||
[scala]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
[sudo]
|
||||
format = '\[[as $symbol]\]
|
||||
|
||||
[swift]
|
||||
format = '\[[$symbol($version)]($style)\]'
|
||||
|
||||
@@ -371,6 +374,9 @@ symbol = "rs "
|
||||
[scala]
|
||||
symbol = "scala "
|
||||
|
||||
[sudo]
|
||||
symbol = "sudo "
|
||||
|
||||
[swift]
|
||||
symbol = "swift "
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user