Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cezarypiatek/pshistory
PowerShell lookup for recent locations and commands
https://github.com/cezarypiatek/pshistory
command-line commandline console powershell terminal
Last synced: 29 days ago
JSON representation
PowerShell lookup for recent locations and commands
- Host: GitHub
- URL: https://github.com/cezarypiatek/pshistory
- Owner: cezarypiatek
- License: mit
- Created: 2020-12-10T22:52:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-08T21:08:16.000Z (about 3 years ago)
- Last Synced: 2024-11-16T12:33:57.533Z (3 months ago)
- Topics: command-line, commandline, console, powershell, terminal
- Language: PowerShell
- Homepage:
- Size: 10.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSHistory
PowerShell lookup for recent locations and commands## How to use it
1. Install [PSHistory](https://www.powershellgallery.com/packages/PSHistory/) module from `PSGallery`
```ps
Install-Module PSHistory
```2. Define the following aliases in your `$PROFILE` file
```ps
Set-Alias -Name cd -Value Set-HistoricalLocation -Option AllScope
Set-Alias -Name hd -Value Show-HistoricalLocation -Option AllScope
```3. Reload your profile
```ps
. $PROFILE
```## How to use it
When you change directories with `cd` command, `PSHistory` tracks your locations. `hd` command allows to switch to one of the recent directories.
![HiHjfS7LE5](https://user-images.githubusercontent.com/7759991/145283243-7acf3b3c-858c-403d-9cd9-89aed3f663f5.gif)