1 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
2 |
DENIED
|
moderate
|
App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
} |
|
Show voter details
|
3 |
DENIED
|
edit
|
App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
} |
|
Show voter details
|
4 |
DENIED
|
moderate
|
App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
} |
|
Show voter details
|
5 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
6 |
DENIED
|
moderate
|
App\Entity\EntryComment {#3998
+user: App\Entity\User {#3946 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I got different colors for Kubernetes clusters. Like green for testing cluster, yellow for development and red for production. Always taking a Quick Look before I do something"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700812914 {#4008
date: 2023-11-24 09:01:54.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#3996 …}
+nested: Doctrine\ORM\PersistentCollection {#3994 …}
+votes: Doctrine\ORM\PersistentCollection {#3992 …}
+reports: Doctrine\ORM\PersistentCollection {#3990 …}
+favourites: Doctrine\ORM\PersistentCollection {#3958 …}
+notifications: Doctrine\ORM\PersistentCollection {#3962 …}
-id: 106096
-bodyTs: "'alway':20 'cluster':7,12 'color':4 'develop':15 'differ':3 'got':2 'green':9 'kubernet':6 'like':8 'look':24 'product':19 'quick':23 'red':17 'someth':28 'take':21 'test':11 'yellow':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4671325"
+editedAt: null
+createdAt: DateTimeImmutable @1699577775 {#3944
date: 2023-11-10 01:56:15.0 +01:00
}
} |
|
Show voter details
|
7 |
DENIED
|
edit
|
App\Entity\EntryComment {#3998
+user: App\Entity\User {#3946 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I got different colors for Kubernetes clusters. Like green for testing cluster, yellow for development and red for production. Always taking a Quick Look before I do something"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700812914 {#4008
date: 2023-11-24 09:01:54.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#3996 …}
+nested: Doctrine\ORM\PersistentCollection {#3994 …}
+votes: Doctrine\ORM\PersistentCollection {#3992 …}
+reports: Doctrine\ORM\PersistentCollection {#3990 …}
+favourites: Doctrine\ORM\PersistentCollection {#3958 …}
+notifications: Doctrine\ORM\PersistentCollection {#3962 …}
-id: 106096
-bodyTs: "'alway':20 'cluster':7,12 'color':4 'develop':15 'differ':3 'got':2 'green':9 'kubernet':6 'like':8 'look':24 'product':19 'quick':23 'red':17 'someth':28 'take':21 'test':11 'yellow':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4671325"
+editedAt: null
+createdAt: DateTimeImmutable @1699577775 {#3944
date: 2023-11-10 01:56:15.0 +01:00
}
} |
|
Show voter details
|
8 |
DENIED
|
moderate
|
App\Entity\EntryComment {#3998
+user: App\Entity\User {#3946 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I got different colors for Kubernetes clusters. Like green for testing cluster, yellow for development and red for production. Always taking a Quick Look before I do something"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700812914 {#4008
date: 2023-11-24 09:01:54.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#3996 …}
+nested: Doctrine\ORM\PersistentCollection {#3994 …}
+votes: Doctrine\ORM\PersistentCollection {#3992 …}
+reports: Doctrine\ORM\PersistentCollection {#3990 …}
+favourites: Doctrine\ORM\PersistentCollection {#3958 …}
+notifications: Doctrine\ORM\PersistentCollection {#3962 …}
-id: 106096
-bodyTs: "'alway':20 'cluster':7,12 'color':4 'develop':15 'differ':3 'got':2 'green':9 'kubernet':6 'like':8 'look':24 'product':19 'quick':23 'red':17 'someth':28 'take':21 'test':11 'yellow':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4671325"
+editedAt: null
+createdAt: DateTimeImmutable @1699577775 {#3944
date: 2023-11-10 01:56:15.0 +01:00
}
} |
|
Show voter details
|
9 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
10 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4035
+user: App\Entity\User {#4017 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Step 1. Install fish shell\n
\n
Step 2. Type fish_config\n
\n
Step 3. Profit
"""
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700033617 {#4040
date: 2023-11-15 08:33:37.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4032 …}
+nested: Doctrine\ORM\PersistentCollection {#4030 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4023 …}
+favourites: Doctrine\ORM\PersistentCollection {#4021 …}
+notifications: Doctrine\ORM\PersistentCollection {#4019 …}
-id: 126344
-bodyTs: "'1':2 '2':7 '3':12 'config':10 'fish':4,9 'instal':3 'profit':13 'shell':5 'step':1,6,11 'type':8"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5327298"
+editedAt: DateTimeImmutable @1700284392 {#4041
date: 2023-11-18 06:13:12.0 +01:00
}
+createdAt: DateTimeImmutable @1700033617 {#4038
date: 2023-11-15 08:33:37.0 +01:00
}
} |
|
Show voter details
|
11 |
DENIED
|
edit
|
App\Entity\EntryComment {#4035
+user: App\Entity\User {#4017 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Step 1. Install fish shell\n
\n
Step 2. Type fish_config\n
\n
Step 3. Profit
"""
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700033617 {#4040
date: 2023-11-15 08:33:37.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4032 …}
+nested: Doctrine\ORM\PersistentCollection {#4030 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4023 …}
+favourites: Doctrine\ORM\PersistentCollection {#4021 …}
+notifications: Doctrine\ORM\PersistentCollection {#4019 …}
-id: 126344
-bodyTs: "'1':2 '2':7 '3':12 'config':10 'fish':4,9 'instal':3 'profit':13 'shell':5 'step':1,6,11 'type':8"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5327298"
+editedAt: DateTimeImmutable @1700284392 {#4041
date: 2023-11-18 06:13:12.0 +01:00
}
+createdAt: DateTimeImmutable @1700033617 {#4038
date: 2023-11-15 08:33:37.0 +01:00
}
} |
|
Show voter details
|
12 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4035
+user: App\Entity\User {#4017 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Step 1. Install fish shell\n
\n
Step 2. Type fish_config\n
\n
Step 3. Profit
"""
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700033617 {#4040
date: 2023-11-15 08:33:37.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4032 …}
+nested: Doctrine\ORM\PersistentCollection {#4030 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4023 …}
+favourites: Doctrine\ORM\PersistentCollection {#4021 …}
+notifications: Doctrine\ORM\PersistentCollection {#4019 …}
-id: 126344
-bodyTs: "'1':2 '2':7 '3':12 'config':10 'fish':4,9 'instal':3 'profit':13 'shell':5 'step':1,6,11 'type':8"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5327298"
+editedAt: DateTimeImmutable @1700284392 {#4041
date: 2023-11-18 06:13:12.0 +01:00
}
+createdAt: DateTimeImmutable @1700033617 {#4038
date: 2023-11-15 08:33:37.0 +01:00
}
} |
|
Show voter details
|
13 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
14 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4120
+user: App\Entity\User {#4133 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
A person in this thread already recommended having different colors for different conditions like ssh and running as root, I havent seen anyone mention this specifically but you can determine if the current working directory is writable with something like `[ -w “$(pwd)” ]` and set the color to red or print a symbol if it doesnt return true.\n
\n
Also I recommend putting all the code and logic for your shell prompt in a shell function, and using a substitution shell to put it into the PS1 variable like this:\n
\n
```\n
\n
<span style="color:#323232;">__shellprompt ()\n
</span><span style="color:#323232;">{\n
</span><span style="color:#323232;">\tif [ "$(id -u)" = 0 ]; then\n
</span><span style="color:#323232;">\t\tlocal PROMPT_EMBLEM='#'\n
</span><span style="color:#323232;">\telse\n
</span><span style="color:#323232;">\t\tlocal PROMPT_EMBLEM='$'\n
</span><span style="color:#323232;">\tfi\n
</span><span style="color:#323232;">\tprintf "%s" "$(whoami)@$(uname -n):$(pwd)"\n
</span><span style="color:#323232;">\tprintf "n%c " "$PROMPT_EMBLEM"\n
</span><span style="color:#323232;">}\n
</span><span style="color:#323232;">PS1='$(__shellprompt)'\n
</span>\n
```\n
\n
Now this is just a really barebones example, there is a whole lot more you can do like passing in the last exit code through the argv of your shellprompt function like this `PS1=‘$(__shellprompt $?)’` and like print it out if its non-zero so you wont have to like `echo $?` to see if the last command failed, but you should be able to still do this. In my testing, running the shell prompt function in the subsitiution shell didnt effect the $? variable.\n
\n
In my first comment on another thread about shell prompts, I posted my full shellprompt, it is slightly outdated (I just changed `hostname` to `uname -n`), if you cant find it feel free to send a message or just ask, and I will send you the code.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699929949 {#4115
date: 2023-11-14 03:45:49.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4121 …}
+nested: Doctrine\ORM\PersistentCollection {#4123 …}
+votes: Doctrine\ORM\PersistentCollection {#4125 …}
+reports: Doctrine\ORM\PersistentCollection {#4127 …}
+favourites: Doctrine\ORM\PersistentCollection {#4129 …}
+notifications: Doctrine\ORM\PersistentCollection {#4131 …}
-id: 107768
-bodyTs: "'0':93 'abl':179 'alreadi':6 'also':58 'anoth':205 'anyon':23 'argv':142 'ask':239 'barebon':122 'c':111 'cant':228 'chang':221 'code':64,139,246 'color':10,46 'command':173 'comment':203 'condit':13 'current':33 'determin':30 'didnt':196 'differ':9,12 'directori':35 'doesnt':55 'echo':167 'effect':197 'els':98 'emblem':97,101,113 'exampl':123 'exit':138 'fail':174 'feel':231 'fi':102 'find':229 'first':202 'free':232 'full':213 'function':74,146,191 'havent':21 'hostnam':222 'id':91 'last':137,172 'like':14,40,87,133,147,152,166 'local':95,99 'logic':66 'lot':128 'mention':24 'messag':236 'n':107,110,225 'non':159 'non-zero':158 'outdat':218 'pass':134 'person':2 'post':211 'print':50,153 'printf':103,109 'prompt':70,96,100,112,190,209 'ps1':85,114,149 'put':61,81 'pwd':42,108 'realli':121 'recommend':7,60 'red':48 'return':56 'root':19 'run':17,187 'see':169 'seen':22 'send':234,243 'set':44 'shell':69,73,79,189,195,208 'shellprompt':89,115,145,150,214 'slight':217 'someth':39 'specif':26 'ssh':15 'still':181 'subsitiut':194 'substitut':78 'symbol':52 'test':186 'thread':5,206 'true':57 'u':92 'unam':106,224 'use':76 'variabl':86,199 'w':41 'whoami':105 'whole':127 'wont':163 'work':34 'writabl':37 'zero':160"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.blahaj.zone/comment/4253531"
+editedAt: null
+createdAt: DateTimeImmutable @1699627856 {#4116
date: 2023-11-10 15:50:56.0 +01:00
}
} |
|
Show voter details
|
15 |
DENIED
|
edit
|
App\Entity\EntryComment {#4120
+user: App\Entity\User {#4133 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
A person in this thread already recommended having different colors for different conditions like ssh and running as root, I havent seen anyone mention this specifically but you can determine if the current working directory is writable with something like `[ -w “$(pwd)” ]` and set the color to red or print a symbol if it doesnt return true.\n
\n
Also I recommend putting all the code and logic for your shell prompt in a shell function, and using a substitution shell to put it into the PS1 variable like this:\n
\n
```\n
\n
<span style="color:#323232;">__shellprompt ()\n
</span><span style="color:#323232;">{\n
</span><span style="color:#323232;">\tif [ "$(id -u)" = 0 ]; then\n
</span><span style="color:#323232;">\t\tlocal PROMPT_EMBLEM='#'\n
</span><span style="color:#323232;">\telse\n
</span><span style="color:#323232;">\t\tlocal PROMPT_EMBLEM='$'\n
</span><span style="color:#323232;">\tfi\n
</span><span style="color:#323232;">\tprintf "%s" "$(whoami)@$(uname -n):$(pwd)"\n
</span><span style="color:#323232;">\tprintf "n%c " "$PROMPT_EMBLEM"\n
</span><span style="color:#323232;">}\n
</span><span style="color:#323232;">PS1='$(__shellprompt)'\n
</span>\n
```\n
\n
Now this is just a really barebones example, there is a whole lot more you can do like passing in the last exit code through the argv of your shellprompt function like this `PS1=‘$(__shellprompt $?)’` and like print it out if its non-zero so you wont have to like `echo $?` to see if the last command failed, but you should be able to still do this. In my testing, running the shell prompt function in the subsitiution shell didnt effect the $? variable.\n
\n
In my first comment on another thread about shell prompts, I posted my full shellprompt, it is slightly outdated (I just changed `hostname` to `uname -n`), if you cant find it feel free to send a message or just ask, and I will send you the code.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699929949 {#4115
date: 2023-11-14 03:45:49.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4121 …}
+nested: Doctrine\ORM\PersistentCollection {#4123 …}
+votes: Doctrine\ORM\PersistentCollection {#4125 …}
+reports: Doctrine\ORM\PersistentCollection {#4127 …}
+favourites: Doctrine\ORM\PersistentCollection {#4129 …}
+notifications: Doctrine\ORM\PersistentCollection {#4131 …}
-id: 107768
-bodyTs: "'0':93 'abl':179 'alreadi':6 'also':58 'anoth':205 'anyon':23 'argv':142 'ask':239 'barebon':122 'c':111 'cant':228 'chang':221 'code':64,139,246 'color':10,46 'command':173 'comment':203 'condit':13 'current':33 'determin':30 'didnt':196 'differ':9,12 'directori':35 'doesnt':55 'echo':167 'effect':197 'els':98 'emblem':97,101,113 'exampl':123 'exit':138 'fail':174 'feel':231 'fi':102 'find':229 'first':202 'free':232 'full':213 'function':74,146,191 'havent':21 'hostnam':222 'id':91 'last':137,172 'like':14,40,87,133,147,152,166 'local':95,99 'logic':66 'lot':128 'mention':24 'messag':236 'n':107,110,225 'non':159 'non-zero':158 'outdat':218 'pass':134 'person':2 'post':211 'print':50,153 'printf':103,109 'prompt':70,96,100,112,190,209 'ps1':85,114,149 'put':61,81 'pwd':42,108 'realli':121 'recommend':7,60 'red':48 'return':56 'root':19 'run':17,187 'see':169 'seen':22 'send':234,243 'set':44 'shell':69,73,79,189,195,208 'shellprompt':89,115,145,150,214 'slight':217 'someth':39 'specif':26 'ssh':15 'still':181 'subsitiut':194 'substitut':78 'symbol':52 'test':186 'thread':5,206 'true':57 'u':92 'unam':106,224 'use':76 'variabl':86,199 'w':41 'whoami':105 'whole':127 'wont':163 'work':34 'writabl':37 'zero':160"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.blahaj.zone/comment/4253531"
+editedAt: null
+createdAt: DateTimeImmutable @1699627856 {#4116
date: 2023-11-10 15:50:56.0 +01:00
}
} |
|
Show voter details
|
16 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4120
+user: App\Entity\User {#4133 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
A person in this thread already recommended having different colors for different conditions like ssh and running as root, I havent seen anyone mention this specifically but you can determine if the current working directory is writable with something like `[ -w “$(pwd)” ]` and set the color to red or print a symbol if it doesnt return true.\n
\n
Also I recommend putting all the code and logic for your shell prompt in a shell function, and using a substitution shell to put it into the PS1 variable like this:\n
\n
```\n
\n
<span style="color:#323232;">__shellprompt ()\n
</span><span style="color:#323232;">{\n
</span><span style="color:#323232;">\tif [ "$(id -u)" = 0 ]; then\n
</span><span style="color:#323232;">\t\tlocal PROMPT_EMBLEM='#'\n
</span><span style="color:#323232;">\telse\n
</span><span style="color:#323232;">\t\tlocal PROMPT_EMBLEM='$'\n
</span><span style="color:#323232;">\tfi\n
</span><span style="color:#323232;">\tprintf "%s" "$(whoami)@$(uname -n):$(pwd)"\n
</span><span style="color:#323232;">\tprintf "n%c " "$PROMPT_EMBLEM"\n
</span><span style="color:#323232;">}\n
</span><span style="color:#323232;">PS1='$(__shellprompt)'\n
</span>\n
```\n
\n
Now this is just a really barebones example, there is a whole lot more you can do like passing in the last exit code through the argv of your shellprompt function like this `PS1=‘$(__shellprompt $?)’` and like print it out if its non-zero so you wont have to like `echo $?` to see if the last command failed, but you should be able to still do this. In my testing, running the shell prompt function in the subsitiution shell didnt effect the $? variable.\n
\n
In my first comment on another thread about shell prompts, I posted my full shellprompt, it is slightly outdated (I just changed `hostname` to `uname -n`), if you cant find it feel free to send a message or just ask, and I will send you the code.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699929949 {#4115
date: 2023-11-14 03:45:49.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4121 …}
+nested: Doctrine\ORM\PersistentCollection {#4123 …}
+votes: Doctrine\ORM\PersistentCollection {#4125 …}
+reports: Doctrine\ORM\PersistentCollection {#4127 …}
+favourites: Doctrine\ORM\PersistentCollection {#4129 …}
+notifications: Doctrine\ORM\PersistentCollection {#4131 …}
-id: 107768
-bodyTs: "'0':93 'abl':179 'alreadi':6 'also':58 'anoth':205 'anyon':23 'argv':142 'ask':239 'barebon':122 'c':111 'cant':228 'chang':221 'code':64,139,246 'color':10,46 'command':173 'comment':203 'condit':13 'current':33 'determin':30 'didnt':196 'differ':9,12 'directori':35 'doesnt':55 'echo':167 'effect':197 'els':98 'emblem':97,101,113 'exampl':123 'exit':138 'fail':174 'feel':231 'fi':102 'find':229 'first':202 'free':232 'full':213 'function':74,146,191 'havent':21 'hostnam':222 'id':91 'last':137,172 'like':14,40,87,133,147,152,166 'local':95,99 'logic':66 'lot':128 'mention':24 'messag':236 'n':107,110,225 'non':159 'non-zero':158 'outdat':218 'pass':134 'person':2 'post':211 'print':50,153 'printf':103,109 'prompt':70,96,100,112,190,209 'ps1':85,114,149 'put':61,81 'pwd':42,108 'realli':121 'recommend':7,60 'red':48 'return':56 'root':19 'run':17,187 'see':169 'seen':22 'send':234,243 'set':44 'shell':69,73,79,189,195,208 'shellprompt':89,115,145,150,214 'slight':217 'someth':39 'specif':26 'ssh':15 'still':181 'subsitiut':194 'substitut':78 'symbol':52 'test':186 'thread':5,206 'true':57 'u':92 'unam':106,224 'use':76 'variabl':86,199 'w':41 'whoami':105 'whole':127 'wont':163 'work':34 'writabl':37 'zero':160"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.blahaj.zone/comment/4253531"
+editedAt: null
+createdAt: DateTimeImmutable @1699627856 {#4116
date: 2023-11-10 15:50:56.0 +01:00
}
} |
|
Show voter details
|
17 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
18 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4194
+user: App\Entity\User {#4207 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can recommend [Starship](https://starship.rs/)."
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1699688150 {#4188
date: 2023-11-11 08:35:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4195 …}
+nested: Doctrine\ORM\PersistentCollection {#4197 …}
+votes: Doctrine\ORM\PersistentCollection {#4199 …}
+reports: Doctrine\ORM\PersistentCollection {#4201 …}
+favourites: Doctrine\ORM\PersistentCollection {#4203 …}
+notifications: Doctrine\ORM\PersistentCollection {#4205 …}
-id: 106698
-bodyTs: "'/).':7 'recommend':3 'starship':4 'starship.rs':6 'starship.rs/).':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4678629"
+editedAt: DateTimeImmutable @1699669980 {#4189
date: 2023-11-11 03:33:00.0 +01:00
}
+createdAt: DateTimeImmutable @1699595437 {#4190
date: 2023-11-10 06:50:37.0 +01:00
}
} |
|
Show voter details
|
19 |
DENIED
|
edit
|
App\Entity\EntryComment {#4194
+user: App\Entity\User {#4207 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can recommend [Starship](https://starship.rs/)."
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1699688150 {#4188
date: 2023-11-11 08:35:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4195 …}
+nested: Doctrine\ORM\PersistentCollection {#4197 …}
+votes: Doctrine\ORM\PersistentCollection {#4199 …}
+reports: Doctrine\ORM\PersistentCollection {#4201 …}
+favourites: Doctrine\ORM\PersistentCollection {#4203 …}
+notifications: Doctrine\ORM\PersistentCollection {#4205 …}
-id: 106698
-bodyTs: "'/).':7 'recommend':3 'starship':4 'starship.rs':6 'starship.rs/).':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4678629"
+editedAt: DateTimeImmutable @1699669980 {#4189
date: 2023-11-11 03:33:00.0 +01:00
}
+createdAt: DateTimeImmutable @1699595437 {#4190
date: 2023-11-10 06:50:37.0 +01:00
}
} |
|
Show voter details
|
20 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4194
+user: App\Entity\User {#4207 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can recommend [Starship](https://starship.rs/)."
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1699688150 {#4188
date: 2023-11-11 08:35:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4195 …}
+nested: Doctrine\ORM\PersistentCollection {#4197 …}
+votes: Doctrine\ORM\PersistentCollection {#4199 …}
+reports: Doctrine\ORM\PersistentCollection {#4201 …}
+favourites: Doctrine\ORM\PersistentCollection {#4203 …}
+notifications: Doctrine\ORM\PersistentCollection {#4205 …}
-id: 106698
-bodyTs: "'/).':7 'recommend':3 'starship':4 'starship.rs':6 'starship.rs/).':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4678629"
+editedAt: DateTimeImmutable @1699669980 {#4189
date: 2023-11-11 03:33:00.0 +01:00
}
+createdAt: DateTimeImmutable @1699595437 {#4190
date: 2023-11-10 06:50:37.0 +01:00
}
} |
|
Show voter details
|
21 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
22 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4267
+user: App\Entity\User {#4280 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I make it green for an ssh session, and red when I’m root. That’s it, nothing fancy."
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1699654645 {#4262
date: 2023-11-10 23:17:25.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4268 …}
+nested: Doctrine\ORM\PersistentCollection {#4270 …}
+votes: Doctrine\ORM\PersistentCollection {#4272 …}
+reports: Doctrine\ORM\PersistentCollection {#4274 …}
+favourites: Doctrine\ORM\PersistentCollection {#4276 …}
+notifications: Doctrine\ORM\PersistentCollection {#4278 …}
-id: 105186
-bodyTs: "'fanci':19 'green':4 'm':13 'make':2 'noth':18 'red':10 'root':14 'session':8 'ssh':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5187427"
+editedAt: null
+createdAt: DateTimeImmutable @1699558684 {#4263
date: 2023-11-09 20:38:04.0 +01:00
}
} |
|
Show voter details
|
23 |
DENIED
|
edit
|
App\Entity\EntryComment {#4267
+user: App\Entity\User {#4280 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I make it green for an ssh session, and red when I’m root. That’s it, nothing fancy."
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1699654645 {#4262
date: 2023-11-10 23:17:25.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4268 …}
+nested: Doctrine\ORM\PersistentCollection {#4270 …}
+votes: Doctrine\ORM\PersistentCollection {#4272 …}
+reports: Doctrine\ORM\PersistentCollection {#4274 …}
+favourites: Doctrine\ORM\PersistentCollection {#4276 …}
+notifications: Doctrine\ORM\PersistentCollection {#4278 …}
-id: 105186
-bodyTs: "'fanci':19 'green':4 'm':13 'make':2 'noth':18 'red':10 'root':14 'session':8 'ssh':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5187427"
+editedAt: null
+createdAt: DateTimeImmutable @1699558684 {#4263
date: 2023-11-09 20:38:04.0 +01:00
}
} |
|
Show voter details
|
24 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4267
+user: App\Entity\User {#4280 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I make it green for an ssh session, and red when I’m root. That’s it, nothing fancy."
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1699654645 {#4262
date: 2023-11-10 23:17:25.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4268 …}
+nested: Doctrine\ORM\PersistentCollection {#4270 …}
+votes: Doctrine\ORM\PersistentCollection {#4272 …}
+reports: Doctrine\ORM\PersistentCollection {#4274 …}
+favourites: Doctrine\ORM\PersistentCollection {#4276 …}
+notifications: Doctrine\ORM\PersistentCollection {#4278 …}
-id: 105186
-bodyTs: "'fanci':19 'green':4 'm':13 'make':2 'noth':18 'red':10 'root':14 'session':8 'ssh':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5187427"
+editedAt: null
+createdAt: DateTimeImmutable @1699558684 {#4263
date: 2023-11-09 20:38:04.0 +01:00
}
} |
|
Show voter details
|
25 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
26 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4340
+user: App\Entity\User {#4353 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
If you like customizing your shell, there are really cool things one can do with zsh.\n
\n
I have mine set up with suggestions to complete the name of the program, or even command line options for it.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1699633657 {#4335
date: 2023-11-10 17:27:37.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4341 …}
+nested: Doctrine\ORM\PersistentCollection {#4343 …}
+votes: Doctrine\ORM\PersistentCollection {#4345 …}
+reports: Doctrine\ORM\PersistentCollection {#4347 …}
+favourites: Doctrine\ORM\PersistentCollection {#4349 …}
+notifications: Doctrine\ORM\PersistentCollection {#4351 …}
-id: 105241
-bodyTs: "'command':33 'complet':25 'cool':10 'custom':4 'even':32 'like':3 'line':34 'mine':19 'name':27 'one':12 'option':35 'program':30 'realli':9 'set':20 'shell':6 'suggest':23 'thing':11 'zsh':16"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://programming.dev/comment/4669979"
+editedAt: null
+createdAt: DateTimeImmutable @1699559708 {#4336
date: 2023-11-09 20:55:08.0 +01:00
}
} |
|
Show voter details
|
27 |
DENIED
|
edit
|
App\Entity\EntryComment {#4340
+user: App\Entity\User {#4353 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
If you like customizing your shell, there are really cool things one can do with zsh.\n
\n
I have mine set up with suggestions to complete the name of the program, or even command line options for it.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1699633657 {#4335
date: 2023-11-10 17:27:37.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4341 …}
+nested: Doctrine\ORM\PersistentCollection {#4343 …}
+votes: Doctrine\ORM\PersistentCollection {#4345 …}
+reports: Doctrine\ORM\PersistentCollection {#4347 …}
+favourites: Doctrine\ORM\PersistentCollection {#4349 …}
+notifications: Doctrine\ORM\PersistentCollection {#4351 …}
-id: 105241
-bodyTs: "'command':33 'complet':25 'cool':10 'custom':4 'even':32 'like':3 'line':34 'mine':19 'name':27 'one':12 'option':35 'program':30 'realli':9 'set':20 'shell':6 'suggest':23 'thing':11 'zsh':16"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://programming.dev/comment/4669979"
+editedAt: null
+createdAt: DateTimeImmutable @1699559708 {#4336
date: 2023-11-09 20:55:08.0 +01:00
}
} |
|
Show voter details
|
28 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4340
+user: App\Entity\User {#4353 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
If you like customizing your shell, there are really cool things one can do with zsh.\n
\n
I have mine set up with suggestions to complete the name of the program, or even command line options for it.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1699633657 {#4335
date: 2023-11-10 17:27:37.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4341 …}
+nested: Doctrine\ORM\PersistentCollection {#4343 …}
+votes: Doctrine\ORM\PersistentCollection {#4345 …}
+reports: Doctrine\ORM\PersistentCollection {#4347 …}
+favourites: Doctrine\ORM\PersistentCollection {#4349 …}
+notifications: Doctrine\ORM\PersistentCollection {#4351 …}
-id: 105241
-bodyTs: "'command':33 'complet':25 'cool':10 'custom':4 'even':32 'like':3 'line':34 'mine':19 'name':27 'one':12 'option':35 'program':30 'realli':9 'set':20 'shell':6 'suggest':23 'thing':11 'zsh':16"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://programming.dev/comment/4669979"
+editedAt: null
+createdAt: DateTimeImmutable @1699559708 {#4336
date: 2023-11-09 20:55:08.0 +01:00
}
} |
|
Show voter details
|
29 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
30 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4413
+user: App\Entity\User {#4426 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Powerline!"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699592512 {#4408
date: 2023-11-10 06:01:52.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4414 …}
+nested: Doctrine\ORM\PersistentCollection {#4416 …}
+votes: Doctrine\ORM\PersistentCollection {#4418 …}
+reports: Doctrine\ORM\PersistentCollection {#4420 …}
+favourites: Doctrine\ORM\PersistentCollection {#4422 …}
+notifications: Doctrine\ORM\PersistentCollection {#4424 …}
-id: 106610
-bodyTs: "'powerlin':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5667085"
+editedAt: null
+createdAt: DateTimeImmutable @1699592512 {#4409
date: 2023-11-10 06:01:52.0 +01:00
}
} |
|
Show voter details
|
31 |
DENIED
|
edit
|
App\Entity\EntryComment {#4413
+user: App\Entity\User {#4426 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Powerline!"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699592512 {#4408
date: 2023-11-10 06:01:52.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4414 …}
+nested: Doctrine\ORM\PersistentCollection {#4416 …}
+votes: Doctrine\ORM\PersistentCollection {#4418 …}
+reports: Doctrine\ORM\PersistentCollection {#4420 …}
+favourites: Doctrine\ORM\PersistentCollection {#4422 …}
+notifications: Doctrine\ORM\PersistentCollection {#4424 …}
-id: 106610
-bodyTs: "'powerlin':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5667085"
+editedAt: null
+createdAt: DateTimeImmutable @1699592512 {#4409
date: 2023-11-10 06:01:52.0 +01:00
}
} |
|
Show voter details
|
32 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4413
+user: App\Entity\User {#4426 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Powerline!"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699592512 {#4408
date: 2023-11-10 06:01:52.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4414 …}
+nested: Doctrine\ORM\PersistentCollection {#4416 …}
+votes: Doctrine\ORM\PersistentCollection {#4418 …}
+reports: Doctrine\ORM\PersistentCollection {#4420 …}
+favourites: Doctrine\ORM\PersistentCollection {#4422 …}
+notifications: Doctrine\ORM\PersistentCollection {#4424 …}
-id: 106610
-bodyTs: "'powerlin':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5667085"
+editedAt: null
+createdAt: DateTimeImmutable @1699592512 {#4409
date: 2023-11-10 06:01:52.0 +01:00
}
} |
|
Show voter details
|
33 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
34 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4489
+user: App\Entity\User {#4502 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Use `PS1=“▌t▐nw→”` to display your local time each time you press enter. And make aliases of lengthy commands such as `alias internettest=“curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -”` (You need to install python to run this.)"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1699575764 {#4483
date: 2023-11-10 01:22:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4490 …}
+nested: Doctrine\ORM\PersistentCollection {#4492 …}
+votes: Doctrine\ORM\PersistentCollection {#4494 …}
+reports: Doctrine\ORM\PersistentCollection {#4496 …}
+favourites: Doctrine\ORM\PersistentCollection {#4498 …}
+notifications: Doctrine\ORM\PersistentCollection {#4500 …}
-id: 106000
-bodyTs: "'/sivel/speedtest-cli/master/speedtest.py':29 'alia':23 'alias':17 'command':20 'curl':25 'display':6 'enter':14 'instal':34 'internettest':24 'lengthi':19 'local':8 'make':16 'need':32 'nw':4 'press':13 'ps1':2 'python':30,35 'raw.githubusercontent.com':28 'raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py':27 'run':37 'time':9,11 'use':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5194136"
+editedAt: DateTimeImmutable @1699652475 {#4484
date: 2023-11-10 22:41:15.0 +01:00
}
+createdAt: DateTimeImmutable @1699575764 {#4485
date: 2023-11-10 01:22:44.0 +01:00
}
} |
|
Show voter details
|
35 |
DENIED
|
edit
|
App\Entity\EntryComment {#4489
+user: App\Entity\User {#4502 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Use `PS1=“▌t▐nw→”` to display your local time each time you press enter. And make aliases of lengthy commands such as `alias internettest=“curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -”` (You need to install python to run this.)"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1699575764 {#4483
date: 2023-11-10 01:22:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4490 …}
+nested: Doctrine\ORM\PersistentCollection {#4492 …}
+votes: Doctrine\ORM\PersistentCollection {#4494 …}
+reports: Doctrine\ORM\PersistentCollection {#4496 …}
+favourites: Doctrine\ORM\PersistentCollection {#4498 …}
+notifications: Doctrine\ORM\PersistentCollection {#4500 …}
-id: 106000
-bodyTs: "'/sivel/speedtest-cli/master/speedtest.py':29 'alia':23 'alias':17 'command':20 'curl':25 'display':6 'enter':14 'instal':34 'internettest':24 'lengthi':19 'local':8 'make':16 'need':32 'nw':4 'press':13 'ps1':2 'python':30,35 'raw.githubusercontent.com':28 'raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py':27 'run':37 'time':9,11 'use':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5194136"
+editedAt: DateTimeImmutable @1699652475 {#4484
date: 2023-11-10 22:41:15.0 +01:00
}
+createdAt: DateTimeImmutable @1699575764 {#4485
date: 2023-11-10 01:22:44.0 +01:00
}
} |
|
Show voter details
|
36 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4489
+user: App\Entity\User {#4502 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Use `PS1=“▌t▐nw→”` to display your local time each time you press enter. And make aliases of lengthy commands such as `alias internettest=“curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -”` (You need to install python to run this.)"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1699575764 {#4483
date: 2023-11-10 01:22:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4490 …}
+nested: Doctrine\ORM\PersistentCollection {#4492 …}
+votes: Doctrine\ORM\PersistentCollection {#4494 …}
+reports: Doctrine\ORM\PersistentCollection {#4496 …}
+favourites: Doctrine\ORM\PersistentCollection {#4498 …}
+notifications: Doctrine\ORM\PersistentCollection {#4500 …}
-id: 106000
-bodyTs: "'/sivel/speedtest-cli/master/speedtest.py':29 'alia':23 'alias':17 'command':20 'curl':25 'display':6 'enter':14 'instal':34 'internettest':24 'lengthi':19 'local':8 'make':16 'need':32 'nw':4 'press':13 'ps1':2 'python':30,35 'raw.githubusercontent.com':28 'raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py':27 'run':37 'time':9,11 'use':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5194136"
+editedAt: DateTimeImmutable @1699652475 {#4484
date: 2023-11-10 22:41:15.0 +01:00
}
+createdAt: DateTimeImmutable @1699575764 {#4485
date: 2023-11-10 01:22:44.0 +01:00
}
} |
|
Show voter details
|
37 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
38 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4564
+user: App\Entity\User {#4577 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I customized mine to show git branch when in a git project directory."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699573956 {#4559
date: 2023-11-10 00:52:36.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4565 …}
+nested: Doctrine\ORM\PersistentCollection {#4567 …}
+votes: Doctrine\ORM\PersistentCollection {#4569 …}
+reports: Doctrine\ORM\PersistentCollection {#4571 …}
+favourites: Doctrine\ORM\PersistentCollection {#4573 …}
+notifications: Doctrine\ORM\PersistentCollection {#4575 …}
-id: 105908
-bodyTs: "'branch':7 'custom':2 'directori':13 'git':6,11 'mine':3 'project':12 'show':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5193155"
+editedAt: null
+createdAt: DateTimeImmutable @1699573956 {#4560
date: 2023-11-10 00:52:36.0 +01:00
}
} |
|
Show voter details
|
39 |
DENIED
|
edit
|
App\Entity\EntryComment {#4564
+user: App\Entity\User {#4577 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I customized mine to show git branch when in a git project directory."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699573956 {#4559
date: 2023-11-10 00:52:36.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4565 …}
+nested: Doctrine\ORM\PersistentCollection {#4567 …}
+votes: Doctrine\ORM\PersistentCollection {#4569 …}
+reports: Doctrine\ORM\PersistentCollection {#4571 …}
+favourites: Doctrine\ORM\PersistentCollection {#4573 …}
+notifications: Doctrine\ORM\PersistentCollection {#4575 …}
-id: 105908
-bodyTs: "'branch':7 'custom':2 'directori':13 'git':6,11 'mine':3 'project':12 'show':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5193155"
+editedAt: null
+createdAt: DateTimeImmutable @1699573956 {#4560
date: 2023-11-10 00:52:36.0 +01:00
}
} |
|
Show voter details
|
40 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4564
+user: App\Entity\User {#4577 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I customized mine to show git branch when in a git project directory."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1699573956 {#4559
date: 2023-11-10 00:52:36.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4565 …}
+nested: Doctrine\ORM\PersistentCollection {#4567 …}
+votes: Doctrine\ORM\PersistentCollection {#4569 …}
+reports: Doctrine\ORM\PersistentCollection {#4571 …}
+favourites: Doctrine\ORM\PersistentCollection {#4573 …}
+notifications: Doctrine\ORM\PersistentCollection {#4575 …}
-id: 105908
-bodyTs: "'branch':7 'custom':2 'directori':13 'git':6,11 'mine':3 'project':12 'show':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5193155"
+editedAt: null
+createdAt: DateTimeImmutable @1699573956 {#4560
date: 2023-11-10 00:52:36.0 +01:00
}
} |
|
Show voter details
|
41 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
42 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4639
+user: App\Entity\User {#4652 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Most prompt customizers have an option for showing how long last command ran and whether it succeeded/failed or simply prompt timestamp, it's often default. I use Tide, there's also Starship and a number of others. You can also roll your own ofcourse."
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1699565790 {#4633
date: 2023-11-09 22:36:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4640 …}
+nested: Doctrine\ORM\PersistentCollection {#4642 …}
+votes: Doctrine\ORM\PersistentCollection {#4644 …}
+reports: Doctrine\ORM\PersistentCollection {#4646 …}
+favourites: Doctrine\ORM\PersistentCollection {#4648 …}
+notifications: Doctrine\ORM\PersistentCollection {#4650 …}
-id: 105534
-bodyTs: "'also':31,40 'command':12 'custom':3 'default':25 'last':11 'long':10 'number':35 'ofcours':44 'often':24 'option':6 'other':37 'prompt':2,20 'ran':13 'roll':41 'show':8 'simpli':19 'starship':32 'succeeded/failed':17 'tide':28 'timestamp':21 'use':27 'whether':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/612744/-/comment/3465102"
+editedAt: DateTimeImmutable @1699641449 {#4634
date: 2023-11-10 19:37:29.0 +01:00
}
+createdAt: DateTimeImmutable @1699565790 {#4635
date: 2023-11-09 22:36:30.0 +01:00
}
} |
|
Show voter details
|
43 |
DENIED
|
edit
|
App\Entity\EntryComment {#4639
+user: App\Entity\User {#4652 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Most prompt customizers have an option for showing how long last command ran and whether it succeeded/failed or simply prompt timestamp, it's often default. I use Tide, there's also Starship and a number of others. You can also roll your own ofcourse."
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1699565790 {#4633
date: 2023-11-09 22:36:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4640 …}
+nested: Doctrine\ORM\PersistentCollection {#4642 …}
+votes: Doctrine\ORM\PersistentCollection {#4644 …}
+reports: Doctrine\ORM\PersistentCollection {#4646 …}
+favourites: Doctrine\ORM\PersistentCollection {#4648 …}
+notifications: Doctrine\ORM\PersistentCollection {#4650 …}
-id: 105534
-bodyTs: "'also':31,40 'command':12 'custom':3 'default':25 'last':11 'long':10 'number':35 'ofcours':44 'often':24 'option':6 'other':37 'prompt':2,20 'ran':13 'roll':41 'show':8 'simpli':19 'starship':32 'succeeded/failed':17 'tide':28 'timestamp':21 'use':27 'whether':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/612744/-/comment/3465102"
+editedAt: DateTimeImmutable @1699641449 {#4634
date: 2023-11-10 19:37:29.0 +01:00
}
+createdAt: DateTimeImmutable @1699565790 {#4635
date: 2023-11-09 22:36:30.0 +01:00
}
} |
|
Show voter details
|
44 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4639
+user: App\Entity\User {#4652 …}
+entry: App\Entity\Entry {#2419
+user: Proxies\__CG__\App\Entity\User {#1970 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1915 …}
+slug: "Custom-shell-prompt-tips-and-tricks"
+title: "Custom shell prompt tips and tricks?"
+url: null
+body: """
Recently I stumbled over an article, about how to customize your shell prompt. What really surprised me, is that it lacked one of the most basic tips I learned nearly 20 years back: Always display a timestamp in the prompt, to be able to check how long a process is running or when it ended. (Don’t need it daily, but every so often it saves my butt. ;-)) The other trick is to always have a colorful prompt, to easily discern where output from programs start/stop. In total my PS1 looks like this (with GIT status at the end): [\e[32m]\u[\e[m]@[\e[35m]\h[\e[m] [\e[36m]\A[\e[m] [\e[37m][[\e[m][\e[31m]\w[\e[m][\e[37m]][\e[m]$(__git_ps1 “(%s)”)$\n
\n
My question is, what customization, tips and tricks do you have for the shell prompt?
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 19
+favouriteCount: 27
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700431405 {#2414
date: 2023-11-19 23:03:25.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1884 …}
+votes: Doctrine\ORM\PersistentCollection {#1973 …}
+reports: Doctrine\ORM\PersistentCollection {#1959 …}
+favourites: Doctrine\ORM\PersistentCollection {#1927 …}
+notifications: Doctrine\ORM\PersistentCollection {#2442 …}
+badges: Doctrine\ORM\PersistentCollection {#2440 …}
+children: []
-id: 11536
-titleTs: "'custom':1 'prompt':3 'shell':2 'tip':4 'trick':6"
-bodyTs: "'20':31 '31m':120 '32m':101 '35m':106 '36m':111 '37m':116,125 'abl':43 'alway':34,74 'articl':6 'back':33 'basic':26 'butt':68 'check':45 'color':77 'custom':10,135 'daili':60 'discern':81 'display':35 'e':100,103,105,108,110,113,115,117,119,122,124,126 'easili':80 'end':55,99 'everi':62 'git':95,128 'h':107 'lack':21 'learn':29 'like':92 'long':47 'look':91 'm':104,109,114,118,123,127 'near':30 'need':58 'often':64 'one':22 'output':83 'process':49 'program':85 'prompt':13,40,78,145 'ps1':90,129 'question':132 'realli':15 'recent':1 'run':51 'save':66 'shell':12,144 'start/stop':86 'status':96 'stumbl':3 'surpris':16 'timestamp':37 'tip':27,136 'total':88 'trick':71,138 'u':102 'w':121 'year':32"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1699644087
+visibility: "visible "
+apId: "https://lemmy.zip/post/5328558"
+editedAt: null
+createdAt: DateTimeImmutable @1699557687 {#1793
date: 2023-11-09 20:21:27.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Most prompt customizers have an option for showing how long last command ran and whether it succeeded/failed or simply prompt timestamp, it's often default. I use Tide, there's also Starship and a number of others. You can also roll your own ofcourse."
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1699565790 {#4633
date: 2023-11-09 22:36:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@wolf@lemmy.zip"
]
+children: Doctrine\ORM\PersistentCollection {#4640 …}
+nested: Doctrine\ORM\PersistentCollection {#4642 …}
+votes: Doctrine\ORM\PersistentCollection {#4644 …}
+reports: Doctrine\ORM\PersistentCollection {#4646 …}
+favourites: Doctrine\ORM\PersistentCollection {#4648 …}
+notifications: Doctrine\ORM\PersistentCollection {#4650 …}
-id: 105534
-bodyTs: "'also':31,40 'command':12 'custom':3 'default':25 'last':11 'long':10 'number':35 'ofcours':44 'often':24 'option':6 'other':37 'prompt':2,20 'ran':13 'roll':41 'show':8 'simpli':19 'starship':32 'succeeded/failed':17 'tide':28 'timestamp':21 'use':27 'whether':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/612744/-/comment/3465102"
+editedAt: DateTimeImmutable @1699641449 {#4634
date: 2023-11-10 19:37:29.0 +01:00
}
+createdAt: DateTimeImmutable @1699565790 {#4635
date: 2023-11-09 22:36:30.0 +01:00
}
} |
|
Show voter details
|
45 |
DENIED
|
edit
|
App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
} |
|
Show voter details
|