Commit graph

904 commits

Author SHA1 Message Date
Jan De Dobbeleer d4fbbaebb3 fix(title): trim ansi
resolves #1922
2022-03-14 22:16:22 +01:00
Jan De Dobbeleer 096cb8e997 feat: remove console title style 2022-03-14 22:16:22 +01:00
Jan De Dobbeleer dcc2080047 fix(config): handle yaml correctly on yml extension 2022-03-14 12:46:26 +01:00
Jan De Dobbeleer b4c44ea8d1 fix(migrate): do not trigger auto migration 2022-03-14 12:46:26 +01:00
Jan De Dobbeleer a64a041c86
chore: remove post- and prefix references
relates to #1916
2022-03-13 20:24:49 +01:00
Jan De Dobbeleer 35c76bdf75 fix(cli): revert to previous flag names
relates to #1913
2022-03-13 07:57:35 +01:00
Jan De Dobbeleer 0bd957fc76 fix(cli): version info compatibility
resolves #1911
2022-03-13 07:57:35 +01:00
Jan De Dobbeleer 10d56a8551 refactor(cli): migrate to cobra 2022-03-12 23:05:57 +01:00
Jan De Dobbeleer 11da129799 fix: don't panic when env is empty
resolves #1907
2022-03-12 23:05:57 +01:00
Elio Struyf 458ac80935 feat: project segment 2022-03-12 22:08:32 +01:00
Jan De Dobbeleer 62c1581e03 fix(zsh): adjust prompt commands to standard 2022-03-11 19:37:54 +01:00
Elio Struyf 1e3937f5f2 feat: npm segment 2022-03-10 22:09:30 +01:00
Jan De Dobbeleer 1b81e085e9 feat(az): allow switching between subscription source
relates to #1562
2022-03-09 14:01:16 +01:00
Jacek W f2a8cbe990 feat: cds segment 2022-03-09 10:10:55 +01:00
Jan De Dobbeleer f7d33b1deb fix: async prompt for cmd 2022-03-08 07:48:43 +01:00
Jan De Dobbeleer 0d366149b9 feat: query all window titles for app info
resolves #1354
2022-03-06 19:28:35 +01:00
jedwillick e075f76718 feat: add hide root to agnoster short 2022-03-05 13:12:49 +01:00
jedwillick 9cb0775b25 feat(swift): add swift segment 2022-03-03 08:00:14 +01:00
jedwillick db52fcd198 fix: typo in numerous version url templates 2022-03-03 07:56:09 +01:00
Jan De Dobbeleer ee2b6e3f14 fix(cmd): use full executable path
relates to #1852
2022-03-02 13:10:57 +01:00
Jan De Dobbeleer a3a9b17f1e fix(cmd): insert executable name to avoid spaces in path
relates to #1852
2022-03-02 08:17:38 +01:00
Jan De Dobbeleer d5da06e33d refactor: remove redundant length property 2022-03-01 19:08:04 +01:00
jedwillick 60ec1c6768 feat(kotlin): adds kotlin segment 2022-03-01 10:15:21 +01:00
Jan De Dobbeleer d6c60f992c feat(template): expose glob as template function 2022-03-01 08:24:40 +01:00
Jan De Dobbeleer 18be8a37bf fix(engine): only count non-space characters
resolves #1837
2022-02-28 18:43:40 +01:00
mansur be60b64585 fix: set .Mismatch flag for node segment 2022-02-28 15:51:08 +01:00
Jan De Dobbeleer 2ccc88fd4b refactor: join cache path correctly 2022-02-28 12:58:25 +01:00
Jan De Dobbeleer df8a0fdf6d feat(ansi): allow text decoration chaining
resolves #1818
2022-02-27 07:50:18 +01:00
Jan De Dobbeleer f6d0b9e076 fix(migrate): map .ComputerName to .HostName
relates to #1815
2022-02-26 19:03:19 +01:00
Jan De Dobbeleer d7e289b3bf feat(ansi): add blink, reverse and dimmed
resolves #1813
2022-02-26 11:04:44 +01:00
Jan De Dobbeleer 5842b75158 fix: adjust flag rename correctly 2022-02-25 17:19:39 +01:00
Jan De Dobbeleer 38850141a5 chore(image): display relative url 2022-02-25 17:19:39 +01:00
Jan De Dobbeleer e6fd50a48f feat(init): remote config 2022-02-25 17:19:39 +01:00
Jacek W 882e541b96 feat: cloud foundry target segment 2022-02-22 20:05:40 +01:00
Jan De Dobbeleer 78038aa5aa fix(init): escape path characters
resolves #1789
2022-02-20 16:13:00 +01:00
Jan De Dobbeleer 39dfca93c6 fix(migrate): correctly migrate exit segment 2022-02-20 16:13:00 +01:00
Jan De Dobbeleer dec5691435 feat: secondary prompt 2022-02-20 14:01:04 +01:00
Jan De Dobbeleer cb70ed4b41 feat(pwsh): support PromptText 2022-02-19 19:23:56 +01:00
Jan De Dobbeleer 3d4fc5b6dd chore: remove typo
resolves #1787
2022-02-19 19:23:56 +01:00
Jan De Dobbeleer e62482c56f fix(cmd): return empty on error
resolves #1783
2022-02-19 14:39:26 +01:00
Jan De Dobbeleer 8c8f3e411d refactor: use pointers to segment color 2022-02-19 14:39:26 +01:00
Jan De Dobbeleer 3efb979053 fix(az): fetch path from AZURE_CONFIG_DIR
resolves #1775
2022-02-18 19:56:16 +01:00
Jacek W b10b8dc2f0 feat: cloud foundry segment 2022-02-17 12:58:20 +01:00
Jan De Dobbeleer b4eadff3b6 fix(wsl): split distro name from version
resolves #1766
2022-02-17 12:54:44 +01:00
Jan De Dobbeleer cc1da3f0ea fix: migrate color_background correctly
resolves #1771
2022-02-17 12:54:44 +01:00
Jacek W b47e057f14
feat: UI5 tooling segment 2022-02-14 07:41:33 +00:00
Jan De Dobbeleer 91ebe662bf fix(zsh): do not provide PWD
resolves #1605
2022-02-13 18:59:33 +01:00
Jan De Dobbeleer a0d4fc6cba feat: colorise filler 2022-02-12 18:48:08 +01:00
Jan De Dobbeleer d3d370309f fix: strip ANSI from text before measure
resolves #1744
2022-02-11 20:55:14 +01:00
Jan De Dobbeleer 0a15720c74 chore(go): update dependencies 2022-02-10 20:02:23 +01:00
Jan De Dobbeleer 57d481c9b4 fix: parse error text when silent fail
resolves #1739
2022-02-10 19:48:08 +01:00
Jan De Dobbeleer f6232deaf8 fix: only disable battery in WSL1
resolves #1736
2022-02-09 17:51:09 +01:00
Jan De Dobbeleer b3d9981eec feat(terraform): add version information
resolves #1455
2022-02-09 14:39:50 +01:00
Zhizhen He 0b85aba8d8 fix: fix typo and remove redundant parentheses 2022-02-09 12:19:15 +01:00
Jan De Dobbeleer d1bd686674 feat(path): unique letters style
resolves #1663
2022-02-09 10:46:15 +01:00
Jan De Dobbeleer c7a446c081 fix(windows): safer logic for parsing app exec links 2022-02-08 20:23:57 +01:00
JedWillick 2046dcefeb feat(haskell): add haskell segment 2022-02-08 19:56:30 +01:00
Jan De Dobbeleer 1e797acf77 feat(windows): support store app CLI tools
resolves #1703
2022-02-07 19:01:38 +01:00
lnu 632e495141 fix(battery): disable for WSL
charge_full_design and charge_full does not exists in WSL
2022-02-07 14:51:47 +01:00
Jan De Dobbeleer 8ce47273df feat(cache): only write when dirty 2022-02-06 14:10:41 +01:00
Jan De Dobbeleer 7a60418297 feat(sysinfo): add disks
resolves #1710
2022-02-06 14:10:41 +01:00
Jan De Dobbeleer 4c4b97fa8b fix: provide terminal width from CLI 2022-02-06 11:04:36 +01:00
Jan De Dobbeleer 8f3bfd674b fix(manjaro): read lsb-release
relates to #1696
2022-02-06 11:04:36 +01:00
lnu 5daff6b934 fix: hyperlink regex updated
Issue when detecting and replacing text
2022-02-06 09:49:36 +01:00
Jan De Dobbeleer c34ea9c8f5 fix: exclude link on measure
resolves #1691
2022-02-05 21:41:33 +01:00
Jan De Dobbeleer d94a0db0a9 feat(os): support manjaro linux
resolves #1696
2022-02-05 20:37:48 +01:00
Jan De Dobbeleer 06291e168b fix(migrate): replace .Text with .Meaning
resolves #1697
2022-02-05 09:44:47 +01:00
Jan De Dobbeleer 35aead22fc fix(tooltip): set segment to active
resolves #1701
2022-02-05 09:44:47 +01:00
Jan De Dobbeleer 216541a4f8 refactor(image): count runes in string 2022-02-04 19:42:26 +01:00
Jan De Dobbeleer aba4093aba feat: filler between blocks 2022-02-04 19:42:26 +01:00
Jan De Dobbeleer 04e6579a8e refactor: count length using written text 2022-02-04 19:42:26 +01:00
Chris Donnelly 06e08074fe fix(git): detect when upstream no longer exists
Currently the git segment does not detect when an upstream is removed
(e.g., a PR is merged and the remote branch is deleted).

This change adds functionality to detect when upstream is removed;
if the status reports "branch.upstream" but no "branch.ab", it is gone.

The UI has also been changed to reflect this third state;
it now matches posh-git's behavior, which only shows the Gone icon
if an upstream branch is set but does not report ahead/behind counts.
2022-02-04 19:14:27 +01:00
Jan De Dobbeleer 7dab387a11 fix: migrate console title template
relates to #1678
2022-02-04 09:13:04 +01:00
Jan De Dobbeleer fddee51f70 fix: restore default config 2022-02-03 21:21:10 +01:00
Jan De Dobbeleer e1a7f4e954 fix: populate temp cache before assignment
resolves #1673
2022-02-03 17:49:28 +01:00
Jan De Dobbeleer 696bdda00a feat: support laravel in php
resolves #1171
2022-02-03 12:01:59 +01:00
Jan De Dobbeleer 08f7a6a17e feat: support vue.js in node
resolves #1171
2022-02-03 12:01:59 +01:00
Jan De Dobbeleer e545b32896 fix: add platform to OS on linux
resolves #1639
2022-02-03 12:01:59 +01:00
Jan De Dobbeleer b29ebcd058 chore: provide info for migrated config 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer a9d32a86d4 chore: rename migrations -> migrate 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 0621d0d97a chore: backup original config 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 6b6aec43d5 fix: migrate text correctly 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer a091e5c387 fix: migrate exit segment correctly 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 42f9747558 fix: do not insert color override in existing template 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 566240c0ed fix: do not escape emoji 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer bfca351796 chore: do not auto migrate on manual switch 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 6fcae4207e chore(migrate): backup config on migration 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 0185299263 feat(config): auto migrate to 1 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer a5162b0f19 refactor(segment): cleaner logic 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 55ab413d6e fix: do not render empty/whitespace segments 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 01bd42b3eb fix(config): export glyphs correctly escaped 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 83980a3dff feat: deprecate pre- and postfix 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer b4292e2e50 docs: add template information 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 0373d2c507 feat(config): migrate deprecated keys 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 0e056cd50d feat(template): hyperlink functions 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer e95e0d6b1b fix(engine): allow template override 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer c94e5e6efb chore(template): add tests for roundSeconds 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer eef50268a9 refactor(template): rename files 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer fee29f4b2e refactor: move engine to module 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer c0f4b6d6f0 refactor: move title to module 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 9e7abe4541 refactor: move segments to module 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 4e17e4a853 refactor: public interface for segments 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 59756813d3 refactor: naming standard for segments 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer bdd13cb32f refactor: move properties logic to module 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer c86b7b62bc refactor: move color logic to module 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 906ece2af9 refactor: move environment into it's own module 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer f7a07c6b62 refactor(segments): string() to template()
moves templating engine to Segment
2022-02-03 10:44:18 +01:00
Jan De Dobbeleer 0987cafad0 refactor: remove deprecated functionality 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer f5178e8c8c feat: remove enable_hyperlink 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer b816a0bf70 feat: templates for all segments 2022-02-03 10:44:18 +01:00
Jan De Dobbeleer d75f6e30aa fix: use debug for logging pwd 2022-01-20 14:33:23 +01:00
Jan De Dobbeleer fc456da107 refactor: rename getcwd to pwd 2022-01-20 14:22:29 +01:00
Jan De Dobbeleer 6afa7711b2 feat: log directories on debug
relates to #1605
2022-01-20 14:22:29 +01:00
Jan De Dobbeleer 8fca218a7d feat(build): static build 2022-01-19 19:46:52 +01:00
Michael Guntsche de60367d79 fix(env): remove defer on platform
This is a small fix to actually store the value. Arguments to defers are apparently
evaluated immediately so put it in an anonymous function.
2022-01-19 07:43:08 +01:00
Jan De Dobbeleer ad297dbe08 fix: init cache first 2022-01-18 21:29:05 +01:00
Jan De Dobbeleer 0a09924685 fix(platform): store value in cache
resolves #1601
2022-01-18 21:08:26 +01:00
Jan De Dobbeleer 3cca2104bb feat(cache): allow for non-expiring values 2022-01-18 21:08:26 +01:00
Jan De Dobbeleer e5dd07fb9a feat: cache template environment data 2022-01-18 20:14:47 +01:00
Jan De Dobbeleer 9e77d0f939 fix(template): support surrounding variables with braces 2022-01-18 20:14:47 +01:00
Jan De Dobbeleer e6d4413ae7 feat: adjust var names for consistency
BREAKING CHANGE: adjusts the way some segment work for templates.

Mapping the var names as following will resolve the issue.
- session/title/general purpose
    - .Host -> .HostName
    - .User -> .UserName
- az
    - .UserName -> .Name
- kubectl
    - .UserName -> .User
2022-01-17 16:29:39 +01:00
lnu 115759f4d3 feat(debug): cache path added to debug 2022-01-16 21:21:00 +01:00
Jan De Dobbeleer a56b90005f fix(os): lowercase OS name
resolves #1593
2022-01-16 20:06:38 +01:00
Jan De Dobbeleer 221f28afdd feat(cli): print cache path 2022-01-16 18:22:40 +01:00
Jan De Dobbeleer 0332fbfebb fix: create environ cache on init 2022-01-15 23:25:49 +01:00
Jan De Dobbeleer dc50bd3546 fix(env): init environ cache 2022-01-15 23:08:47 +01:00
Jan De Dobbeleer a200ee73ff feat: add OS to template functionality 2022-01-15 21:38:06 +01:00
Jan De Dobbeleer 0404976b5c refactor: remove the need for nil argument in mock 2022-01-15 21:38:06 +01:00
Jan De Dobbeleer d71422a35b feat(git): add remote URL for hyperlink 2022-01-14 22:50:24 +01:00
Jan De Dobbeleer 2ea2e633b8 fix(az): map User to UserName
avoid collision with default .User in template
2022-01-14 08:51:53 +01:00
Jan De Dobbeleer f1e21949bc fix(cygwin): do not clean config path 2022-01-14 08:42:52 +01:00
Jan De Dobbeleer 4542e92940 fix(az): proper path fix 2022-01-13 22:39:45 +01:00
Jan De Dobbeleer d45c51cccc feat(az): display info origin
resolves #1562
2022-01-13 20:32:32 +01:00
Jan De Dobbeleer b1c427abaa fix(az): use platform specific folder
resolves #1567
2022-01-13 20:32:32 +01:00
Jan De Dobbeleer f512df208a feat: expose environment info to all templates 2022-01-13 20:15:04 +01:00
lnu c687512fba feat(strava): add hyperlink to activity
VirtualRide icon like Ride
Watts, HearRate, Kudos info
2022-01-11 12:15:39 +01:00
Jan De Dobbeleer a36063a580 fix(strava): rename Icon 2022-01-10 22:17:57 +01:00
Lars Erik Finholt d2bf556e94 feat(strava): new segment 2022-01-10 21:44:28 +01:00
Jan De Dobbeleer 88206ff9c9 refactor: rename doGet to HTTPRequest 2022-01-10 21:44:28 +01:00
Sam Debruyn 5a69b3e771 fix: change default az segment template 2022-01-06 20:14:29 +01:00
Jan De Dobbeleer e1f50ef885 refactor: rename environmentInfo 2022-01-01 20:22:52 +01:00
Jan De Dobbeleer 29e019511a refactor: move properties to interface 2022-01-01 20:22:52 +01:00
Jan De Dobbeleer 6d67b147e4 fix(config): do not resolve empty config
relates to https://github.com/JanDeDobbeleer/oh-my-posh/discussions/1518
2021-12-30 22:31:03 +01:00
Jan De Dobbeleer 9b15054378 refactor(main): move simple command up 2021-12-30 22:31:03 +01:00
Laurent Nullens 4960f8a2b7
fix(engine): osc99 support for windows terminal
wsl path conversion not needed anymore
2021-12-30 19:46:50 +01:00
Jan De Dobbeleer 7aaa7b110f fix(config): resolve path for all shells 2021-12-30 15:51:31 +01:00
Jan De Dobbeleer 5549e0d7ad fix(az): add user to exposed model for pwsh 2021-12-30 15:51:31 +01:00
Jan De Dobbeleer ad5c77a61b feat: parse azure config files 2021-12-29 16:58:06 +01:00
Jan De Dobbeleer 4ecf674e62 fix(git): return empty on error 2021-12-29 16:58:06 +01:00
Jan De Dobbeleer e2a907e121 fix(template): do not replace words starting with .Env 2021-12-29 16:58:06 +01:00
Jan De Dobbeleer 5d1cd6209a fix(pwsh): force console to UTF-8 from module 2021-12-27 13:39:43 +01:00
Jan De Dobbeleer 3c40c04d36 feat: deprecate envvar segment
favors text in a more generic way
2021-12-26 19:46:28 +01:00
Khaos ce04362bb4
feat(wifi): read wifi state using native methods 2021-12-26 17:17:44 +01:00
lnu 393f99da93 fix(git): submodules support 2021-12-24 16:13:25 +01:00
Robbert Verbruggen b245398661 feat(ipify): segment to show your external IP address
closes #1492
2021-12-23 15:56:27 +01:00
lnu 77993158e2 fix(git): use the right git executable for WSL
git executable detection
path conversion when needed
2021-12-23 10:48:54 +01:00
Jan De Dobbeleer 62b2a5cb16 fix(pwsh): do not trim paths
resolves #1477
2021-12-22 14:46:51 +01:00
Jan De Dobbeleer d3e638e067 fix(git): use actual path instead of empty -C operator
relates to #1474
2021-12-21 20:35:17 +01:00
Jan De Dobbeleer b400f05555 refactor: undo specific cmd invocation 2021-12-21 20:35:17 +01:00
memcpy-rand-rand-rand 0b4f3e1771 feat(brewfather): unit conversion routines
functions available to template
documentation
tests
2021-12-20 18:42:44 +01:00
Jan De Dobbeleer a88036fc69 perf: avoid InBounds checks 2021-12-18 20:18:54 +01:00
Jan De Dobbeleer 7805ee1a27 feat(path): add template 2021-12-17 22:52:17 +01:00
Jan De Dobbeleer 9edd53e679 fix(kubectl): parse yaml instead of csv
closes #1439
2021-12-17 22:52:17 +01:00
Jan De Dobbeleer 181d906e8a fix(debug): render powerline correctly 2021-12-17 12:22:14 +01:00
Jan De Dobbeleer 2fddfa1716 fix: do not print empty powerline symbol
relates to #1433
2021-12-17 12:22:14 +01:00
Jan De Dobbeleer 9ae5217a97 fix(bash): do not provide pwd
resolves #1441
2021-12-16 20:06:14 +01:00
Jan De Dobbeleer 1282cb24d8 refactor: cleaner segment render logic 2021-12-16 19:57:24 +01:00
Jan De Dobbeleer df78bad3b5 feat: expand parent colors 2021-12-16 19:57:24 +01:00
Jan De Dobbeleer e8f9bb20b0 fix: loop colors correctly 2021-12-16 19:57:24 +01:00
memcpy-rand-rand-rand 89ece8d68a feat(brewfather): new fields, fixes
add batch fields
update doc with new fields and fix ref to .DefaultString
complete schema definition
2021-12-16 16:16:48 +01:00
Jan De Dobbeleer 31d088d56a fix(kubectl): validate array length before indexing values
relates to #1439
2021-12-15 19:26:23 +01:00
Will 0d079a4d8a
feat(brewfather): add segment 2021-12-15 07:49:32 +00:00
Jan De Dobbeleer a595278f5f fix(cygwin): get correct path 2021-12-14 22:11:05 +01:00
Jan De Dobbeleer af112277a8 feat(go): parse go.mod file for version 2021-12-14 09:42:30 +01:00
Jan De Dobbeleer 84e3bea1ea fix(git): include al untracked files
relates to #1422
2021-12-13 17:40:41 +01:00
Jan De Dobbeleer 78f9a3e3c6 fix(git): add untracked to status
resolves #1422
2021-12-13 14:00:28 +01:00
lnu fe3bab8e8a fix(yaml): try int parsing before fallback
json and yaml returns 2 different types
float64 vs int
2021-12-13 13:26:29 +01:00
Jan De Dobbeleer b8e8eddd01
fix: remove map cache 2021-12-13 12:15:04 +01:00
Khaos66 0fb5951375 feat(wakatime): add segment 2021-12-13 11:58:54 +01:00
will 2ccaf90cbf refactor(winreg): make windows registry query function more general
simplify config definition, requires one prop to define path and key
add variant return type
add template-accessible query functions on the segment for advanced use
2021-12-12 20:25:02 +01:00
Khaos 457f439a9f
feat(plastic): add Plastic SCM segment
* feat(plastic): added Plastic SCM segment

* refactor(plastic): polished new Plastic SCM segment

* refactor: moved common scm segment code into base type

git and plastic share some common methods and status properties. So moving them in a base type keeps the code base DRY

* doc(plastic): Added docs for manual testing Plastic SCM

* fix(plastic): Show files with merge conflicts as unmerged

* fix(plastic): adhere to empty string check guidelines

* fix(plastic): fixed linter errors

* fix(pwsh): alert when we can't download dependencies

resolves #1382

* refactor(plastic): polished new Plastic SCM segment

* refactor: moved common scm segment code into base type

git and plastic share some common methods and status properties

* docs(plastic): added docs for manual testing Plastic SCM

* fix(plastic): show files with merge conflicts as unmerged

* fix(plastic): adhere to empty string check guidelines

* fix(plastic): fixed linter errors

Co-authored-by: Jan De Dobbeleer <jan.de.dobbeleer@gmail.com>
Co-authored-by: Jan De Dobbeleer <2492783+JanDeDobbeleer@users.noreply.github.com>
2021-12-11 22:08:47 +01:00
Jan De Dobbeleer d52f917782 feat(path): agnoster left
resolves #1411
2021-12-11 20:40:32 +01:00
Khaos66 403bf12401 refactor: refactored ignoreErr func to return bool value 2021-12-11 14:49:04 +01:00
Khaos66 63b20f7e43 fix(battery): ignore UnknownChareRate error
This error is returned when Windows can't get the charge rate from the battery
2021-12-11 14:49:04 +01:00
Laurent Nullens c67148670c
fix(git): worktree folder init 2021-12-09 15:13:47 +00:00
lnu d3c3dea1d7 feat(language): parameter for version detection
applied to angular segment to read version from package.json
2021-12-09 16:01:10 +01:00
Jan De Dobbeleer d9e642a132
fix(git): initialize status correctly 2021-12-08 14:53:41 +01:00
Jan De Dobbeleer 930fc2bfcc refactor(git): branch status as setter 2021-12-08 13:46:29 +01:00
Jan De Dobbeleer 04f841d1b3 fix(git): initialize status correctly 2021-12-08 13:46:29 +01:00
Jan De Dobbeleer 4294351e6f revert(windows): force the use of .exe
This reverts commit f00f5f9cf7.
Resolves #1387
2021-12-08 13:46:29 +01:00
Jan De Dobbeleer 75eb09e6dc fix(color): do not fail on nil colors
resolves #1388
2021-12-08 13:46:29 +01:00
Jan De Dobbeleer 98472abafc feat(git): better logic 2021-12-08 13:46:29 +01:00
Jan De Dobbeleer 796ec4125d feat(node): templating support
resolves #1253
2021-12-04 13:13:05 +01:00
Jan De Dobbeleer 29afb86e61 feat(python): virtual env in template 2021-12-04 13:13:05 +01:00
Jan De Dobbeleer f495a7093a feat(language): add error text to template properties 2021-12-04 13:13:05 +01:00
Jan De Dobbeleer e866c6bf76 feat(python): add virtual env name to template properties 2021-12-04 13:13:05 +01:00
Jan De Dobbeleer 39a27b29ad refactor(session): deprecate ssh_icon 2021-12-04 13:13:05 +01:00
Jan De Dobbeleer a08a3a9a21 feat(session): refactor for template 2021-12-03 23:50:50 +01:00
Jan De Dobbeleer f00f5f9cf7 fix(windows): force the use of .exe
resolves #1369
2021-12-03 22:01:44 +01:00
Jan De Dobbeleer 3a4e21c36d docs(language): template properties 2021-12-03 22:01:44 +01:00
Jan De Dobbeleer a24786b97d feat(language): expose version info 2021-12-03 20:27:29 +01:00
Jan De Dobbeleer 7b5572e73c fix: create properties when nil
resolves #1366
2021-12-03 12:22:22 +01:00
Jan De Dobbeleer 6b02ae47f7 feat: sign releases with cosign 2021-12-02 22:53:04 +01:00
Jan De Dobbeleer 06258dc256 fix(pwsh): allow powershell 5 init 2021-12-01 19:30:35 +01:00
Jan De Dobbeleer 7fae781fff feat: fish rprompt
resolves #1356
2021-12-01 19:22:11 +01:00
Jan De Dobbeleer 853219d0c5 refactor: rename to test 2021-12-01 18:54:00 +01:00
Jan De Dobbeleer 7b4333ae77 feat: smaller binaries 2021-11-30 21:14:08 +01:00
memcpy-rand-rand-rand d87b147544 feat(winreg): adjust return logic in enabled 2021-11-29 16:22:03 +01:00
will 18570c9cd0 feat(winreg): squashed commits 2021-11-29 16:22:03 +01:00
Jan De Dobbeleer a2be3faefe refactor: display themes function in PowerShell 2021-11-28 15:24:48 +01:00
Jan De Dobbeleer a357becb85 feat: pwsh module as install facilitator 2021-11-28 15:24:48 +01:00
Jan De Dobbeleer 337ed4a155 refactor: align POSH_THEME cross shell 2021-11-27 13:39:40 +01:00
Stefan Hacker 7a73bcff0b feat: enable kubectl segment to read kubeconfig
This extends the kubectl segment to optionally not rely on the
kubectl command and instead to directly parse kubeconfig files like
kubectl does. This is meant as a performance optimization similar
to how the git segment can determine the current branch itself
without calling to git. Especially on Windows and in the presence
other factors slowing process creation like like AntiVirus this
can make shells using the segment considerably more responsive.

The functionality is enabled using the new parse_kubeconfig prop.
It defaults to false to prevent breaking existing users in case
there are any unanticipated behavioral changes.

Additionally the new template properties Cluster and User were
added as they are easily available and helpful in kubectl
setups with more elaborate configuration.
2021-11-26 18:22:40 +01:00
Jan De Dobbeleer 900f5bc672 chore(go): remove unused dependency 2021-11-26 14:25:20 +01:00
Jan De Dobbeleer c30901ba81 chore(go): update dependencies 2021-11-26 14:25:20 +01:00
lnu 435e362256 feat(language): add configurable extensions 2021-11-26 13:09:02 +01:00
Jan De Dobbeleer 09df670e07 refactor: use properties as map type 2021-11-26 11:11:07 +01:00
Jan De Dobbeleer e8a4fa19b7 fix(git): do not use git.exe on WSL 1 2021-11-25 14:28:18 +01:00
Jan De Dobbeleer b94e96dd15 refactor(battery): remove legacy properties 2021-11-25 13:59:36 +01:00
Jan De Dobbeleer fa38b516b1 refactor(battery): use struct inheritance 2021-11-25 13:59:36 +01:00
Jan De Dobbeleer 5b5666b5b0 feat: add go-releaser 2021-11-25 10:58:30 +01:00
Jan De Dobbeleer 4cbb3e6cf3 fix(winreg): fallback value on error or empty 2021-11-25 09:31:18 +01:00
Jan De Dobbeleer 30c82c2f56 chore(nightscout): add all object properties 2021-11-25 09:00:59 +01:00
Jan De Dobbeleer 1075b82e10 fix(nightscape): do not fail on empty array 2021-11-25 09:00:59 +01:00
Jan De Dobbeleer 30ea89a45b refactor: inherit struct 2021-11-24 14:28:32 +01:00
Jan De Dobbeleer 17751107a8 feat(windows): registry query segment 2021-11-24 14:24:02 +01:00
Mike Sigsworth 4a68c444c6 feat(wifi): added wifi segment for windows and wsl 2021-11-24 11:31:43 +01:00
Scott Hanselman fd81f4a00c feat: nightscout segment 2021-11-24 11:05:06 +01:00
Jan De Dobbeleer c5fb63885f refactor(cache): add correct unit indication 2021-11-23 11:17:37 +01:00
Jan De Dobbeleer ea35416363 fix(palette): create AnsiColors on plain block init 2021-11-22 22:08:21 +01:00
Yehor Borkov 9ecd7c09a4
feat(palette): a map of named color values
introducing a map of named standard color
values that can be referenced in theme segments
2021-11-22 15:25:56 +01:00
Laurent Nullens a71d1f7454
feat(terraform): use template 2021-11-20 10:14:26 +00:00
lnu 25be370618 feat(sysinfo): sysinfo segment
cpu, mem, load, ...
2021-11-19 13:44:00 +01:00
Jan De Dobbeleer 2c1d5cf6e4 fix(cmd): allow all types of path separators 2021-11-19 08:52:38 +01:00
Jan De Dobbeleer 79c5ad845f feat(cmd): transient prompt 2021-11-19 00:08:17 +01:00
Jan De Dobbeleer 5ddb0d8896 feat(cmd): add tooltip functionality 2021-11-19 00:08:17 +01:00
Ted Ballou bcdfb8180b
feat(git): add symbol to the branch name when truncating 2021-11-18 19:58:57 +01:00
Jan De Dobbeleer 14bd8b0f29 chore: show total duration in debug 2021-11-17 08:29:17 +01:00
Jan De Dobbeleer 4f39b68d96 refactor: remove trace struct 2021-11-17 07:19:43 +01:00
Jan De Dobbeleer e0513e95b0 refactor: provide log output directly on debug 2021-11-17 07:19:43 +01:00
Jan De Dobbeleer 8837c127ed chore: ask debug log for bug report 2021-11-17 07:19:43 +01:00
Jan De Dobbeleer b1b7576a90 chore: show version and log on debug 2021-11-17 07:19:43 +01:00
Jan De Dobbeleer 10d8f5a013 fix: use reference colors in transient prompt 2021-11-16 00:31:06 +01:00
Jan De Dobbeleer 290b1a3d8c fix(envvar): use template for string value 2021-11-15 13:28:53 +01:00
Jan De Dobbeleer 6eb9a2e492 fix(image): remove braille blank before export 2021-11-15 13:12:18 +01:00
Jan De Dobbeleer f850f3b805 feat(exit): add template properties 2021-11-15 11:39:34 +01:00
Jan De Dobbeleer f5aeed466e feat(executiontime): add template properties 2021-11-15 11:39:34 +01:00
Jan De Dobbeleer 2040771190 feat(env): add template properties 2021-11-15 11:39:34 +01:00
Mansur c1bc4404e0
fix: node segment enable_version_mismatch 2021-11-15 10:35:45 +00:00
Jan De Dobbeleer 2a44dca898
fix(cmd): only call supported lua functions 2021-11-13 21:24:52 +01:00
Jan De Dobbeleer b3371136c7 feat(cmd): support Windows CMD 2021-11-13 19:41:42 +01:00
Jan De Dobbeleer 1d192d63d8 feat: render rprompt separately 2021-11-13 19:41:42 +01:00
Laurent Nullens 2733865edf
fix(git): read real worktree folder from gitdir 2021-11-12 07:59:03 +00:00
Jan De Dobbeleer 18a3b82dd1 fix: add stack trace when errors happen in segments
relates to #1182
2021-11-12 08:42:28 +01:00
Jan De Dobbeleer ae9fb25db6 revert: fetch info from the working directory
This reverts commit cb17bb914a.
2021-11-11 08:48:45 +01:00
Jan De Dobbeleer 1866adfb88 fix: feed PWD to cli for init
relates to #1207
2021-11-10 20:45:27 +01:00
Jan De Dobbeleer d3ab141cd5 fix: set active colors in debug 2021-11-10 20:15:28 +01:00
Jan De Dobbeleer 2d3b6e4e23 fix(java): support Zulu builds
resolves #1202
2021-11-10 20:15:28 +01:00
Jan De Dobbeleer 274f800ae2 chore: better logging for command output 2021-11-10 20:15:28 +01:00
Jan De Dobbeleer 35e0a6d42c fix(az): allow color templates 2021-11-09 19:57:05 +01:00
Jan De Dobbeleer 2d25c59c00 fix(git): remove Repo struct 2021-11-09 17:16:37 +01:00
Jan De Dobbeleer cb17bb914a fix: fetch info from the working directory 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer bf16671587 refactor(git): add upstream icons 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer 114cda474a fix(git): fetch detailed information when enabled 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer d1ff9a96ce refactor: deprecate display_branch_status 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer 0fbc8910bd chore: adjust powerline symbol to glyph 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer ef3b620513 docs(git): correct property definitions 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer 1402dcbcfe refactor(git): rename properties to fetch 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer 42f18697fd refactor(git): move deprecated functions 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer 3f8400e8f1 refactor(git): add branch status to template 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer 4dbed1176c refactor(git): add upstream icon to repo 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer f8fa3ae8af refactor(git): allow status in template 2021-11-09 13:26:59 +01:00
Jan De Dobbeleer 64b63be4d2 refactor(git): add template capabilities 2021-11-09 13:26:59 +01:00
Laurent Nullens 93afdca084
feat(dotnet): template + semver regex 2021-11-07 18:55:22 +00:00
Jan De Dobbeleer 9323f89704 feat(color): allow override from parent
BREAKING CHANGE: this removes the inherit keyword used in color
overrides. Migration from inherit to parentBackground or
parentForeground is needed to stay compatible.
2021-11-06 13:29:31 +01:00
George Schizas a01f4faa1e fix(windows): consistent casing for drive and only drive letters
resolves #1173
2021-11-05 19:33:54 +01:00
Jan De Dobbeleer 8b20d8fd81 feat: plain text prompt
resolves #1142
2021-11-05 09:09:17 +01:00
Jan De Dobbeleer aa94042bd5 refactor: rename prompt writer 2021-11-05 09:09:17 +01:00
lnu 67ce40e7d7 feat(owm): add template support 2021-11-03 11:07:36 +02:00
Aaron Sherber 97774fe66b fix(pwsh): fix remove-variable statements 2021-11-02 08:13:22 +02:00
Jan De Dobbeleer d328c81932 fix(pwsh): rename general variables
resolves #1148
2021-11-01 23:57:25 +02:00
Jan De Dobbeleer 3a1cbb904c fix: clear parent colors after block rendering
relates to #1137
2021-10-30 11:48:31 +02:00
lnu 1b29ae136d fix: wrong background for powerline in some cases
activeBackground color is wrong when a diamong segment follows a
powerline segment.
2021-10-29 19:00:44 +02:00
Jan De Dobbeleer 3c3da5e9df chore(pwsh): warm user we're unable to set the console to UTF-8
relates to #1100
2021-10-28 11:42:37 +02:00
Jan De Dobbeleer dbee7edde7 fix(pwsh): set env vars in restricted mode
resolves #1100
2021-10-28 11:42:37 +02:00
lnu 9f80243b1e feat(php): extensions added + doc updated 2021-10-27 18:22:23 +02:00
lnu 42aac1fbf4 feat: php language segment 2021-10-27 12:57:15 +02:00
Jan De Dobbeleer 8702098032 fix(azfunc): ignore newline in version
resolves #1108
2021-10-26 20:56:19 +02:00
Jan De Dobbeleer d84b92ef13 feat(colors): current color override
relates to #1099
2021-10-25 19:28:08 +02:00
Jan De Dobbeleer 7e5b9fa725 feat(python): default to home enabled and environment
resolves #1104
2021-10-24 19:07:29 +02:00
Jan De Dobbeleer eca24bebcc fix: inherit Transparent when no parent 2021-10-24 19:07:29 +02:00
Jan De Dobbeleer 631aace7a8 fix(git): cache command on windows 2021-10-20 22:27:07 +02:00
Jan De Dobbeleer cdc2998ed8 feat(git): ignore repo based on exclude_folders 2021-10-20 17:12:29 +02:00
Jan De Dobbeleer a30cbf95c0 chore: update dependencies 2021-10-20 14:07:26 +02:00
Jan De Dobbeleer 94b743c43d feat: environment error logging
relates to #1085
2021-10-20 13:17:10 +02:00
Jan De Dobbeleer 7e9247b56e fix(bash): ignore null byte in input
resolves #1083
2021-10-19 21:11:29 +02:00
Thomas Adams f08c283105 feat: angular cli segment 2021-10-17 13:30:55 +02:00
Alex da1bb46a94 fix(path): correctly handle replaced paths for letter style 2021-10-17 13:06:16 +02:00
Laurent Nullens e3c069e5e6 feat(dotnet): display segment extensions updated
display segment when global.json exists
2021-10-13 17:05:46 +02:00
bewing b8d3f5781c
fix(wsl): spotify support
If we are in a WSL environment and tasklist.exe is in our PATH, leverage
it to scan for the Spotify.exe window title. Add unit tests and a new
mock for env.isWSL
2021-10-11 09:02:51 +02:00
Jan De Dobbeleer f64a8fa51a fix: escape path with spaces for config file 2021-10-11 07:02:20 +02:00
Jan De Dobbeleer 609a534d73 fix: escape executable path on zsh and bash
resolves #1031
2021-10-10 09:33:45 +02:00
Jan De Dobbeleer d0816773a5 fix(text): disable when text resolves to empty 2021-10-06 21:55:40 +02:00
Jan De Dobbeleer 1cff56a709 refactor: do not write empty cache list 2021-10-03 10:47:44 +02:00
Jan De Dobbeleer a118e178b5 feat(cache): set cache directory correctly
resolves #1017
2021-10-03 10:47:44 +02:00
Jan De Dobbeleer 1f3127cdb1 fix(fish): cache status code
resolves #1013
2021-10-03 07:01:49 +02:00
lnu f67ee8e609 fix(path): display root path icon when using agnoster 2021-09-30 12:18:49 +02:00
Jan De Dobbeleer 44b970fc02 chore: remove comments 2021-09-28 20:23:44 +02:00
Jan De Dobbeleer 36c318a02a fix: set correct color for diamonds on inheritance 2021-09-28 20:23:44 +02:00
Jan De Dobbeleer 3d4b3c891c fix: do not print invisible text 2021-09-28 20:23:44 +02:00
lnu 4bf820b10f fix: set shell in Export-PoshImage
When the shell is not set, some ansi characters are added at the end of the prompt

fix #980
2021-09-26 09:46:01 +02:00
Jan De Dobbeleer 0bbc26d635 fix: inherit parent colors in override 2021-09-25 20:52:20 +02:00
Jan De Dobbeleer b3f537cb76 refactor: color logic performance 2021-09-25 11:25:04 +02:00
Jan De Dobbeleer 0e26aa2ace feat: inherit colors between segments 2021-09-24 19:41:11 +02:00
lnu 95f776a8ed fix(owm): cache also the url used to get the data
The url is used after do generate the hyperlink
2021-09-24 14:51:12 +02:00
Jan De Dobbeleer 57174b6424 refactor(owm): rename properties 2021-09-24 08:06:20 +02:00
Jan De Dobbeleer aa5a235953 fix(pwsh): validate correct AZ context object 2021-09-24 08:06:20 +02:00
lnu ba71a4a16d fix: cache_timeout mismatch + variable naming + schema.json 2021-09-24 07:32:57 +02:00
lnu 6097d2d357 feat(owm): response caching added
default timeout of 10 minutes. A value of 0 disables the cache.
Original concept by boarder2
2021-09-24 07:32:57 +02:00
Jan De Dobbeleer e846f2b683 chore: add mocked cache 2021-09-23 23:03:46 +02:00
Jan De Dobbeleer 7738cad7cb feat(cache): add timestamp 2021-09-23 23:03:46 +02:00
Jan De Dobbeleer 7d2001c936 feat: cache capabilities 2021-09-23 23:03:46 +02:00
Jan De Dobbeleer 8d35689170 refactor: split concurrent map from cache implementation 2021-09-23 23:03:46 +02:00
Nick Craver 4bcef332a5
fix: os fonts in theme renders
There's a bug in the wiki ranges that I noticed in the
final Ubuntu renders cutting off the Ubuntu logo,
this should resolve it.

Issue filed on nerd fonts to fix the wiki here: 
ryanoasis/nerd-fonts#667
2021-09-21 20:11:38 +02:00
Aaron Sherber 7e4865779a feat: flexible matching for include/exclude folders 2021-09-21 06:31:50 +02:00
Jan De Dobbeleer b2515650c1 fix(battery): map battery behavior before returning 2021-09-20 07:19:01 +02:00
Aaron Sherber 5db251ce53
feat(path): flexible matching for mapped-locations 2021-09-18 22:03:00 +02:00
Jan De Dobbeleer e1be81e658 fix(battery): skip nil value batteries 2021-09-18 20:09:11 +02:00
Jan De Dobbeleer 3f2b89f475 fix(windows): get console width correctly 2021-09-18 20:03:02 +02:00
Nick Craver e27d34a1cb
feat: improved theme png rendering
* feat: improved theme png rendering

Overall this improves glyph rendering in the theme PNGs for docs.
Changes:
- Replaces VictorMono with latest Hack nerd font
- When calculating overall width, count glyphs as double wide
- When rendering a glyph, allow ~1.7x space (this seemed right testing many)

I hope this is a net improvement that helps theme renders be a bit more accurate and shine!

* move to 2x for overall width expansion

1.7 introduces some odd offset problems with some backgrounds - 2x is stable.

* Based on data from:
https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points
...checking those points for nerd font glyphs in play

I'm unfamiliar with Go here and maybe there's a better way to implement,
but the results are much improved.

* tweak ranges and bg position for font diff

* exclude pixelated (e0c4-e0c7) from doube-width

* simplify cyclomatic complexity

Go checks were unhappy - this isn't a hot path so breaking it out
into a format that matches the docs, for easier maintenance.

* I have no idea what I'm doing

...but I hope this works - bit simpler layout to maintain too.

* fix: add comments

Good PR feedback - adding some more commentary for anyone coming across these bits later

* typo
2021-09-18 15:37:15 +02:00
Jan De Dobbeleer 2ed5d31f4f
feat(az): use template for more flexibility
BREAKING CHANGE: this makes it so people have to remove the switches
in favor of the new template.
2021-09-18 13:21:28 +02:00
Aaron Sherber f412ef6644
feat: allow for custom text in place of shell names 2021-09-17 19:48:00 +00:00
Nick Craver bf51f59ceb
feat: image background color 2021-09-17 20:34:43 +02:00
Jan De Dobbeleer 6bef088b83 feat: allow auto hiding of rprompt on Windows 2021-09-17 09:40:12 +02:00
lnu cb9a090ec7 feat(battery): display_charged parameter added
display_charging splitted to two parameters instead of a single one

BREAKING CHANGE: from now display_charging will handle the charging
                 status only.
2021-09-16 20:17:41 +02:00
Jan De Dobbeleer 86b3e1cc62
fix(bash): remove leading space
relates to #953
2021-09-14 19:54:09 +02:00
Jan De Dobbeleer f7de8aed27 fix: support for windows arm64 2021-09-14 18:49:29 +02:00
Aaron Sherber 3ecdffd86c fix: recognize tag and commit merges 2021-09-14 07:10:13 +02:00
Aaron Sherber 18dcf4be21 fix: recognize remote branch merge 2021-09-13 17:46:49 +02:00
Jan De Dobbeleer fb1c704d14 refactor: adjust build directives for go 1.17 2021-09-09 20:15:43 +02:00
Jan De Dobbeleer 78d0a42556 fix(transient): do not run when no config 2021-09-09 20:15:43 +02:00
Jan De Dobbeleer 13cb9a6a58 fix: correct error printing for eval 2021-09-09 20:15:43 +02:00
Jan0660 ffad394a4f feat(memory): add use_available and memory_type 2021-09-04 23:23:38 +02:00
Jan De Dobbeleer 4305b3ad51 feat: support pnpm
resolves #926
2021-09-04 20:46:50 +02:00
Laurent Nullens bb246377ce
feat(git): display worktree count
resolves #913
2021-09-04 18:32:55 +00:00
Jan0660 75c357a7f0 fix(memory): improve code readability 2021-09-03 22:49:56 +02:00
Jan0660 daf91dc85a feat: memory segment 2021-09-03 22:49:56 +02:00
Jan De Dobbeleer 7fd3091187 chore: update go dependencies 2021-09-01 13:48:21 +02:00
Jan De Dobbeleer d16bade426 feat: update to go 1.17 2021-09-01 13:48:21 +02:00
Jan De Dobbeleer e6bc625564 fix(bash): quote the timer path
resolves #914
2021-09-01 13:48:21 +02:00