Removed references to Windows support

The program doesn't seem to work on Windows, and I don't have the time
right now to debug it. So, at the moment, the program isn't supported on Windows.
master
Aadhavan Srinivasan 4 months ago
parent f8cb03bf88
commit d15a771e89

@ -12,7 +12,7 @@ ccat is a file printing tool (like 'cat') which uses Regular Expressions to enab
- Highly extensible - to add a config file for an specific file type, name the file `<extension>.conf`.
- Support for printing line numbers with the `-n` flag.
- Statically linked Go binary - no runtime dependencies, config files are distributed along with the binary.
- Cross-platform
- Linux and MacOS supported.
---
@ -32,7 +32,7 @@ The following languages have config files included by default:
---
### Getting Started
The config files are embedded within the binary. They will automatically be installed to the correct location (`%APPDATA/ccat` on Windows, `~/.config/ccat` on UNIX) when the program is first run.
The config files are embedded within the binary. They will automatically be installed to the correct location (`~/.config/ccat` on UNIX) when the program is first run.
As written above, if provided a file with extension `.example`, the program will look for the config file named `example.conf`. If such a file doesn't exist, the file is printed out without any highlighting.
@ -61,5 +61,6 @@ Note that the color name must be capitalized (and shouldn't contain spaces). The
---
### TODO:
- Windows support.
- Allow users to provide a config file in the command-line, overriding the extension-based config file.
- Provide releases.

@ -2,7 +2,7 @@
set -euo pipefail
POSSIBLE_GOOS=( "windows" "linux" "darwin" )
POSSIBLE_GOOS=( "linux" "darwin" )
POSSIBLE_GOARCH=( "amd64" "arm64" )
for OS in "${POSSIBLE_GOOS[@]}"; do

@ -78,17 +78,11 @@ func main() {
flag.Parse()
// Check if config exists. If it doesn't, generate the config files.
var configPath string // Location of config files, depends on OS
currentUser, err := user.Current() // Get current user, to determine config path
if err != nil {
panic(err)
}
if runningOnWindows() {
configPath = filepath.Join("C:\\Users" + currentUser.Username + "AppData\\Local\\ccat\\")
} else {
configPath = filepath.Join("/home/" + currentUser.Username + "/.config/ccat/")
}
configPath := filepath.Join("/home/" + currentUser.Username + "/.config/ccat/")
if _, err := os.Stat(configPath); os.IsNotExist(err) {
generateDefaultConfigs(configPath)
}

Loading…
Cancel
Save